
(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 23 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
(if (<= F -1.26e+39)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 140000000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(/ (* x (cos B)) (sin B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.26e+39) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 140000000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x * cos(B)) / sin(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 <= (-1.26d+39)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 140000000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - ((x * cos(b)) / sin(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 <= -1.26e+39) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 140000000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x * Math.cos(B)) / Math.sin(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 <= -1.26e+39: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 140000000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x * math.cos(B)) / math.sin(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 <= -1.26e+39) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 140000000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(Float64(x * cos(B)) / sin(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 <= -1.26e+39) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 140000000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - ((x * cos(B)) / sin(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.26e+39], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 140000000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(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 -1.26 \cdot 10^{+39}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 140000000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.26000000000000001e39Initial program 39.1%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
inv-pow99.8%
metadata-eval99.8%
pow-pow36.2%
unsub-neg36.2%
pow-pow99.8%
metadata-eval99.8%
inv-pow99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -1.26000000000000001e39 < F < 1.4e11Initial program 99.5%
Taylor expanded in x around 0 99.6%
if 1.4e11 < F Initial program 58.7%
Taylor expanded in F around inf 99.6%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.26e+39)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 100000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(* x (/ (cos B) (sin B))))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.26e+39) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 100000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x * (cos(B) / sin(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 <= (-1.26d+39)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 100000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x * (cos(b) / sin(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 <= -1.26e+39) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 100000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x * (Math.cos(B) / Math.sin(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 <= -1.26e+39: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 100000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x * (math.cos(B) / math.sin(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 <= -1.26e+39) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 100000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x * Float64(cos(B) / sin(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 <= -1.26e+39) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 100000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x * (cos(B) / sin(B))); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.26e+39], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $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 -1.26 \cdot 10^{+39}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.26000000000000001e39Initial program 39.1%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
inv-pow99.8%
metadata-eval99.8%
pow-pow36.2%
unsub-neg36.2%
pow-pow99.8%
metadata-eval99.8%
inv-pow99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -1.26000000000000001e39 < F < 1e8Initial program 99.5%
Taylor expanded in x around 0 99.6%
associate-/l*99.5%
Simplified99.5%
if 1e8 < F Initial program 59.2%
Taylor expanded in F around inf 99.6%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.26e+39)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 20000000.0)
(+ (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) t_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 <= -1.26e+39) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 20000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + t_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 <= (-1.26d+39)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 20000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) + t_0
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 <= -1.26e+39) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 20000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + t_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 <= -1.26e+39: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 20000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + t_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 <= -1.26e+39) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 20000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) + t_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 <= -1.26e+39) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 20000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) + t_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, -1.26e+39], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 20000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + t$95$0), $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 -1.26 \cdot 10^{+39}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 20000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} + t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.26000000000000001e39Initial program 39.1%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
inv-pow99.8%
metadata-eval99.8%
pow-pow36.2%
unsub-neg36.2%
pow-pow99.8%
metadata-eval99.8%
inv-pow99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -1.26000000000000001e39 < F < 2e7Initial program 99.5%
if 2e7 < F Initial program 59.2%
Taylor expanded in F around inf 99.6%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -1.7)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 1.7)
(- (* F (* t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_1)
(+ (* x (/ -1.0 (tan B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.7) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 1.7) {
tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = (x * (-1.0 / tan(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) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = x / tan(b)
if (f <= (-1.7d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 1.7d0) then
tmp = (f * (t_0 * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_1
else
tmp = (x * ((-1.0d0) / tan(b))) + t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.7) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 1.7) {
tmp = (F * (t_0 * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + t_0;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -1.7: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 1.7: tmp = (F * (t_0 * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1 else: tmp = (x * (-1.0 / math.tan(B))) + t_0 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.7) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 1.7) tmp = Float64(Float64(F * Float64(t_0 * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_1); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.7) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 1.7) tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1; else tmp = (x * (-1.0 / tan(B))) + t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 1.7], N[(N[(F * N[(t$95$0 * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.7:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 1.7:\\
\;\;\;\;F \cdot \left(t\_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t\_0\\
\end{array}
\end{array}
if F < -1.69999999999999996Initial program 47.8%
Taylor expanded in F around -inf 99.0%
+-commutative99.0%
inv-pow99.0%
metadata-eval99.0%
pow-pow38.3%
unsub-neg38.3%
pow-pow99.0%
metadata-eval99.0%
inv-pow99.0%
un-div-inv99.1%
Applied egg-rr99.1%
if -1.69999999999999996 < F < 1.69999999999999996Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 97.9%
if 1.69999999999999996 < F Initial program 59.7%
Taylor expanded in F around inf 99.5%
Final simplification98.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.5)
(- (* 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 <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.5) {
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 <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.5d0) 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 <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.5) {
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 <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.5: 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 <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.5) 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 <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.5) 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, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.5], 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 -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.5:\\
\;\;\;\;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 < -1.3999999999999999Initial program 47.8%
Taylor expanded in F around -inf 99.0%
+-commutative99.0%
inv-pow99.0%
metadata-eval99.0%
pow-pow38.3%
unsub-neg38.3%
pow-pow99.0%
metadata-eval99.0%
inv-pow99.0%
un-div-inv99.1%
Applied egg-rr99.1%
if -1.3999999999999999 < F < 1.5Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.1%
associate-*l/99.2%
*-lft-identity99.2%
+-commutative99.2%
unpow299.2%
fma-undefine99.2%
Simplified99.2%
Taylor expanded in F around 0 97.7%
if 1.5 < F Initial program 59.7%
Taylor expanded in F around inf 99.5%
Final simplification98.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -490000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -4.2e-87)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 1.7e-22)
(- (* F (/ (sqrt 0.5) B)) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -490000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -4.2e-87) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1.7e-22) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-490000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-4.2d-87)) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 1.7d-22) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -490000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -4.2e-87) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1.7e-22) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -490000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -4.2e-87: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B) elif F <= 1.7e-22: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -490000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -4.2e-87) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 1.7e-22) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -490000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -4.2e-87) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 1.7e-22) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -490000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -4.2e-87], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-22], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -490000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -4.2 \cdot 10^{-87}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-22}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -4.9e5Initial program 46.4%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
inv-pow99.7%
metadata-eval99.7%
pow-pow38.5%
unsub-neg38.5%
pow-pow99.7%
metadata-eval99.7%
inv-pow99.7%
un-div-inv99.9%
Applied egg-rr99.9%
if -4.9e5 < F < -4.20000000000000014e-87Initial program 99.6%
Taylor expanded in B around 0 99.6%
if -4.20000000000000014e-87 < F < 1.6999999999999999e-22Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 92.3%
if 1.6999999999999999e-22 < F Initial program 61.8%
Taylor expanded in F around inf 97.3%
Final simplification96.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.00032)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -3e-81)
(- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 1.7e-22)
(- (* F (/ (sqrt 0.5) B)) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.00032) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -3e-81) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 1.7e-22) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.00032d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-3d-81)) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 1.7d-22) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.00032) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -3e-81) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 1.7e-22) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.00032: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -3e-81: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) elif F <= 1.7e-22: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.00032) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -3e-81) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 1.7e-22) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.00032) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -3e-81) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); elseif (F <= 1.7e-22) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00032], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3e-81], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-22], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.00032:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -3 \cdot 10^{-81}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-22}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -3.20000000000000026e-4Initial program 47.8%
Taylor expanded in F around -inf 99.0%
+-commutative99.0%
inv-pow99.0%
metadata-eval99.0%
pow-pow38.3%
unsub-neg38.3%
pow-pow99.0%
metadata-eval99.0%
inv-pow99.0%
un-div-inv99.1%
Applied egg-rr99.1%
if -3.20000000000000026e-4 < F < -2.9999999999999999e-81Initial program 99.7%
Taylor expanded in B around 0 99.7%
Taylor expanded in F around 0 93.7%
if -2.9999999999999999e-81 < F < 1.6999999999999999e-22Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 92.3%
if 1.6999999999999999e-22 < F Initial program 61.8%
Taylor expanded in F around inf 97.3%
Final simplification95.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.2e-5)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.7e-22)
(- (* F (/ (sqrt 0.5) B)) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.2e-5) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.7e-22) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.2d-5)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.7d-22) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.2e-5) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.7e-22) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.2e-5: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.7e-22: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.2e-5) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.7e-22) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.2e-5) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.7e-22) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.2e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.7e-22], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-22}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -3.19999999999999986e-5Initial program 48.4%
Taylor expanded in F around -inf 97.9%
+-commutative97.9%
inv-pow97.9%
metadata-eval97.9%
pow-pow37.8%
unsub-neg37.8%
pow-pow97.9%
metadata-eval97.9%
inv-pow97.9%
un-div-inv98.0%
Applied egg-rr98.0%
if -3.19999999999999986e-5 < F < 1.6999999999999999e-22Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.1%
associate-*l/99.2%
*-lft-identity99.2%
+-commutative99.2%
unpow299.2%
fma-undefine99.2%
Simplified99.2%
Taylor expanded in F around 0 99.2%
Taylor expanded in B around 0 87.8%
if 1.6999999999999999e-22 < F Initial program 61.8%
Taylor expanded in F around inf 97.3%
Final simplification93.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.2e-5)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.4e-11)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.2e-5) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.4e-11) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.2d-5)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 3.4d-11) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.2e-5) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 3.4e-11) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.2e-5: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 3.4e-11: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.2e-5) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.4e-11) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.2e-5) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 3.4e-11) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.2e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.4e-11], 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] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-11}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.19999999999999986e-5Initial program 48.4%
Taylor expanded in F around -inf 97.9%
+-commutative97.9%
inv-pow97.9%
metadata-eval97.9%
pow-pow37.8%
unsub-neg37.8%
pow-pow97.9%
metadata-eval97.9%
inv-pow97.9%
un-div-inv98.0%
Applied egg-rr98.0%
if -3.19999999999999986e-5 < F < 3.3999999999999999e-11Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.1%
associate-*l/99.2%
*-lft-identity99.2%
+-commutative99.2%
unpow299.2%
fma-undefine99.2%
Simplified99.2%
Taylor expanded in F around 0 99.2%
Taylor expanded in B around 0 87.9%
if 3.3999999999999999e-11 < F Initial program 61.3%
Taylor expanded in B around 0 39.8%
Taylor expanded in F around inf 75.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.3e-27)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 6.6e-12)
(/ (* x (cos B)) (- (sin B)))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-27) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 6.6e-12) {
tmp = (x * cos(B)) / -sin(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.3d-27)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 6.6d-12) then
tmp = (x * cos(b)) / -sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-27) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 6.6e-12) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.3e-27: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 6.6e-12: tmp = (x * math.cos(B)) / -math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.3e-27) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 6.6e-12) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.3e-27) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 6.6e-12) tmp = (x * cos(B)) / -sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.3e-27], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.6e-12], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.3 \cdot 10^{-27}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 6.6 \cdot 10^{-12}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.30000000000000009e-27Initial program 49.7%
Taylor expanded in F around -inf 95.7%
+-commutative95.7%
inv-pow95.7%
metadata-eval95.7%
pow-pow37.0%
unsub-neg37.0%
pow-pow95.7%
metadata-eval95.7%
inv-pow95.7%
un-div-inv95.8%
Applied egg-rr95.8%
if -1.30000000000000009e-27 < F < 6.6000000000000001e-12Initial program 99.5%
Taylor expanded in F around -inf 35.4%
+-commutative35.4%
inv-pow35.4%
metadata-eval35.4%
pow-pow20.1%
unsub-neg20.1%
pow-pow35.4%
metadata-eval35.4%
inv-pow35.4%
un-div-inv35.5%
Applied egg-rr35.5%
Taylor expanded in x around inf 77.9%
mul-1-neg77.9%
Simplified77.9%
if 6.6000000000000001e-12 < F Initial program 61.3%
Taylor expanded in B around 0 39.8%
Taylor expanded in F around inf 75.7%
Final simplification82.8%
(FPCore (F B x)
:precision binary64
(if (<= F -1.7e-27)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.45e-11)
(/ (* x (cos B)) (- (sin B)))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-27) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.45e-11) {
tmp = (x * cos(B)) / -sin(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.7d-27)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.45d-11) then
tmp = (x * cos(b)) / -sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-27) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.45e-11) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.7e-27: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.45e-11: tmp = (x * math.cos(B)) / -math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.7e-27) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.45e-11) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.7e-27) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.45e-11) tmp = (x * cos(B)) / -sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.7e-27], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.45e-11], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{-27}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{-11}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.69999999999999985e-27Initial program 49.7%
Taylor expanded in B around 0 33.0%
Taylor expanded in F around -inf 78.6%
mul-1-neg78.6%
distribute-neg-in78.6%
distribute-neg-frac78.6%
metadata-eval78.6%
unsub-neg78.6%
Simplified78.6%
if -1.69999999999999985e-27 < F < 1.45e-11Initial program 99.5%
Taylor expanded in F around -inf 35.4%
+-commutative35.4%
inv-pow35.4%
metadata-eval35.4%
pow-pow20.1%
unsub-neg20.1%
pow-pow35.4%
metadata-eval35.4%
inv-pow35.4%
un-div-inv35.5%
Applied egg-rr35.5%
Taylor expanded in x around inf 77.9%
mul-1-neg77.9%
Simplified77.9%
if 1.45e-11 < F Initial program 61.3%
Taylor expanded in B around 0 39.8%
Taylor expanded in F around inf 75.7%
Final simplification77.5%
(FPCore (F B x)
:precision binary64
(if (<= F -4200000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.6e-228)
(- (/ (/ F (- B)) F) (/ x (tan B)))
(if (<= F 1.7e-22)
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4200000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.6e-228) {
tmp = ((F / -B) / F) - (x / tan(B));
} else if (F <= 1.7e-22) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4200000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.6d-228) then
tmp = ((f / -b) / f) - (x / tan(b))
else if (f <= 1.7d-22) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4200000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.6e-228) {
tmp = ((F / -B) / F) - (x / Math.tan(B));
} else if (F <= 1.7e-22) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4200000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.6e-228: tmp = ((F / -B) / F) - (x / math.tan(B)) elif F <= 1.7e-22: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4200000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.6e-228) tmp = Float64(Float64(Float64(F / Float64(-B)) / F) - Float64(x / tan(B))); elseif (F <= 1.7e-22) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4200000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.6e-228) tmp = ((F / -B) / F) - (x / tan(B)); elseif (F <= 1.7e-22) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4200000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.6e-228], N[(N[(N[(F / (-B)), $MachinePrecision] / F), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-22], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4200000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-228}:\\
\;\;\;\;\frac{\frac{F}{-B}}{F} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-22}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.2e6Initial program 45.7%
Taylor expanded in B around 0 29.0%
Taylor expanded in F around -inf 82.6%
mul-1-neg82.6%
distribute-neg-in82.6%
distribute-neg-frac82.6%
metadata-eval82.6%
unsub-neg82.6%
Simplified82.6%
if -4.2e6 < F < 2.6e-228Initial program 99.6%
Simplified99.6%
Taylor expanded in F around -inf 34.7%
associate-*r/34.7%
*-commutative34.7%
associate-/r*36.2%
Applied egg-rr36.2%
Taylor expanded in B around 0 52.9%
associate-*r/52.9%
neg-mul-152.9%
Simplified52.9%
if 2.6e-228 < F < 1.6999999999999999e-22Initial program 99.5%
Taylor expanded in B around 0 66.4%
Taylor expanded in B around 0 61.1%
if 1.6999999999999999e-22 < F Initial program 61.8%
Taylor expanded in B around 0 39.3%
Taylor expanded in F around inf 74.7%
Final simplification69.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -6000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.1e-288)
t_0
(if (<= F 1.55e-180)
(/ x (- B))
(if (<= F 4.9e-20) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -6000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.1e-288) {
tmp = t_0;
} else if (F <= 1.55e-180) {
tmp = x / -B;
} else if (F <= 4.9e-20) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-6000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.1d-288)) then
tmp = t_0
else if (f <= 1.55d-180) then
tmp = x / -b
else if (f <= 4.9d-20) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -6000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.1e-288) {
tmp = t_0;
} else if (F <= 1.55e-180) {
tmp = x / -B;
} else if (F <= 4.9e-20) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -6000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.1e-288: tmp = t_0 elif F <= 1.55e-180: tmp = x / -B elif F <= 4.9e-20: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -6000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.1e-288) tmp = t_0; elseif (F <= 1.55e-180) tmp = Float64(x / Float64(-B)); elseif (F <= 4.9e-20) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -6000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.1e-288) tmp = t_0; elseif (F <= 1.55e-180) tmp = x / -B; elseif (F <= 4.9e-20) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.1e-288], t$95$0, If[LessEqual[F, 1.55e-180], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 4.9e-20], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.1 \cdot 10^{-288}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-180}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 4.9 \cdot 10^{-20}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6e6Initial program 45.7%
Taylor expanded in B around 0 29.0%
Taylor expanded in F around -inf 82.6%
mul-1-neg82.6%
distribute-neg-in82.6%
distribute-neg-frac82.6%
metadata-eval82.6%
unsub-neg82.6%
Simplified82.6%
if -6e6 < F < -4.10000000000000007e-288 or 1.5499999999999999e-180 < F < 4.9000000000000002e-20Initial program 99.6%
Simplified99.5%
Taylor expanded in F around -inf 40.0%
Taylor expanded in B around 0 52.4%
if -4.10000000000000007e-288 < F < 1.5499999999999999e-180Initial program 99.5%
Taylor expanded in B around 0 57.0%
Taylor expanded in x around inf 51.4%
associate-*r/51.4%
neg-mul-151.4%
Simplified51.4%
if 4.9000000000000002e-20 < F Initial program 61.3%
Taylor expanded in B around 0 39.8%
Taylor expanded in F around inf 75.7%
Final simplification67.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -4000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.7e-288)
t_0
(if (<= F 8e-177) (/ x (- B)) (if (<= F 6e-7) t_0 (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -4000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.7e-288) {
tmp = t_0;
} else if (F <= 8e-177) {
tmp = x / -B;
} else if (F <= 6e-7) {
tmp = t_0;
} else {
tmp = 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 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-4000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.7d-288)) then
tmp = t_0
else if (f <= 8d-177) then
tmp = x / -b
else if (f <= 6d-7) then
tmp = t_0
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -4000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.7e-288) {
tmp = t_0;
} else if (F <= 8e-177) {
tmp = x / -B;
} else if (F <= 6e-7) {
tmp = t_0;
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -4000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.7e-288: tmp = t_0 elif F <= 8e-177: tmp = x / -B elif F <= 6e-7: tmp = t_0 else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -4000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.7e-288) tmp = t_0; elseif (F <= 8e-177) tmp = Float64(x / Float64(-B)); elseif (F <= 6e-7) tmp = t_0; else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -4000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.7e-288) tmp = t_0; elseif (F <= 8e-177) tmp = x / -B; elseif (F <= 6e-7) tmp = t_0; else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.7e-288], t$95$0, If[LessEqual[F, 8e-177], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 6e-7], t$95$0, N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{-288}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-177}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-7}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -4e6Initial program 45.7%
Taylor expanded in B around 0 29.0%
Taylor expanded in F around -inf 82.6%
mul-1-neg82.6%
distribute-neg-in82.6%
distribute-neg-frac82.6%
metadata-eval82.6%
unsub-neg82.6%
Simplified82.6%
if -4e6 < F < -1.69999999999999986e-288 or 7.99999999999999962e-177 < F < 5.9999999999999997e-7Initial program 99.6%
Simplified99.5%
Taylor expanded in F around -inf 40.8%
Taylor expanded in B around 0 53.0%
if -1.69999999999999986e-288 < F < 7.99999999999999962e-177Initial program 99.5%
Taylor expanded in B around 0 57.0%
Taylor expanded in x around inf 51.4%
associate-*r/51.4%
neg-mul-151.4%
Simplified51.4%
if 5.9999999999999997e-7 < F Initial program 60.8%
Taylor expanded in B around 0 39.0%
Taylor expanded in F around inf 75.4%
Taylor expanded in B around inf 60.5%
Final simplification63.5%
(FPCore (F B x)
:precision binary64
(if (<= F -1.5e-28)
(/ -1.0 (sin B))
(if (<= F 0.005)
(/ x (- B))
(if (or (<= F 9.2e+73) (not (<= F 6.7e+185)))
(/ 1.0 (sin B))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-28) {
tmp = -1.0 / sin(B);
} else if (F <= 0.005) {
tmp = x / -B;
} else if ((F <= 9.2e+73) || !(F <= 6.7e+185)) {
tmp = 1.0 / sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.5d-28)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 0.005d0) then
tmp = x / -b
else if ((f <= 9.2d+73) .or. (.not. (f <= 6.7d+185))) then
tmp = 1.0d0 / sin(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-28) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 0.005) {
tmp = x / -B;
} else if ((F <= 9.2e+73) || !(F <= 6.7e+185)) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.5e-28: tmp = -1.0 / math.sin(B) elif F <= 0.005: tmp = x / -B elif (F <= 9.2e+73) or not (F <= 6.7e+185): tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.5e-28) tmp = Float64(-1.0 / sin(B)); elseif (F <= 0.005) tmp = Float64(x / Float64(-B)); elseif ((F <= 9.2e+73) || !(F <= 6.7e+185)) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.5e-28) tmp = -1.0 / sin(B); elseif (F <= 0.005) tmp = x / -B; elseif ((F <= 9.2e+73) || ~((F <= 6.7e+185))) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.5e-28], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.005], N[(x / (-B)), $MachinePrecision], If[Or[LessEqual[F, 9.2e+73], N[Not[LessEqual[F, 6.7e+185]], $MachinePrecision]], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.5 \cdot 10^{-28}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 0.005:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{+73} \lor \neg \left(F \leq 6.7 \cdot 10^{+185}\right):\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.50000000000000001e-28Initial program 49.7%
Taylor expanded in F around -inf 95.7%
+-commutative95.7%
inv-pow95.7%
metadata-eval95.7%
pow-pow37.0%
unsub-neg37.0%
pow-pow95.7%
metadata-eval95.7%
inv-pow95.7%
un-div-inv95.8%
Applied egg-rr95.8%
Taylor expanded in x around 0 60.7%
if -1.50000000000000001e-28 < F < 0.0050000000000000001Initial program 99.6%
Taylor expanded in B around 0 56.8%
Taylor expanded in x around inf 36.7%
associate-*r/36.7%
neg-mul-136.7%
Simplified36.7%
if 0.0050000000000000001 < F < 9.199999999999999e73 or 6.7000000000000003e185 < F Initial program 50.9%
Taylor expanded in B around 0 26.9%
Taylor expanded in F around inf 71.8%
Taylor expanded in B around inf 64.8%
if 9.199999999999999e73 < F < 6.7000000000000003e185Initial program 78.3%
Taylor expanded in B around 0 60.4%
Taylor expanded in F around inf 64.2%
Taylor expanded in B around 0 70.9%
Final simplification53.1%
(FPCore (F B x)
:precision binary64
(if (<= F -9500000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 6.6e-229)
(- (/ (/ F (- B)) F) (/ x (tan B)))
(if (<= F 1.7e-22)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9500000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 6.6e-229) {
tmp = ((F / -B) / F) - (x / tan(B));
} else if (F <= 1.7e-22) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9500000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 6.6d-229) then
tmp = ((f / -b) / f) - (x / tan(b))
else if (f <= 1.7d-22) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9500000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 6.6e-229) {
tmp = ((F / -B) / F) - (x / Math.tan(B));
} else if (F <= 1.7e-22) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9500000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 6.6e-229: tmp = ((F / -B) / F) - (x / math.tan(B)) elif F <= 1.7e-22: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9500000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 6.6e-229) tmp = Float64(Float64(Float64(F / Float64(-B)) / F) - Float64(x / tan(B))); elseif (F <= 1.7e-22) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9500000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 6.6e-229) tmp = ((F / -B) / F) - (x / tan(B)); elseif (F <= 1.7e-22) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9500000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.6e-229], N[(N[(N[(F / (-B)), $MachinePrecision] / F), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-22], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9500000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6.6 \cdot 10^{-229}:\\
\;\;\;\;\frac{\frac{F}{-B}}{F} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-22}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.5e6Initial program 45.7%
Taylor expanded in B around 0 29.0%
Taylor expanded in F around -inf 82.6%
mul-1-neg82.6%
distribute-neg-in82.6%
distribute-neg-frac82.6%
metadata-eval82.6%
unsub-neg82.6%
Simplified82.6%
if -9.5e6 < F < 6.60000000000000042e-229Initial program 99.6%
Simplified99.6%
Taylor expanded in F around -inf 34.7%
associate-*r/34.7%
*-commutative34.7%
associate-/r*36.2%
Applied egg-rr36.2%
Taylor expanded in B around 0 52.9%
associate-*r/52.9%
neg-mul-152.9%
Simplified52.9%
if 6.60000000000000042e-229 < F < 1.6999999999999999e-22Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 61.0%
if 1.6999999999999999e-22 < F Initial program 61.8%
Taylor expanded in B around 0 39.3%
Taylor expanded in F around inf 74.7%
Final simplification69.2%
(FPCore (F B x)
:precision binary64
(if (<= F -6400000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.5e-288)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 1.7e-22)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6400000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.5e-288) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 1.7e-22) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6400000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.5d-288)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 1.7d-22) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6400000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.5e-288) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 1.7e-22) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6400000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.5e-288: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 1.7e-22: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6400000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.5e-288) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 1.7e-22) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6400000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.5e-288) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 1.7e-22) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6400000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.5e-288], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-22], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6400000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.5 \cdot 10^{-288}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-22}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6.4e6Initial program 45.7%
Taylor expanded in B around 0 29.0%
Taylor expanded in F around -inf 82.6%
mul-1-neg82.6%
distribute-neg-in82.6%
distribute-neg-frac82.6%
metadata-eval82.6%
unsub-neg82.6%
Simplified82.6%
if -6.4e6 < F < -4.5000000000000002e-288Initial program 99.6%
Simplified99.6%
Taylor expanded in F around -inf 39.1%
Taylor expanded in B around 0 49.8%
if -4.5000000000000002e-288 < F < 1.6999999999999999e-22Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 54.8%
if 1.6999999999999999e-22 < F Initial program 61.8%
Taylor expanded in B around 0 39.3%
Taylor expanded in F around inf 74.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -4.9e-288)
t_0
(if (<= F 2.3e-177) (/ x (- B)) (if (<= F 0.0105) t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -4.9e-288) {
tmp = t_0;
} else if (F <= 2.3e-177) {
tmp = x / -B;
} else if (F <= 0.0105) {
tmp = t_0;
} else {
tmp = 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 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-4.9d-288)) then
tmp = t_0
else if (f <= 2.3d-177) then
tmp = x / -b
else if (f <= 0.0105d0) then
tmp = t_0
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -4.9e-288) {
tmp = t_0;
} else if (F <= 2.3e-177) {
tmp = x / -B;
} else if (F <= 0.0105) {
tmp = t_0;
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -4.9e-288: tmp = t_0 elif F <= 2.3e-177: tmp = x / -B elif F <= 0.0105: tmp = t_0 else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -4.9e-288) tmp = t_0; elseif (F <= 2.3e-177) tmp = Float64(x / Float64(-B)); elseif (F <= 0.0105) tmp = t_0; else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -4.9e-288) tmp = t_0; elseif (F <= 2.3e-177) tmp = x / -B; elseif (F <= 0.0105) tmp = t_0; else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.9e-288], t$95$0, If[LessEqual[F, 2.3e-177], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 0.0105], t$95$0, N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.9 \cdot 10^{-288}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-177}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 0.0105:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -4.90000000000000026e-288 or 2.30000000000000022e-177 < F < 0.0105000000000000007Initial program 72.3%
Simplified79.8%
Taylor expanded in F around -inf 70.6%
Taylor expanded in B around 0 60.9%
if -4.90000000000000026e-288 < F < 2.30000000000000022e-177Initial program 99.5%
Taylor expanded in B around 0 57.0%
Taylor expanded in x around inf 51.4%
associate-*r/51.4%
neg-mul-151.4%
Simplified51.4%
if 0.0105000000000000007 < F Initial program 60.8%
Taylor expanded in B around 0 39.0%
Taylor expanded in F around inf 75.4%
Taylor expanded in B around inf 60.5%
Final simplification59.5%
(FPCore (F B x) :precision binary64 (if (<= F -1.7e-27) (/ -1.0 (sin B)) (if (<= F 1.7e-56) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-27) {
tmp = -1.0 / sin(B);
} else if (F <= 1.7e-56) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.7d-27)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 1.7d-56) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-27) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 1.7e-56) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.7e-27: tmp = -1.0 / math.sin(B) elif F <= 1.7e-56: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.7e-27) tmp = Float64(-1.0 / sin(B)); elseif (F <= 1.7e-56) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.7e-27) tmp = -1.0 / sin(B); elseif (F <= 1.7e-56) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.7e-27], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-56], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{-27}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-56}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.69999999999999985e-27Initial program 49.7%
Taylor expanded in F around -inf 95.7%
+-commutative95.7%
inv-pow95.7%
metadata-eval95.7%
pow-pow37.0%
unsub-neg37.0%
pow-pow95.7%
metadata-eval95.7%
inv-pow95.7%
un-div-inv95.8%
Applied egg-rr95.8%
Taylor expanded in x around 0 60.7%
if -1.69999999999999985e-27 < F < 1.69999999999999991e-56Initial program 99.6%
Taylor expanded in B around 0 56.2%
Taylor expanded in x around inf 37.1%
associate-*r/37.1%
neg-mul-137.1%
Simplified37.1%
if 1.69999999999999991e-56 < F Initial program 65.3%
Taylor expanded in B around 0 41.6%
Taylor expanded in F around inf 50.4%
Taylor expanded in B around 0 49.0%
Final simplification48.5%
(FPCore (F B x) :precision binary64 (if (<= F -9e-6) (/ (- -1.0 x) B) (if (<= F 3.5e-58) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9e-6) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.5e-58) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9d-6)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3.5d-58) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9e-6) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.5e-58) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9e-6: tmp = (-1.0 - x) / B elif F <= 3.5e-58: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9e-6) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.5e-58) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9e-6) tmp = (-1.0 - x) / B; elseif (F <= 3.5e-58) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9e-6], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.5e-58], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9 \cdot 10^{-6}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-58}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -9.00000000000000023e-6Initial program 48.4%
Taylor expanded in F around -inf 97.9%
Taylor expanded in B around 0 50.2%
mul-1-neg50.2%
distribute-neg-frac250.2%
Simplified50.2%
if -9.00000000000000023e-6 < F < 3.4999999999999999e-58Initial program 99.6%
Taylor expanded in B around 0 57.2%
Taylor expanded in x around inf 36.5%
associate-*r/36.5%
neg-mul-136.5%
Simplified36.5%
if 3.4999999999999999e-58 < F Initial program 65.3%
Taylor expanded in B around 0 41.6%
Taylor expanded in F around inf 50.4%
Taylor expanded in B around 0 49.0%
Final simplification44.9%
(FPCore (F B x) :precision binary64 (if (<= F 1.7e-56) (/ x (- B)) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.7e-56) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 1.7d-56) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 1.7e-56) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.7e-56: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.7e-56) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 1.7e-56) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.7e-56], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.7 \cdot 10^{-56}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 1.69999999999999991e-56Initial program 76.3%
Taylor expanded in B around 0 45.4%
Taylor expanded in x around inf 29.4%
associate-*r/29.4%
neg-mul-129.4%
Simplified29.4%
if 1.69999999999999991e-56 < F Initial program 65.3%
Taylor expanded in B around 0 41.6%
Taylor expanded in F around inf 50.4%
Taylor expanded in B around 0 49.0%
Final simplification35.9%
(FPCore (F B x) :precision binary64 (if (<= F 115000000000.0) (/ x (- B)) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 115000000000.0) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 115000000000.0d0) then
tmp = x / -b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 115000000000.0) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 115000000000.0: tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 115000000000.0) tmp = Float64(x / Float64(-B)); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 115000000000.0) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 115000000000.0], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 115000000000:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 1.15e11Initial program 78.0%
Taylor expanded in B around 0 47.4%
Taylor expanded in x around inf 29.5%
associate-*r/29.5%
neg-mul-129.5%
Simplified29.5%
if 1.15e11 < F Initial program 58.7%
Taylor expanded in B around 0 35.6%
Taylor expanded in F around inf 52.5%
Taylor expanded in B around 0 52.3%
Taylor expanded in x around 0 38.0%
Final simplification31.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 72.6%
Taylor expanded in B around 0 44.1%
Taylor expanded in F around inf 26.0%
Taylor expanded in B around 0 27.3%
Taylor expanded in x around 0 12.9%
herbie shell --seed 2024089
(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))))))