
(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 25 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 (/ -1.0 (tan B)))))
(if (<= F -1.05e+16)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.75e-34)
(+ t_0 (/ (* F (pow (fma 2.0 x (fma F F 2.0)) -0.5)) (sin B)))
(+ 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.05e+16) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.75e-34) {
tmp = t_0 + ((F * pow(fma(2.0, x, fma(F, F, 2.0)), -0.5)) / sin(B));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.05e+16) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.75e-34) tmp = Float64(t_0 + Float64(Float64(F * (fma(2.0, x, fma(F, F, 2.0)) ^ -0.5)) / sin(B))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return 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.05e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.75e-34], N[(t$95$0 + N[(N[(F * N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.05 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-34}:\\
\;\;\;\;t\_0 + \frac{F \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.05e16Initial program 55.8%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -1.05e16 < F < 1.75e-34Initial program 99.6%
associate-*l/99.7%
+-commutative99.7%
fma-define99.7%
fma-define99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
if 1.75e-34 < F Initial program 59.9%
Taylor expanded in F around inf 99.6%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7e+52)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 50000.0)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -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 <= -7e+52) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 50000.0) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7e+52) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 50000.0) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7e+52], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 50000.0], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(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 -7 \cdot 10^{+52}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 50000:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -7e52Initial program 47.4%
Taylor expanded in F around -inf 99.9%
+-commutative99.9%
unsub-neg99.9%
un-div-inv99.9%
Applied egg-rr99.9%
if -7e52 < F < 5e4Initial program 98.8%
Simplified99.6%
if 5e4 < F Initial program 58.3%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -6e+15)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 50000.0)
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* 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 <= -6e+15) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 50000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (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 <= (-6d+15)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 50000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (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 <= -6e+15) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 50000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x * (Math.cos(B) / Math.sin(B)));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6e+15: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 50000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x * (math.cos(B) / math.sin(B))) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6e+15) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 50000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + 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 <= -6e+15) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 50000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (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, -6e+15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 50000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x * N[(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 -6 \cdot 10^{+15}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 50000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\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 < -6e15Initial program 55.8%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -6e15 < F < 5e4Initial program 99.5%
Taylor expanded in x around 0 99.6%
associate-/l*99.5%
Simplified99.5%
if 5e4 < F Initial program 58.3%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1e+16)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.75e-34)
(+ t_0 (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1e+16) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.75e-34) {
tmp = t_0 + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-1d+16)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.75d-34) then
tmp = t_0 + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -1e+16) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.75e-34) {
tmp = t_0 + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1e+16: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.75e-34: tmp = t_0 + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1e+16) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.75e-34) tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -1e+16) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.75e-34) tmp = t_0 + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.75e-34], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-34}:\\
\;\;\;\;t\_0 + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1e16Initial program 55.8%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -1e16 < F < 1.75e-34Initial program 99.6%
if 1.75e-34 < F Initial program 59.9%
Taylor expanded in F around inf 99.6%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42)
(- (/ -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.42) {
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.42d0)) 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.42) {
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.42: 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.42) 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.42) 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.42], 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.42:\\
\;\;\;\;\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.4199999999999999Initial program 57.2%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -1.4199999999999999 < F < 1.5Initial program 99.5%
Taylor expanded in F around 0 98.2%
Taylor expanded in x around 0 98.3%
+-commutative98.3%
unsub-neg98.3%
associate-/l*98.2%
un-div-inv98.3%
Applied egg-rr98.3%
if 1.5 < F Initial program 58.3%
Taylor expanded in F around inf 99.7%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42)
(- (/ -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.42) {
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.42d0)) 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.42) {
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.42: 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.42) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.5) tmp = Float64(Float64(Float64(F * 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.42) 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.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.5], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.5:\\
\;\;\;\;\frac{F \cdot \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.4199999999999999Initial program 57.2%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -1.4199999999999999 < F < 1.5Initial program 99.5%
Taylor expanded in F around 0 98.2%
Taylor expanded in x around 0 98.3%
div-inv98.4%
Applied egg-rr98.4%
if 1.5 < F Initial program 58.3%
Taylor expanded in F around inf 99.7%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B))))
(t_1 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(t_2 (/ 1.0 (sin B))))
(if (<= F -5.7e+15)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -2.35e-66)
(- (* (/ F (sin B)) t_1) (/ x B))
(if (<= F 1.2e-87)
(+ t_0 (/ (* F (sqrt 0.5)) B))
(if (<= F 1.75e-34) (- (* t_1 (* F t_2)) (/ x B)) (+ t_0 t_2)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_2 = 1.0 / sin(B);
double tmp;
if (F <= -5.7e+15) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -2.35e-66) {
tmp = ((F / sin(B)) * t_1) - (x / B);
} else if (F <= 1.2e-87) {
tmp = t_0 + ((F * sqrt(0.5)) / B);
} else if (F <= 1.75e-34) {
tmp = (t_1 * (F * t_2)) - (x / B);
} else {
tmp = t_0 + t_2;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
t_1 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_2 = 1.0d0 / sin(b)
if (f <= (-5.7d+15)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-2.35d-66)) then
tmp = ((f / sin(b)) * t_1) - (x / b)
else if (f <= 1.2d-87) then
tmp = t_0 + ((f * sqrt(0.5d0)) / b)
else if (f <= 1.75d-34) then
tmp = (t_1 * (f * t_2)) - (x / b)
else
tmp = t_0 + t_2
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 t_1 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_2 = 1.0 / Math.sin(B);
double tmp;
if (F <= -5.7e+15) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -2.35e-66) {
tmp = ((F / Math.sin(B)) * t_1) - (x / B);
} else if (F <= 1.2e-87) {
tmp = t_0 + ((F * Math.sqrt(0.5)) / B);
} else if (F <= 1.75e-34) {
tmp = (t_1 * (F * t_2)) - (x / B);
} else {
tmp = t_0 + t_2;
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_2 = 1.0 / math.sin(B) tmp = 0 if F <= -5.7e+15: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -2.35e-66: tmp = ((F / math.sin(B)) * t_1) - (x / B) elif F <= 1.2e-87: tmp = t_0 + ((F * math.sqrt(0.5)) / B) elif F <= 1.75e-34: tmp = (t_1 * (F * t_2)) - (x / B) else: tmp = t_0 + t_2 return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_2 = Float64(1.0 / sin(B)) tmp = 0.0 if (F <= -5.7e+15) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -2.35e-66) tmp = Float64(Float64(Float64(F / sin(B)) * t_1) - Float64(x / B)); elseif (F <= 1.2e-87) tmp = Float64(t_0 + Float64(Float64(F * sqrt(0.5)) / B)); elseif (F <= 1.75e-34) tmp = Float64(Float64(t_1 * Float64(F * t_2)) - Float64(x / B)); else tmp = Float64(t_0 + t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); t_1 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_2 = 1.0 / sin(B); tmp = 0.0; if (F <= -5.7e+15) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -2.35e-66) tmp = ((F / sin(B)) * t_1) - (x / B); elseif (F <= 1.2e-87) tmp = t_0 + ((F * sqrt(0.5)) / B); elseif (F <= 1.75e-34) tmp = (t_1 * (F * t_2)) - (x / B); else tmp = t_0 + t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.7e+15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.35e-66], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.2e-87], N[(t$95$0 + N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.75e-34], N[(N[(t$95$1 * N[(F * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_2 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -5.7 \cdot 10^{+15}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -2.35 \cdot 10^{-66}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_1 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-87}:\\
\;\;\;\;t\_0 + \frac{F \cdot \sqrt{0.5}}{B}\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-34}:\\
\;\;\;\;t\_1 \cdot \left(F \cdot t\_2\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + t\_2\\
\end{array}
\end{array}
if F < -5.7e15Initial program 55.8%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -5.7e15 < F < -2.35e-66Initial program 99.6%
Taylor expanded in B around 0 94.0%
if -2.35e-66 < F < 1.2e-87Initial program 99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around 0 99.7%
Taylor expanded in B around 0 93.2%
if 1.2e-87 < F < 1.75e-34Initial program 99.5%
Taylor expanded in B around 0 81.3%
div-inv81.4%
Applied egg-rr81.4%
if 1.75e-34 < F Initial program 59.9%
Taylor expanded in F around inf 99.6%
Final simplification96.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))) (t_1 (* F (/ (sqrt 0.5) (sin B)))))
(if (<= F -2.05e+156)
t_0
(if (<= F -4.5e+81)
(- (* F (/ -1.0 (* F B))) (/ x (tan B)))
(if (<= F -0.305)
t_0
(if (<= F -1.02e-66)
t_1
(if (<= F 1.3e-87)
(/ x (- (tan B)))
(if (<= F 2.3e-30) t_1 (- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double t_1 = F * (sqrt(0.5) / sin(B));
double tmp;
if (F <= -2.05e+156) {
tmp = t_0;
} else if (F <= -4.5e+81) {
tmp = (F * (-1.0 / (F * B))) - (x / tan(B));
} else if (F <= -0.305) {
tmp = t_0;
} else if (F <= -1.02e-66) {
tmp = t_1;
} else if (F <= 1.3e-87) {
tmp = x / -tan(B);
} else if (F <= 2.3e-30) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
t_1 = f * (sqrt(0.5d0) / sin(b))
if (f <= (-2.05d+156)) then
tmp = t_0
else if (f <= (-4.5d+81)) then
tmp = (f * ((-1.0d0) / (f * b))) - (x / tan(b))
else if (f <= (-0.305d0)) then
tmp = t_0
else if (f <= (-1.02d-66)) then
tmp = t_1
else if (f <= 1.3d-87) then
tmp = x / -tan(b)
else if (f <= 2.3d-30) then
tmp = t_1
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 / Math.sin(B)) - (x / B);
double t_1 = F * (Math.sqrt(0.5) / Math.sin(B));
double tmp;
if (F <= -2.05e+156) {
tmp = t_0;
} else if (F <= -4.5e+81) {
tmp = (F * (-1.0 / (F * B))) - (x / Math.tan(B));
} else if (F <= -0.305) {
tmp = t_0;
} else if (F <= -1.02e-66) {
tmp = t_1;
} else if (F <= 1.3e-87) {
tmp = x / -Math.tan(B);
} else if (F <= 2.3e-30) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) t_1 = F * (math.sqrt(0.5) / math.sin(B)) tmp = 0 if F <= -2.05e+156: tmp = t_0 elif F <= -4.5e+81: tmp = (F * (-1.0 / (F * B))) - (x / math.tan(B)) elif F <= -0.305: tmp = t_0 elif F <= -1.02e-66: tmp = t_1 elif F <= 1.3e-87: tmp = x / -math.tan(B) elif F <= 2.3e-30: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) t_1 = Float64(F * Float64(sqrt(0.5) / sin(B))) tmp = 0.0 if (F <= -2.05e+156) tmp = t_0; elseif (F <= -4.5e+81) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * B))) - Float64(x / tan(B))); elseif (F <= -0.305) tmp = t_0; elseif (F <= -1.02e-66) tmp = t_1; elseif (F <= 1.3e-87) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 2.3e-30) tmp = t_1; 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 / sin(B)) - (x / B); t_1 = F * (sqrt(0.5) / sin(B)); tmp = 0.0; if (F <= -2.05e+156) tmp = t_0; elseif (F <= -4.5e+81) tmp = (F * (-1.0 / (F * B))) - (x / tan(B)); elseif (F <= -0.305) tmp = t_0; elseif (F <= -1.02e-66) tmp = t_1; elseif (F <= 1.3e-87) tmp = x / -tan(B); elseif (F <= 2.3e-30) tmp = t_1; 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 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.05e+156], t$95$0, If[LessEqual[F, -4.5e+81], N[(N[(F * N[(-1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.305], t$95$0, If[LessEqual[F, -1.02e-66], t$95$1, If[LessEqual[F, 1.3e-87], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 2.3e-30], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
t_1 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{if}\;F \leq -2.05 \cdot 10^{+156}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -4.5 \cdot 10^{+81}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -0.305:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.02 \cdot 10^{-66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-87}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.0500000000000001e156 or -4.50000000000000017e81 < F < -0.304999999999999993Initial program 51.0%
Taylor expanded in B around 0 35.9%
Taylor expanded in F around -inf 83.2%
distribute-lft-in83.2%
mul-1-neg83.2%
unsub-neg83.2%
associate-*r/83.2%
metadata-eval83.2%
Simplified83.2%
if -2.0500000000000001e156 < F < -4.50000000000000017e81Initial program 73.3%
Simplified99.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 94.2%
*-commutative94.2%
Simplified94.2%
if -0.304999999999999993 < F < -1.01999999999999996e-66 or 1.30000000000000001e-87 < F < 2.29999999999999984e-30Initial program 99.5%
Taylor expanded in F around 0 94.4%
Taylor expanded in x around 0 94.5%
Taylor expanded in x around 0 70.2%
associate-*r/70.1%
Simplified70.1%
if -1.01999999999999996e-66 < F < 1.30000000000000001e-87Initial program 99.6%
Taylor expanded in F around -inf 41.4%
Taylor expanded in x around inf 81.2%
mul-1-neg81.2%
associate-/l*81.2%
distribute-rgt-neg-in81.2%
distribute-neg-frac281.2%
Simplified81.2%
add-sqr-sqrt45.0%
sqrt-unprod40.7%
sqr-neg40.7%
sqrt-unprod0.7%
add-sqr-sqrt2.0%
clear-num2.0%
tan-quot2.0%
add-sqr-sqrt1.4%
sqrt-unprod26.4%
sqr-neg26.4%
sqrt-unprod32.2%
add-sqr-sqrt81.3%
neg-sub081.3%
un-div-inv81.4%
Applied egg-rr81.4%
neg-sub081.4%
distribute-frac-neg81.4%
Simplified81.4%
if 2.29999999999999984e-30 < F Initial program 59.4%
Taylor expanded in B around 0 44.2%
Taylor expanded in F around inf 84.3%
Final simplification82.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))) (t_1 (/ (* F (sqrt 0.5)) (sin B))))
(if (<= F -1.95e+156)
t_0
(if (<= F -6.5e+81)
(- (* F (/ -1.0 (* F B))) (/ x (tan B)))
(if (<= F -0.27)
t_0
(if (<= F -9.2e-66)
t_1
(if (<= F 1.25e-87)
(/ x (- (tan B)))
(if (<= F 2.3e-30) t_1 (- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double t_1 = (F * sqrt(0.5)) / sin(B);
double tmp;
if (F <= -1.95e+156) {
tmp = t_0;
} else if (F <= -6.5e+81) {
tmp = (F * (-1.0 / (F * B))) - (x / tan(B));
} else if (F <= -0.27) {
tmp = t_0;
} else if (F <= -9.2e-66) {
tmp = t_1;
} else if (F <= 1.25e-87) {
tmp = x / -tan(B);
} else if (F <= 2.3e-30) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
t_1 = (f * sqrt(0.5d0)) / sin(b)
if (f <= (-1.95d+156)) then
tmp = t_0
else if (f <= (-6.5d+81)) then
tmp = (f * ((-1.0d0) / (f * b))) - (x / tan(b))
else if (f <= (-0.27d0)) then
tmp = t_0
else if (f <= (-9.2d-66)) then
tmp = t_1
else if (f <= 1.25d-87) then
tmp = x / -tan(b)
else if (f <= 2.3d-30) then
tmp = t_1
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 / Math.sin(B)) - (x / B);
double t_1 = (F * Math.sqrt(0.5)) / Math.sin(B);
double tmp;
if (F <= -1.95e+156) {
tmp = t_0;
} else if (F <= -6.5e+81) {
tmp = (F * (-1.0 / (F * B))) - (x / Math.tan(B));
} else if (F <= -0.27) {
tmp = t_0;
} else if (F <= -9.2e-66) {
tmp = t_1;
} else if (F <= 1.25e-87) {
tmp = x / -Math.tan(B);
} else if (F <= 2.3e-30) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) t_1 = (F * math.sqrt(0.5)) / math.sin(B) tmp = 0 if F <= -1.95e+156: tmp = t_0 elif F <= -6.5e+81: tmp = (F * (-1.0 / (F * B))) - (x / math.tan(B)) elif F <= -0.27: tmp = t_0 elif F <= -9.2e-66: tmp = t_1 elif F <= 1.25e-87: tmp = x / -math.tan(B) elif F <= 2.3e-30: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) t_1 = Float64(Float64(F * sqrt(0.5)) / sin(B)) tmp = 0.0 if (F <= -1.95e+156) tmp = t_0; elseif (F <= -6.5e+81) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * B))) - Float64(x / tan(B))); elseif (F <= -0.27) tmp = t_0; elseif (F <= -9.2e-66) tmp = t_1; elseif (F <= 1.25e-87) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 2.3e-30) tmp = t_1; 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 / sin(B)) - (x / B); t_1 = (F * sqrt(0.5)) / sin(B); tmp = 0.0; if (F <= -1.95e+156) tmp = t_0; elseif (F <= -6.5e+81) tmp = (F * (-1.0 / (F * B))) - (x / tan(B)); elseif (F <= -0.27) tmp = t_0; elseif (F <= -9.2e-66) tmp = t_1; elseif (F <= 1.25e-87) tmp = x / -tan(B); elseif (F <= 2.3e-30) tmp = t_1; 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 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.95e+156], t$95$0, If[LessEqual[F, -6.5e+81], N[(N[(F * N[(-1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.27], t$95$0, If[LessEqual[F, -9.2e-66], t$95$1, If[LessEqual[F, 1.25e-87], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 2.3e-30], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
t_1 := \frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{if}\;F \leq -1.95 \cdot 10^{+156}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -6.5 \cdot 10^{+81}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -0.27:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -9.2 \cdot 10^{-66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-87}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.9499999999999999e156 or -6.4999999999999996e81 < F < -0.27000000000000002Initial program 51.0%
Taylor expanded in B around 0 35.9%
Taylor expanded in F around -inf 83.2%
distribute-lft-in83.2%
mul-1-neg83.2%
unsub-neg83.2%
associate-*r/83.2%
metadata-eval83.2%
Simplified83.2%
if -1.9499999999999999e156 < F < -6.4999999999999996e81Initial program 73.3%
Simplified99.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 94.2%
*-commutative94.2%
Simplified94.2%
if -0.27000000000000002 < F < -9.19999999999999967e-66 or 1.25000000000000011e-87 < F < 2.29999999999999984e-30Initial program 99.5%
Taylor expanded in F around 0 94.4%
Taylor expanded in x around 0 94.5%
Taylor expanded in x around 0 70.2%
if -9.19999999999999967e-66 < F < 1.25000000000000011e-87Initial program 99.6%
Taylor expanded in F around -inf 41.4%
Taylor expanded in x around inf 81.2%
mul-1-neg81.2%
associate-/l*81.2%
distribute-rgt-neg-in81.2%
distribute-neg-frac281.2%
Simplified81.2%
add-sqr-sqrt45.0%
sqrt-unprod40.7%
sqr-neg40.7%
sqrt-unprod0.7%
add-sqr-sqrt2.0%
clear-num2.0%
tan-quot2.0%
add-sqr-sqrt1.4%
sqrt-unprod26.4%
sqr-neg26.4%
sqrt-unprod32.2%
add-sqr-sqrt81.3%
neg-sub081.3%
un-div-inv81.4%
Applied egg-rr81.4%
neg-sub081.4%
distribute-frac-neg81.4%
Simplified81.4%
if 2.29999999999999984e-30 < F Initial program 59.4%
Taylor expanded in B around 0 44.2%
Taylor expanded in F around inf 84.3%
Final simplification82.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (/ F (sin B)) (sqrt 0.5)) (/ x B))))
(if (<= F -0.55)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -6e-139)
t_0
(if (<= F 1.1e-121)
(/ x (- (tan B)))
(if (<= F 2.3e-30) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * sqrt(0.5)) - (x / B);
double tmp;
if (F <= -0.55) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -6e-139) {
tmp = t_0;
} else if (F <= 1.1e-121) {
tmp = x / -tan(B);
} else if (F <= 2.3e-30) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f / sin(b)) * sqrt(0.5d0)) - (x / b)
if (f <= (-0.55d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-6d-139)) then
tmp = t_0
else if (f <= 1.1d-121) then
tmp = x / -tan(b)
else if (f <= 2.3d-30) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.sqrt(0.5)) - (x / B);
double tmp;
if (F <= -0.55) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -6e-139) {
tmp = t_0;
} else if (F <= 1.1e-121) {
tmp = x / -Math.tan(B);
} else if (F <= 2.3e-30) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.sqrt(0.5)) - (x / B) tmp = 0 if F <= -0.55: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -6e-139: tmp = t_0 elif F <= 1.1e-121: tmp = x / -math.tan(B) elif F <= 2.3e-30: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * sqrt(0.5)) - Float64(x / B)) tmp = 0.0 if (F <= -0.55) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -6e-139) tmp = t_0; elseif (F <= 1.1e-121) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 2.3e-30) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * sqrt(0.5)) - (x / B); tmp = 0.0; if (F <= -0.55) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -6e-139) tmp = t_0; elseif (F <= 1.1e-121) tmp = x / -tan(B); elseif (F <= 2.3e-30) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.55], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6e-139], t$95$0, If[LessEqual[F, 1.1e-121], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 2.3e-30], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{0.5} - \frac{x}{B}\\
\mathbf{if}\;F \leq -0.55:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -6 \cdot 10^{-139}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-121}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-30}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.55000000000000004Initial program 57.2%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -0.55000000000000004 < F < -5.9999999999999998e-139 or 1.10000000000000011e-121 < F < 2.29999999999999984e-30Initial program 99.6%
Taylor expanded in B around 0 77.2%
Taylor expanded in F around 0 74.1%
Taylor expanded in x around 0 74.0%
if -5.9999999999999998e-139 < F < 1.10000000000000011e-121Initial program 99.5%
Taylor expanded in F around -inf 44.1%
Taylor expanded in x around inf 87.3%
mul-1-neg87.3%
associate-/l*87.2%
distribute-rgt-neg-in87.2%
distribute-neg-frac287.2%
Simplified87.2%
add-sqr-sqrt43.2%
sqrt-unprod38.9%
sqr-neg38.9%
sqrt-unprod0.7%
add-sqr-sqrt1.8%
clear-num1.8%
tan-quot1.8%
add-sqr-sqrt1.3%
sqrt-unprod26.0%
sqr-neg26.0%
sqrt-unprod31.3%
add-sqr-sqrt87.3%
neg-sub087.3%
un-div-inv87.4%
Applied egg-rr87.4%
neg-sub087.4%
distribute-frac-neg87.4%
Simplified87.4%
if 2.29999999999999984e-30 < F Initial program 59.4%
Taylor expanded in B around 0 44.2%
Taylor expanded in F around inf 84.3%
Final simplification87.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (/ F (sin B)) (sqrt 0.5)) (/ x B))))
(if (<= F -0.29)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -5.8e-143)
t_0
(if (<= F 1e-123)
(/ x (- (tan B)))
(if (<= F 1.75e-34)
t_0
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * sqrt(0.5)) - (x / B);
double tmp;
if (F <= -0.29) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -5.8e-143) {
tmp = t_0;
} else if (F <= 1e-123) {
tmp = x / -tan(B);
} else if (F <= 1.75e-34) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f / sin(b)) * sqrt(0.5d0)) - (x / b)
if (f <= (-0.29d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-5.8d-143)) then
tmp = t_0
else if (f <= 1d-123) then
tmp = x / -tan(b)
else if (f <= 1.75d-34) then
tmp = t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.sqrt(0.5)) - (x / B);
double tmp;
if (F <= -0.29) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -5.8e-143) {
tmp = t_0;
} else if (F <= 1e-123) {
tmp = x / -Math.tan(B);
} else if (F <= 1.75e-34) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.sqrt(0.5)) - (x / B) tmp = 0 if F <= -0.29: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -5.8e-143: tmp = t_0 elif F <= 1e-123: tmp = x / -math.tan(B) elif F <= 1.75e-34: tmp = t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * sqrt(0.5)) - Float64(x / B)) tmp = 0.0 if (F <= -0.29) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -5.8e-143) tmp = t_0; elseif (F <= 1e-123) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 1.75e-34) tmp = t_0; else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * sqrt(0.5)) - (x / B); tmp = 0.0; if (F <= -0.29) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -5.8e-143) tmp = t_0; elseif (F <= 1e-123) tmp = x / -tan(B); elseif (F <= 1.75e-34) tmp = t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.8e-143], t$95$0, If[LessEqual[F, 1e-123], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.75e-34], t$95$0, N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{0.5} - \frac{x}{B}\\
\mathbf{if}\;F \leq -0.29:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -5.8 \cdot 10^{-143}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 10^{-123}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-34}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -0.28999999999999998Initial program 57.2%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -0.28999999999999998 < F < -5.8000000000000002e-143 or 1.0000000000000001e-123 < F < 1.75e-34Initial program 99.6%
Taylor expanded in B around 0 78.7%
Taylor expanded in F around 0 75.5%
Taylor expanded in x around 0 75.5%
if -5.8000000000000002e-143 < F < 1.0000000000000001e-123Initial program 99.5%
Taylor expanded in F around -inf 44.1%
Taylor expanded in x around inf 87.3%
mul-1-neg87.3%
associate-/l*87.2%
distribute-rgt-neg-in87.2%
distribute-neg-frac287.2%
Simplified87.2%
add-sqr-sqrt43.2%
sqrt-unprod38.9%
sqr-neg38.9%
sqrt-unprod0.7%
add-sqr-sqrt1.8%
clear-num1.8%
tan-quot1.8%
add-sqr-sqrt1.3%
sqrt-unprod26.0%
sqr-neg26.0%
sqrt-unprod31.3%
add-sqr-sqrt87.3%
neg-sub087.3%
un-div-inv87.4%
Applied egg-rr87.4%
neg-sub087.4%
distribute-frac-neg87.4%
Simplified87.4%
if 1.75e-34 < F Initial program 59.9%
Taylor expanded in F around inf 99.6%
Final simplification91.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (/ F (sin B)) (sqrt 0.5)) (/ x B)))
(t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -0.3)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -5.4e-67)
t_0
(if (<= F 1.1e-87)
(+ t_1 (/ (* F (sqrt 0.5)) B))
(if (<= F 1.75e-34) t_0 (+ t_1 (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * sqrt(0.5)) - (x / B);
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.3) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -5.4e-67) {
tmp = t_0;
} else if (F <= 1.1e-87) {
tmp = t_1 + ((F * sqrt(0.5)) / B);
} else if (F <= 1.75e-34) {
tmp = t_0;
} else {
tmp = t_1 + (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) :: t_1
real(8) :: tmp
t_0 = ((f / sin(b)) * sqrt(0.5d0)) - (x / b)
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-0.3d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-5.4d-67)) then
tmp = t_0
else if (f <= 1.1d-87) then
tmp = t_1 + ((f * sqrt(0.5d0)) / b)
else if (f <= 1.75d-34) then
tmp = t_0
else
tmp = t_1 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.sqrt(0.5)) - (x / B);
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -0.3) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -5.4e-67) {
tmp = t_0;
} else if (F <= 1.1e-87) {
tmp = t_1 + ((F * Math.sqrt(0.5)) / B);
} else if (F <= 1.75e-34) {
tmp = t_0;
} else {
tmp = t_1 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.sqrt(0.5)) - (x / B) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.3: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -5.4e-67: tmp = t_0 elif F <= 1.1e-87: tmp = t_1 + ((F * math.sqrt(0.5)) / B) elif F <= 1.75e-34: tmp = t_0 else: tmp = t_1 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * sqrt(0.5)) - Float64(x / B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.3) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -5.4e-67) tmp = t_0; elseif (F <= 1.1e-87) tmp = Float64(t_1 + Float64(Float64(F * sqrt(0.5)) / B)); elseif (F <= 1.75e-34) tmp = t_0; else tmp = Float64(t_1 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * sqrt(0.5)) - (x / B); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.3) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -5.4e-67) tmp = t_0; elseif (F <= 1.1e-87) tmp = t_1 + ((F * sqrt(0.5)) / B); elseif (F <= 1.75e-34) tmp = t_0; else tmp = t_1 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.3], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.4e-67], t$95$0, If[LessEqual[F, 1.1e-87], N[(t$95$1 + N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.75e-34], t$95$0, N[(t$95$1 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{0.5} - \frac{x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.3:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -5.4 \cdot 10^{-67}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-87}:\\
\;\;\;\;t\_1 + \frac{F \cdot \sqrt{0.5}}{B}\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-34}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -0.299999999999999989Initial program 57.2%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -0.299999999999999989 < F < -5.40000000000000032e-67 or 1.09999999999999994e-87 < F < 1.75e-34Initial program 99.5%
Taylor expanded in B around 0 87.2%
Taylor expanded in F around 0 81.9%
Taylor expanded in x around 0 81.9%
if -5.40000000000000032e-67 < F < 1.09999999999999994e-87Initial program 99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around 0 99.7%
Taylor expanded in B around 0 93.2%
if 1.75e-34 < F Initial program 59.9%
Taylor expanded in F around inf 99.6%
Final simplification95.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))) (t_1 (/ F (sin B))))
(if (<= F -5.7e+15)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -7.8e-65)
(- (* t_1 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 1e-87)
(+ t_0 (/ (* F (sqrt 0.5)) B))
(if (<= F 1.75e-34)
(- (* t_1 (sqrt 0.5)) (/ x B))
(+ t_0 (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = F / sin(B);
double tmp;
if (F <= -5.7e+15) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -7.8e-65) {
tmp = (t_1 * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1e-87) {
tmp = t_0 + ((F * sqrt(0.5)) / B);
} else if (F <= 1.75e-34) {
tmp = (t_1 * sqrt(0.5)) - (x / B);
} 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) :: t_1
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
t_1 = f / sin(b)
if (f <= (-5.7d+15)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-7.8d-65)) then
tmp = (t_1 * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 1d-87) then
tmp = t_0 + ((f * sqrt(0.5d0)) / b)
else if (f <= 1.75d-34) then
tmp = (t_1 * sqrt(0.5d0)) - (x / b)
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 t_1 = F / Math.sin(B);
double tmp;
if (F <= -5.7e+15) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -7.8e-65) {
tmp = (t_1 * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1e-87) {
tmp = t_0 + ((F * Math.sqrt(0.5)) / B);
} else if (F <= 1.75e-34) {
tmp = (t_1 * Math.sqrt(0.5)) - (x / B);
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = F / math.sin(B) tmp = 0 if F <= -5.7e+15: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -7.8e-65: tmp = (t_1 * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 1e-87: tmp = t_0 + ((F * math.sqrt(0.5)) / B) elif F <= 1.75e-34: tmp = (t_1 * math.sqrt(0.5)) - (x / B) 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))) t_1 = Float64(F / sin(B)) tmp = 0.0 if (F <= -5.7e+15) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -7.8e-65) tmp = Float64(Float64(t_1 * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 1e-87) tmp = Float64(t_0 + Float64(Float64(F * sqrt(0.5)) / B)); elseif (F <= 1.75e-34) tmp = Float64(Float64(t_1 * sqrt(0.5)) - Float64(x / B)); 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)); t_1 = F / sin(B); tmp = 0.0; if (F <= -5.7e+15) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -7.8e-65) tmp = (t_1 * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 1e-87) tmp = t_0 + ((F * sqrt(0.5)) / B); elseif (F <= 1.75e-34) tmp = (t_1 * sqrt(0.5)) - (x / B); 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]}, Block[{t$95$1 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.7e+15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.8e-65], N[(N[(t$95$1 * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e-87], N[(t$95$0 + N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.75e-34], N[(N[(t$95$1 * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := \frac{F}{\sin B}\\
\mathbf{if}\;F \leq -5.7 \cdot 10^{+15}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -7.8 \cdot 10^{-65}:\\
\;\;\;\;t\_1 \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 10^{-87}:\\
\;\;\;\;t\_0 + \frac{F \cdot \sqrt{0.5}}{B}\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-34}:\\
\;\;\;\;t\_1 \cdot \sqrt{0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -5.7e15Initial program 55.8%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -5.7e15 < F < -7.8000000000000007e-65Initial program 99.6%
Taylor expanded in B around 0 94.0%
if -7.8000000000000007e-65 < F < 1.00000000000000002e-87Initial program 99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around 0 99.7%
Taylor expanded in B around 0 93.2%
if 1.00000000000000002e-87 < F < 1.75e-34Initial program 99.5%
Taylor expanded in B around 0 81.3%
Taylor expanded in F around 0 81.3%
Taylor expanded in x around 0 81.3%
if 1.75e-34 < F Initial program 59.9%
Taylor expanded in F around inf 99.6%
Final simplification96.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (* F (sqrt 0.5)) (sin B))))
(if (<= F -0.27)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -3e-65)
t_0
(if (<= F 1.15e-87)
(/ x (- (tan B)))
(if (<= F 2.3e-30) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (F * sqrt(0.5)) / sin(B);
double tmp;
if (F <= -0.27) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -3e-65) {
tmp = t_0;
} else if (F <= 1.15e-87) {
tmp = x / -tan(B);
} else if (F <= 2.3e-30) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (f * sqrt(0.5d0)) / sin(b)
if (f <= (-0.27d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-3d-65)) then
tmp = t_0
else if (f <= 1.15d-87) then
tmp = x / -tan(b)
else if (f <= 2.3d-30) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F * Math.sqrt(0.5)) / Math.sin(B);
double tmp;
if (F <= -0.27) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -3e-65) {
tmp = t_0;
} else if (F <= 1.15e-87) {
tmp = x / -Math.tan(B);
} else if (F <= 2.3e-30) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (F * math.sqrt(0.5)) / math.sin(B) tmp = 0 if F <= -0.27: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -3e-65: tmp = t_0 elif F <= 1.15e-87: tmp = x / -math.tan(B) elif F <= 2.3e-30: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(F * sqrt(0.5)) / sin(B)) tmp = 0.0 if (F <= -0.27) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -3e-65) tmp = t_0; elseif (F <= 1.15e-87) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 2.3e-30) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F * sqrt(0.5)) / sin(B); tmp = 0.0; if (F <= -0.27) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -3e-65) tmp = t_0; elseif (F <= 1.15e-87) tmp = x / -tan(B); elseif (F <= 2.3e-30) 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[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.27], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3e-65], t$95$0, If[LessEqual[F, 1.15e-87], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 2.3e-30], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{if}\;F \leq -0.27:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -3 \cdot 10^{-65}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-87}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-30}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.27000000000000002Initial program 57.2%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -0.27000000000000002 < F < -2.99999999999999998e-65 or 1.1500000000000001e-87 < F < 2.29999999999999984e-30Initial program 99.5%
Taylor expanded in F around 0 94.4%
Taylor expanded in x around 0 94.5%
Taylor expanded in x around 0 70.2%
if -2.99999999999999998e-65 < F < 1.1500000000000001e-87Initial program 99.6%
Taylor expanded in F around -inf 41.4%
Taylor expanded in x around inf 81.2%
mul-1-neg81.2%
associate-/l*81.2%
distribute-rgt-neg-in81.2%
distribute-neg-frac281.2%
Simplified81.2%
add-sqr-sqrt45.0%
sqrt-unprod40.7%
sqr-neg40.7%
sqrt-unprod0.7%
add-sqr-sqrt2.0%
clear-num2.0%
tan-quot2.0%
add-sqr-sqrt1.4%
sqrt-unprod26.4%
sqr-neg26.4%
sqrt-unprod32.2%
add-sqr-sqrt81.3%
neg-sub081.3%
un-div-inv81.4%
Applied egg-rr81.4%
neg-sub081.4%
distribute-frac-neg81.4%
Simplified81.4%
if 2.29999999999999984e-30 < F Initial program 59.4%
Taylor expanded in B around 0 44.2%
Taylor expanded in F around inf 84.3%
Final simplification85.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -1.95e+156)
t_0
(if (<= F -6.8e+81)
(- (* x (/ -1.0 (tan B))) (/ 1.0 B))
(if (<= F -1.1e+27)
t_0
(if (<= F 7200000000.0)
(/ x (- (tan B)))
(- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -1.95e+156) {
tmp = t_0;
} else if (F <= -6.8e+81) {
tmp = (x * (-1.0 / tan(B))) - (1.0 / B);
} else if (F <= -1.1e+27) {
tmp = t_0;
} else if (F <= 7200000000.0) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-1.95d+156)) then
tmp = t_0
else if (f <= (-6.8d+81)) then
tmp = (x * ((-1.0d0) / tan(b))) - (1.0d0 / b)
else if (f <= (-1.1d+27)) then
tmp = t_0
else if (f <= 7200000000.0d0) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -1.95e+156) {
tmp = t_0;
} else if (F <= -6.8e+81) {
tmp = (x * (-1.0 / Math.tan(B))) - (1.0 / B);
} else if (F <= -1.1e+27) {
tmp = t_0;
} else if (F <= 7200000000.0) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -1.95e+156: tmp = t_0 elif F <= -6.8e+81: tmp = (x * (-1.0 / math.tan(B))) - (1.0 / B) elif F <= -1.1e+27: tmp = t_0 elif F <= 7200000000.0: tmp = x / -math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -1.95e+156) tmp = t_0; elseif (F <= -6.8e+81) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) - Float64(1.0 / B)); elseif (F <= -1.1e+27) tmp = t_0; elseif (F <= 7200000000.0) tmp = Float64(x / Float64(-tan(B))); 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 / sin(B)) - (x / B); tmp = 0.0; if (F <= -1.95e+156) tmp = t_0; elseif (F <= -6.8e+81) tmp = (x * (-1.0 / tan(B))) - (1.0 / B); elseif (F <= -1.1e+27) tmp = t_0; elseif (F <= 7200000000.0) tmp = x / -tan(B); 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 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.95e+156], t$95$0, If[LessEqual[F, -6.8e+81], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.1e+27], t$95$0, If[LessEqual[F, 7200000000.0], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -1.95 \cdot 10^{+156}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -6.8 \cdot 10^{+81}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} - \frac{1}{B}\\
\mathbf{elif}\;F \leq -1.1 \cdot 10^{+27}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 7200000000:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.9499999999999999e156 or -6.80000000000000005e81 < F < -1.0999999999999999e27Initial program 44.0%
Taylor expanded in B around 0 35.6%
Taylor expanded in F around -inf 89.7%
distribute-lft-in89.7%
mul-1-neg89.7%
unsub-neg89.7%
associate-*r/89.7%
metadata-eval89.7%
Simplified89.7%
if -1.9499999999999999e156 < F < -6.80000000000000005e81Initial program 73.3%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 94.1%
if -1.0999999999999999e27 < F < 7.2e9Initial program 99.5%
Taylor expanded in F around -inf 39.4%
Taylor expanded in x around inf 66.8%
mul-1-neg66.8%
associate-/l*66.8%
distribute-rgt-neg-in66.8%
distribute-neg-frac266.8%
Simplified66.8%
add-sqr-sqrt36.1%
sqrt-unprod33.8%
sqr-neg33.8%
sqrt-unprod1.0%
add-sqr-sqrt2.2%
clear-num2.2%
tan-quot2.2%
add-sqr-sqrt1.3%
sqrt-unprod20.6%
sqr-neg20.6%
sqrt-unprod26.5%
add-sqr-sqrt66.8%
neg-sub066.8%
un-div-inv66.9%
Applied egg-rr66.9%
neg-sub066.9%
distribute-frac-neg66.9%
Simplified66.9%
if 7.2e9 < F Initial program 57.1%
Taylor expanded in B around 0 43.8%
Taylor expanded in F around inf 86.1%
Final simplification77.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -2.15e+156)
t_0
(if (<= F -7e+80)
(- (* F (/ -1.0 (* F B))) (/ x (tan B)))
(if (<= F -1.1e+27)
t_0
(if (<= F 7200000000.0)
(/ x (- (tan B)))
(- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -2.15e+156) {
tmp = t_0;
} else if (F <= -7e+80) {
tmp = (F * (-1.0 / (F * B))) - (x / tan(B));
} else if (F <= -1.1e+27) {
tmp = t_0;
} else if (F <= 7200000000.0) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-2.15d+156)) then
tmp = t_0
else if (f <= (-7d+80)) then
tmp = (f * ((-1.0d0) / (f * b))) - (x / tan(b))
else if (f <= (-1.1d+27)) then
tmp = t_0
else if (f <= 7200000000.0d0) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -2.15e+156) {
tmp = t_0;
} else if (F <= -7e+80) {
tmp = (F * (-1.0 / (F * B))) - (x / Math.tan(B));
} else if (F <= -1.1e+27) {
tmp = t_0;
} else if (F <= 7200000000.0) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -2.15e+156: tmp = t_0 elif F <= -7e+80: tmp = (F * (-1.0 / (F * B))) - (x / math.tan(B)) elif F <= -1.1e+27: tmp = t_0 elif F <= 7200000000.0: tmp = x / -math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -2.15e+156) tmp = t_0; elseif (F <= -7e+80) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * B))) - Float64(x / tan(B))); elseif (F <= -1.1e+27) tmp = t_0; elseif (F <= 7200000000.0) tmp = Float64(x / Float64(-tan(B))); 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 / sin(B)) - (x / B); tmp = 0.0; if (F <= -2.15e+156) tmp = t_0; elseif (F <= -7e+80) tmp = (F * (-1.0 / (F * B))) - (x / tan(B)); elseif (F <= -1.1e+27) tmp = t_0; elseif (F <= 7200000000.0) tmp = x / -tan(B); 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 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.15e+156], t$95$0, If[LessEqual[F, -7e+80], N[(N[(F * N[(-1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.1e+27], t$95$0, If[LessEqual[F, 7200000000.0], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -2.15 \cdot 10^{+156}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -7 \cdot 10^{+80}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.1 \cdot 10^{+27}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 7200000000:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.14999999999999993e156 or -6.99999999999999987e80 < F < -1.0999999999999999e27Initial program 44.0%
Taylor expanded in B around 0 35.6%
Taylor expanded in F around -inf 89.7%
distribute-lft-in89.7%
mul-1-neg89.7%
unsub-neg89.7%
associate-*r/89.7%
metadata-eval89.7%
Simplified89.7%
if -2.14999999999999993e156 < F < -6.99999999999999987e80Initial program 73.3%
Simplified99.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 94.2%
*-commutative94.2%
Simplified94.2%
if -1.0999999999999999e27 < F < 7.2e9Initial program 99.5%
Taylor expanded in F around -inf 39.4%
Taylor expanded in x around inf 66.8%
mul-1-neg66.8%
associate-/l*66.8%
distribute-rgt-neg-in66.8%
distribute-neg-frac266.8%
Simplified66.8%
add-sqr-sqrt36.1%
sqrt-unprod33.8%
sqr-neg33.8%
sqrt-unprod1.0%
add-sqr-sqrt2.2%
clear-num2.2%
tan-quot2.2%
add-sqr-sqrt1.3%
sqrt-unprod20.6%
sqr-neg20.6%
sqrt-unprod26.5%
add-sqr-sqrt66.8%
neg-sub066.8%
un-div-inv66.9%
Applied egg-rr66.9%
neg-sub066.9%
distribute-frac-neg66.9%
Simplified66.9%
if 7.2e9 < F Initial program 57.1%
Taylor expanded in B around 0 43.8%
Taylor expanded in F around inf 86.1%
Final simplification77.7%
(FPCore (F B x) :precision binary64 (if (or (<= F -3.8e+113) (and (not (<= F -6.8e+81)) (<= F -1.12e+27))) (/ -1.0 (sin B)) (/ x (- (tan B)))))
double code(double F, double B, double x) {
double tmp;
if ((F <= -3.8e+113) || (!(F <= -6.8e+81) && (F <= -1.12e+27))) {
tmp = -1.0 / sin(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 <= (-3.8d+113)) .or. (.not. (f <= (-6.8d+81))) .and. (f <= (-1.12d+27))) then
tmp = (-1.0d0) / sin(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 <= -3.8e+113) || (!(F <= -6.8e+81) && (F <= -1.12e+27))) {
tmp = -1.0 / Math.sin(B);
} else {
tmp = x / -Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (F <= -3.8e+113) or (not (F <= -6.8e+81) and (F <= -1.12e+27)): tmp = -1.0 / math.sin(B) else: tmp = x / -math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if ((F <= -3.8e+113) || (!(F <= -6.8e+81) && (F <= -1.12e+27))) tmp = Float64(-1.0 / sin(B)); else tmp = Float64(x / Float64(-tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((F <= -3.8e+113) || (~((F <= -6.8e+81)) && (F <= -1.12e+27))) tmp = -1.0 / sin(B); else tmp = x / -tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[F, -3.8e+113], And[N[Not[LessEqual[F, -6.8e+81]], $MachinePrecision], LessEqual[F, -1.12e+27]]], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.8 \cdot 10^{+113} \lor \neg \left(F \leq -6.8 \cdot 10^{+81}\right) \land F \leq -1.12 \cdot 10^{+27}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\end{array}
\end{array}
if F < -3.8000000000000003e113 or -6.80000000000000005e81 < F < -1.12e27Initial program 49.5%
Taylor expanded in B around 0 39.3%
Taylor expanded in F around -inf 88.3%
distribute-lft-in88.3%
mul-1-neg88.3%
unsub-neg88.3%
associate-*r/88.3%
metadata-eval88.3%
Simplified88.3%
Taylor expanded in B around inf 75.8%
if -3.8000000000000003e113 < F < -6.80000000000000005e81 or -1.12e27 < F Initial program 84.4%
Taylor expanded in F around -inf 39.1%
Taylor expanded in x around inf 56.9%
mul-1-neg56.9%
associate-/l*56.8%
distribute-rgt-neg-in56.8%
distribute-neg-frac256.8%
Simplified56.8%
add-sqr-sqrt30.5%
sqrt-unprod28.9%
sqr-neg28.9%
sqrt-unprod0.9%
add-sqr-sqrt2.3%
clear-num2.3%
tan-quot2.3%
add-sqr-sqrt1.2%
sqrt-unprod17.2%
sqr-neg17.2%
sqrt-unprod22.8%
add-sqr-sqrt56.8%
neg-sub056.8%
un-div-inv56.9%
Applied egg-rr56.9%
neg-sub056.9%
distribute-frac-neg56.9%
Simplified56.9%
Final simplification60.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ -1.0 (sin B))))
(if (<= F -3.8e+152)
t_0
(if (<= F -3.5e+81)
(/ (- -1.0 x) B)
(if (<= F -3.2e-5)
t_0
(if (<= F 3.2e+46) (/ x (- B)) (/ (+ x 1.0) B)))))))
double code(double F, double B, double x) {
double t_0 = -1.0 / sin(B);
double tmp;
if (F <= -3.8e+152) {
tmp = t_0;
} else if (F <= -3.5e+81) {
tmp = (-1.0 - x) / B;
} else if (F <= -3.2e-5) {
tmp = t_0;
} else if (F <= 3.2e+46) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (-1.0d0) / sin(b)
if (f <= (-3.8d+152)) then
tmp = t_0
else if (f <= (-3.5d+81)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-3.2d-5)) then
tmp = t_0
else if (f <= 3.2d+46) then
tmp = x / -b
else
tmp = (x + 1.0d0) / b
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 tmp;
if (F <= -3.8e+152) {
tmp = t_0;
} else if (F <= -3.5e+81) {
tmp = (-1.0 - x) / B;
} else if (F <= -3.2e-5) {
tmp = t_0;
} else if (F <= 3.2e+46) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): t_0 = -1.0 / math.sin(B) tmp = 0 if F <= -3.8e+152: tmp = t_0 elif F <= -3.5e+81: tmp = (-1.0 - x) / B elif F <= -3.2e-5: tmp = t_0 elif F <= 3.2e+46: tmp = x / -B else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) t_0 = Float64(-1.0 / sin(B)) tmp = 0.0 if (F <= -3.8e+152) tmp = t_0; elseif (F <= -3.5e+81) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -3.2e-5) tmp = t_0; elseif (F <= 3.2e+46) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -1.0 / sin(B); tmp = 0.0; if (F <= -3.8e+152) tmp = t_0; elseif (F <= -3.5e+81) tmp = (-1.0 - x) / B; elseif (F <= -3.2e-5) tmp = t_0; elseif (F <= 3.2e+46) tmp = x / -B; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.8e+152], t$95$0, If[LessEqual[F, -3.5e+81], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -3.2e-5], t$95$0, If[LessEqual[F, 3.2e+46], N[(x / (-B)), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B}\\
\mathbf{if}\;F \leq -3.8 \cdot 10^{+152}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -3.5 \cdot 10^{+81}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -3.2 \cdot 10^{-5}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{+46}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < -3.8e152 or -3.5e81 < F < -3.19999999999999986e-5Initial program 54.8%
Taylor expanded in B around 0 39.0%
Taylor expanded in F around -inf 77.5%
distribute-lft-in77.5%
mul-1-neg77.5%
unsub-neg77.5%
associate-*r/77.5%
metadata-eval77.5%
Simplified77.5%
Taylor expanded in B around inf 71.5%
if -3.8e152 < F < -3.5e81Initial program 71.8%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 66.8%
mul-1-neg66.8%
distribute-neg-frac266.8%
Simplified66.8%
Taylor expanded in B around 0 66.8%
associate-*r/66.8%
distribute-lft-in66.8%
metadata-eval66.8%
neg-mul-166.8%
unsub-neg66.8%
Simplified66.8%
if -3.19999999999999986e-5 < F < 3.1999999999999998e46Initial program 98.8%
Taylor expanded in F around -inf 38.2%
Taylor expanded in B around 0 26.0%
mul-1-neg26.0%
distribute-neg-frac226.0%
Simplified26.0%
Taylor expanded in x around inf 39.5%
mul-1-neg39.5%
distribute-neg-frac239.5%
Simplified39.5%
if 3.1999999999999998e46 < F Initial program 49.9%
Taylor expanded in F around -inf 30.1%
Taylor expanded in B around 0 17.3%
mul-1-neg17.3%
distribute-neg-frac217.3%
Simplified17.3%
*-un-lft-identity17.3%
+-commutative17.3%
add-sqr-sqrt9.0%
sqrt-unprod18.2%
sqr-neg18.2%
sqrt-prod11.6%
add-sqr-sqrt26.7%
Applied egg-rr26.7%
*-lft-identity26.7%
+-commutative26.7%
Simplified26.7%
Final simplification44.8%
(FPCore (F B x) :precision binary64 (if (<= F -1.1e+27) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 7200000000.0) (/ x (- (tan B))) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e+27) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 7200000000.0) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.1d+27)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 7200000000.0d0) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e+27) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 7200000000.0) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.1e+27: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 7200000000.0: tmp = x / -math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.1e+27) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 7200000000.0) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.1e+27) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 7200000000.0) tmp = x / -tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.1e+27], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7200000000.0], N[(x / (-N[Tan[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.1 \cdot 10^{+27}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7200000000:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.0999999999999999e27Initial program 52.9%
Taylor expanded in B around 0 37.4%
Taylor expanded in F around -inf 83.1%
distribute-lft-in83.1%
mul-1-neg83.1%
unsub-neg83.1%
associate-*r/83.1%
metadata-eval83.1%
Simplified83.1%
if -1.0999999999999999e27 < F < 7.2e9Initial program 99.5%
Taylor expanded in F around -inf 39.4%
Taylor expanded in x around inf 66.8%
mul-1-neg66.8%
associate-/l*66.8%
distribute-rgt-neg-in66.8%
distribute-neg-frac266.8%
Simplified66.8%
add-sqr-sqrt36.1%
sqrt-unprod33.8%
sqr-neg33.8%
sqrt-unprod1.0%
add-sqr-sqrt2.2%
clear-num2.2%
tan-quot2.2%
add-sqr-sqrt1.3%
sqrt-unprod20.6%
sqr-neg20.6%
sqrt-unprod26.5%
add-sqr-sqrt66.8%
neg-sub066.8%
un-div-inv66.9%
Applied egg-rr66.9%
neg-sub066.9%
distribute-frac-neg66.9%
Simplified66.9%
if 7.2e9 < F Initial program 57.1%
Taylor expanded in B around 0 43.8%
Taylor expanded in F around inf 86.1%
Final simplification75.9%
(FPCore (F B x) :precision binary64 (if (<= F -1.1e+27) (- (/ -1.0 (sin B)) (/ x B)) (/ x (- (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e+27) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = x / -tan(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.1d+27)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = x / -tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e+27) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = x / -Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.1e+27: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = x / -math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.1e+27) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(x / Float64(-tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.1e+27) tmp = (-1.0 / sin(B)) - (x / B); else tmp = x / -tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.1e+27], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.1 \cdot 10^{+27}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\end{array}
\end{array}
if F < -1.0999999999999999e27Initial program 52.9%
Taylor expanded in B around 0 37.4%
Taylor expanded in F around -inf 83.1%
distribute-lft-in83.1%
mul-1-neg83.1%
unsub-neg83.1%
associate-*r/83.1%
metadata-eval83.1%
Simplified83.1%
if -1.0999999999999999e27 < F Initial program 84.4%
Taylor expanded in F around -inf 37.3%
Taylor expanded in x around inf 55.6%
mul-1-neg55.6%
associate-/l*55.6%
distribute-rgt-neg-in55.6%
distribute-neg-frac255.6%
Simplified55.6%
add-sqr-sqrt29.4%
sqrt-unprod27.8%
sqr-neg27.8%
sqrt-unprod0.9%
add-sqr-sqrt2.4%
clear-num2.4%
tan-quot2.4%
add-sqr-sqrt1.2%
sqrt-unprod16.7%
sqr-neg16.7%
sqrt-unprod22.4%
add-sqr-sqrt55.6%
neg-sub055.6%
un-div-inv55.7%
Applied egg-rr55.7%
neg-sub055.7%
distribute-frac-neg55.7%
Simplified55.7%
Final simplification62.0%
(FPCore (F B x)
:precision binary64
(if (<= F -5.8e-32)
(+
(+
(* B -0.16666666666666666)
(* x (+ (* B 0.3333333333333333) (/ -1.0 B))))
(/ -1.0 B))
(if (<= F 4.8e+48) (/ x (- B)) (/ (+ x 1.0) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.8e-32) {
tmp = ((B * -0.16666666666666666) + (x * ((B * 0.3333333333333333) + (-1.0 / B)))) + (-1.0 / B);
} else if (F <= 4.8e+48) {
tmp = x / -B;
} else {
tmp = (x + 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 <= (-5.8d-32)) then
tmp = ((b * (-0.16666666666666666d0)) + (x * ((b * 0.3333333333333333d0) + ((-1.0d0) / b)))) + ((-1.0d0) / b)
else if (f <= 4.8d+48) then
tmp = x / -b
else
tmp = (x + 1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.8e-32) {
tmp = ((B * -0.16666666666666666) + (x * ((B * 0.3333333333333333) + (-1.0 / B)))) + (-1.0 / B);
} else if (F <= 4.8e+48) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.8e-32: tmp = ((B * -0.16666666666666666) + (x * ((B * 0.3333333333333333) + (-1.0 / B)))) + (-1.0 / B) elif F <= 4.8e+48: tmp = x / -B else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.8e-32) tmp = Float64(Float64(Float64(B * -0.16666666666666666) + Float64(x * Float64(Float64(B * 0.3333333333333333) + Float64(-1.0 / B)))) + Float64(-1.0 / B)); elseif (F <= 4.8e+48) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.8e-32) tmp = ((B * -0.16666666666666666) + (x * ((B * 0.3333333333333333) + (-1.0 / B)))) + (-1.0 / B); elseif (F <= 4.8e+48) tmp = x / -B; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.8e-32], N[(N[(N[(B * -0.16666666666666666), $MachinePrecision] + N[(x * N[(N[(B * 0.3333333333333333), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.8e+48], N[(x / (-B)), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.8 \cdot 10^{-32}:\\
\;\;\;\;\left(B \cdot -0.16666666666666666 + x \cdot \left(B \cdot 0.3333333333333333 + \frac{-1}{B}\right)\right) + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{+48}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < -5.79999999999999991e-32Initial program 61.3%
Taylor expanded in F around -inf 92.5%
Taylor expanded in B around 0 50.0%
Taylor expanded in x around 0 50.2%
if -5.79999999999999991e-32 < F < 4.8000000000000002e48Initial program 98.8%
Taylor expanded in F around -inf 38.4%
Taylor expanded in B around 0 26.1%
mul-1-neg26.1%
distribute-neg-frac226.1%
Simplified26.1%
Taylor expanded in x around inf 40.1%
mul-1-neg40.1%
distribute-neg-frac240.1%
Simplified40.1%
if 4.8000000000000002e48 < F Initial program 49.9%
Taylor expanded in F around -inf 30.1%
Taylor expanded in B around 0 17.3%
mul-1-neg17.3%
distribute-neg-frac217.3%
Simplified17.3%
*-un-lft-identity17.3%
+-commutative17.3%
add-sqr-sqrt9.0%
sqrt-unprod18.2%
sqr-neg18.2%
sqrt-prod11.6%
add-sqr-sqrt26.7%
Applied egg-rr26.7%
*-lft-identity26.7%
+-commutative26.7%
Simplified26.7%
Final simplification39.9%
(FPCore (F B x) :precision binary64 (if (<= F -3.2e-5) (/ -1.0 B) (if (<= F 5.2e+44) (/ x (- B)) (/ (+ x 1.0) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.2e-5) {
tmp = -1.0 / B;
} else if (F <= 5.2e+44) {
tmp = x / -B;
} else {
tmp = (x + 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 <= (-3.2d-5)) then
tmp = (-1.0d0) / b
else if (f <= 5.2d+44) then
tmp = x / -b
else
tmp = (x + 1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.2e-5) {
tmp = -1.0 / B;
} else if (F <= 5.2e+44) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.2e-5: tmp = -1.0 / B elif F <= 5.2e+44: tmp = x / -B else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.2e-5) tmp = Float64(-1.0 / B); elseif (F <= 5.2e+44) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.2e-5) tmp = -1.0 / B; elseif (F <= 5.2e+44) tmp = x / -B; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.2e-5], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 5.2e+44], N[(x / (-B)), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{+44}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < -3.19999999999999986e-5Initial program 59.1%
Taylor expanded in F around -inf 96.0%
Taylor expanded in B around 0 51.5%
mul-1-neg51.5%
distribute-neg-frac251.5%
Simplified51.5%
Taylor expanded in x around 0 38.4%
if -3.19999999999999986e-5 < F < 5.1999999999999998e44Initial program 98.8%
Taylor expanded in F around -inf 38.2%
Taylor expanded in B around 0 26.0%
mul-1-neg26.0%
distribute-neg-frac226.0%
Simplified26.0%
Taylor expanded in x around inf 39.5%
mul-1-neg39.5%
distribute-neg-frac239.5%
Simplified39.5%
if 5.1999999999999998e44 < F Initial program 49.9%
Taylor expanded in F around -inf 30.1%
Taylor expanded in B around 0 17.3%
mul-1-neg17.3%
distribute-neg-frac217.3%
Simplified17.3%
*-un-lft-identity17.3%
+-commutative17.3%
add-sqr-sqrt9.0%
sqrt-unprod18.2%
sqr-neg18.2%
sqrt-prod11.6%
add-sqr-sqrt26.7%
Applied egg-rr26.7%
*-lft-identity26.7%
+-commutative26.7%
Simplified26.7%
Final simplification36.3%
(FPCore (F B x) :precision binary64 (if (<= F -1.55e-28) (/ (- -1.0 x) B) (if (<= F 3.6e+45) (/ x (- B)) (/ (+ x 1.0) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.55e-28) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.6e+45) {
tmp = x / -B;
} else {
tmp = (x + 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 <= (-1.55d-28)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3.6d+45) then
tmp = x / -b
else
tmp = (x + 1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.55e-28) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.6e+45) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.55e-28: tmp = (-1.0 - x) / B elif F <= 3.6e+45: tmp = x / -B else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.55e-28) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.6e+45) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.55e-28) tmp = (-1.0 - x) / B; elseif (F <= 3.6e+45) tmp = x / -B; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.55e-28], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.6e+45], N[(x / (-B)), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.55 \cdot 10^{-28}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{+45}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < -1.54999999999999996e-28Initial program 61.3%
Taylor expanded in F around -inf 92.5%
Taylor expanded in B around 0 49.9%
mul-1-neg49.9%
distribute-neg-frac249.9%
Simplified49.9%
Taylor expanded in B around 0 49.9%
associate-*r/49.9%
distribute-lft-in49.9%
metadata-eval49.9%
neg-mul-149.9%
unsub-neg49.9%
Simplified49.9%
if -1.54999999999999996e-28 < F < 3.6e45Initial program 98.8%
Taylor expanded in F around -inf 38.4%
Taylor expanded in B around 0 26.1%
mul-1-neg26.1%
distribute-neg-frac226.1%
Simplified26.1%
Taylor expanded in x around inf 40.1%
mul-1-neg40.1%
distribute-neg-frac240.1%
Simplified40.1%
if 3.6e45 < F Initial program 49.9%
Taylor expanded in F around -inf 30.1%
Taylor expanded in B around 0 17.3%
mul-1-neg17.3%
distribute-neg-frac217.3%
Simplified17.3%
*-un-lft-identity17.3%
+-commutative17.3%
add-sqr-sqrt9.0%
sqrt-unprod18.2%
sqr-neg18.2%
sqrt-prod11.6%
add-sqr-sqrt26.7%
Applied egg-rr26.7%
*-lft-identity26.7%
+-commutative26.7%
Simplified26.7%
Final simplification39.8%
(FPCore (F B x) :precision binary64 (if (<= F -3.2e-5) (/ -1.0 B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.2e-5) {
tmp = -1.0 / 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 <= (-3.2d-5)) then
tmp = (-1.0d0) / 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 <= -3.2e-5) {
tmp = -1.0 / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.2e-5: tmp = -1.0 / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.2e-5) tmp = Float64(-1.0 / B); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.2e-5) tmp = -1.0 / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.2e-5], N[(-1.0 / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -3.19999999999999986e-5Initial program 59.1%
Taylor expanded in F around -inf 96.0%
Taylor expanded in B around 0 51.5%
mul-1-neg51.5%
distribute-neg-frac251.5%
Simplified51.5%
Taylor expanded in x around 0 38.4%
if -3.19999999999999986e-5 < F Initial program 83.7%
Taylor expanded in F around -inf 35.7%
Taylor expanded in B around 0 23.3%
mul-1-neg23.3%
distribute-neg-frac223.3%
Simplified23.3%
Taylor expanded in x around inf 32.6%
mul-1-neg32.6%
distribute-neg-frac232.6%
Simplified32.6%
Final simplification34.2%
(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 77.2%
Taylor expanded in F around -inf 51.7%
Taylor expanded in B around 0 30.8%
mul-1-neg30.8%
distribute-neg-frac230.8%
Simplified30.8%
Taylor expanded in x around 0 13.2%
Final simplification13.2%
herbie shell --seed 2024112
(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))))))