
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(if (<= F -1.5e+36)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.55e+25)
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(/ (* x (cos B)) (sin B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e+36) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.55e+25) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x * cos(B)) / sin(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.5d+36)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.55d+25) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - ((x * cos(b)) / sin(b))
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e+36) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.55e+25) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x * Math.cos(B)) / Math.sin(B));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.5e+36: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.55e+25: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x * math.cos(B)) / math.sin(B)) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.5e+36) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.55e+25) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(Float64(x * cos(B)) / sin(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.5e+36) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.55e+25) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - ((x * cos(B)) / sin(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.5e+36], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.55e+25], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.5 \cdot 10^{+36}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{+25}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.5e36Initial program 54.4%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.8%
Applied egg-rr99.8%
if -1.5e36 < F < 1.5499999999999999e25Initial program 99.4%
Taylor expanded in x around 0 99.6%
if 1.5499999999999999e25 < F Initial program 50.1%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.1e+36)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2e+25)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.1e+36) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2e+25) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.1d+36)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2d+25) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.1e+36) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2e+25) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.1e+36: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2e+25: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.1e+36) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2e+25) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - t_0); else tmp = Float64(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.1e+36) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2e+25) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.1e+36], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2e+25], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(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.1 \cdot 10^{+36}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 2 \cdot 10^{+25}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.1e36Initial program 54.4%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.8%
Applied egg-rr99.8%
if -1.1e36 < F < 2.00000000000000018e25Initial program 99.4%
expm1-log1p-u73.7%
expm1-udef57.1%
div-inv57.1%
Applied egg-rr57.1%
expm1-def73.7%
expm1-log1p99.5%
Simplified99.5%
if 2.00000000000000018e25 < F Initial program 50.1%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.4)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.7e-10)
(-
(* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))
(* x (/ 1.0 (tan B))))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.7e-10) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x * (1.0 / tan(B)));
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.7d-10) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x * (1.0d0 / tan(b)))
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.7e-10) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x * (1.0 / Math.tan(B)));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.7e-10: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x * (1.0 / math.tan(B))) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.7e-10) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x * Float64(1.0 / tan(B)))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.7e-10) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x * (1.0 / tan(B))); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-10], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-10}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 60.4%
Taylor expanded in F around -inf 96.4%
+-commutative96.4%
unsub-neg96.4%
un-div-inv96.5%
Applied egg-rr96.5%
if -1.3999999999999999 < F < 1.70000000000000007e-10Initial program 99.4%
Taylor expanded in F around 0 99.4%
if 1.70000000000000007e-10 < F Initial program 53.6%
Taylor expanded in F around inf 98.9%
Final simplification98.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.95)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.7e-10)
(+ t_0 (/ 1.0 (* (/ (sin B) F) (sqrt (+ 2.0 (* x 2.0))))))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.95) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.7e-10) {
tmp = t_0 + (1.0 / ((sin(B) / F) * sqrt((2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-1.95d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.7d-10) then
tmp = t_0 + (1.0d0 / ((sin(b) / f) * sqrt((2.0d0 + (x * 2.0d0)))))
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -1.95) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.7e-10) {
tmp = t_0 + (1.0 / ((Math.sin(B) / F) * Math.sqrt((2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1.95: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.7e-10: tmp = t_0 + (1.0 / ((math.sin(B) / F) * math.sqrt((2.0 + (x * 2.0))))) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.95) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.7e-10) tmp = Float64(t_0 + Float64(1.0 / Float64(Float64(sin(B) / F) * sqrt(Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -1.95) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.7e-10) tmp = t_0 + (1.0 / ((sin(B) / F) * sqrt((2.0 + (x * 2.0))))); else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.95], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-10], N[(t$95$0 + N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.95:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-10}:\\
\;\;\;\;t_0 + \frac{1}{\frac{\sin B}{F} \cdot \sqrt{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.94999999999999996Initial program 60.4%
Taylor expanded in F around -inf 96.4%
+-commutative96.4%
unsub-neg96.4%
un-div-inv96.5%
Applied egg-rr96.5%
if -1.94999999999999996 < F < 1.70000000000000007e-10Initial program 99.4%
associate-*l/99.4%
clear-num99.4%
+-commutative99.4%
*-commutative99.4%
fma-udef99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
fma-def99.4%
fma-udef99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Applied egg-rr99.4%
Taylor expanded in F around 0 99.5%
if 1.70000000000000007e-10 < F Initial program 53.6%
Taylor expanded in F around inf 98.9%
Final simplification98.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ (sin B) F))
(+ (/ x B) (* -0.3333333333333333 (* B x))))))
(if (<= F -0.96)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1e-93)
t_0
(if (<= F 2.75e-132)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 1.7e-10)
t_0
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = (sqrt((1.0 / (2.0 + (x * 2.0)))) / (sin(B) / F)) - ((x / B) + (-0.3333333333333333 * (B * x)));
double tmp;
if (F <= -0.96) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1e-93) {
tmp = t_0;
} else if (F <= 2.75e-132) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 1.7e-10) {
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 = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / (sin(b) / f)) - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
if (f <= (-0.96d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1d-93)) then
tmp = t_0
else if (f <= 2.75d-132) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 1.7d-10) 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 = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / (Math.sin(B) / F)) - ((x / B) + (-0.3333333333333333 * (B * x)));
double tmp;
if (F <= -0.96) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1e-93) {
tmp = t_0;
} else if (F <= 2.75e-132) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 1.7e-10) {
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 = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / (math.sin(B) / F)) - ((x / B) + (-0.3333333333333333 * (B * x))) tmp = 0 if F <= -0.96: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1e-93: tmp = t_0 elif F <= 2.75e-132: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 1.7e-10: 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(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / Float64(sin(B) / F)) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))) tmp = 0.0 if (F <= -0.96) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1e-93) tmp = t_0; elseif (F <= 2.75e-132) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 1.7e-10) 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 = (sqrt((1.0 / (2.0 + (x * 2.0)))) / (sin(B) / F)) - ((x / B) + (-0.3333333333333333 * (B * x))); tmp = 0.0; if (F <= -0.96) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1e-93) tmp = t_0; elseif (F <= 2.75e-132) tmp = (x * cos(B)) / -sin(B); elseif (F <= 1.7e-10) 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[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.96], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1e-93], t$95$0, If[LessEqual[F, 2.75e-132], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.7e-10], 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{\sqrt{\frac{1}{2 + x \cdot 2}}}{\frac{\sin B}{F}} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\mathbf{if}\;F \leq -0.96:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1 \cdot 10^{-93}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.75 \cdot 10^{-132}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-10}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -0.95999999999999996Initial program 60.4%
Taylor expanded in F around -inf 96.4%
+-commutative96.4%
unsub-neg96.4%
un-div-inv96.5%
Applied egg-rr96.5%
if -0.95999999999999996 < F < -9.999999999999999e-94 or 2.75e-132 < F < 1.70000000000000007e-10Initial program 99.4%
Taylor expanded in B around 0 85.4%
*-commutative85.4%
clear-num85.3%
un-div-inv85.4%
+-commutative85.4%
fma-def85.4%
fma-def85.4%
metadata-eval85.4%
metadata-eval85.4%
Applied egg-rr85.4%
Taylor expanded in F around 0 85.4%
if -9.999999999999999e-94 < F < 2.75e-132Initial program 99.5%
Taylor expanded in F around -inf 37.7%
Taylor expanded in x around inf 76.4%
associate-/l*76.4%
associate-*r/76.4%
neg-mul-176.4%
associate-/l*76.4%
associate-*l/76.3%
*-commutative76.3%
Simplified76.3%
*-commutative76.3%
frac-2neg76.3%
associate-*l/76.4%
remove-double-neg76.4%
Applied egg-rr76.4%
if 1.70000000000000007e-10 < F Initial program 53.6%
Taylor expanded in F around inf 98.9%
Final simplification89.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(/ x B))))
(if (<= F -3.6e+14)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -2.4e-134)
t_0
(if (<= F 8.5e-136)
(/ x (/ (- (sin B)) (cos B)))
(if (<= F 1.55e+25)
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)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
double tmp;
if (F <= -3.6e+14) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -2.4e-134) {
tmp = t_0;
} else if (F <= 8.5e-136) {
tmp = x / (-sin(B) / cos(B));
} else if (F <= 1.55e+25) {
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)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
if (f <= (-3.6d+14)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-2.4d-134)) then
tmp = t_0
else if (f <= 8.5d-136) then
tmp = x / (-sin(b) / cos(b))
else if (f <= 1.55d+25) 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.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
double tmp;
if (F <= -3.6e+14) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -2.4e-134) {
tmp = t_0;
} else if (F <= 8.5e-136) {
tmp = x / (-Math.sin(B) / Math.cos(B));
} else if (F <= 1.55e+25) {
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.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B) tmp = 0 if F <= -3.6e+14: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -2.4e-134: tmp = t_0 elif F <= 8.5e-136: tmp = x / (-math.sin(B) / math.cos(B)) elif F <= 1.55e+25: 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)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) tmp = 0.0 if (F <= -3.6e+14) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -2.4e-134) tmp = t_0; elseif (F <= 8.5e-136) tmp = Float64(x / Float64(Float64(-sin(B)) / cos(B))); elseif (F <= 1.55e+25) 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)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B); tmp = 0.0; if (F <= -3.6e+14) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -2.4e-134) tmp = t_0; elseif (F <= 8.5e-136) tmp = x / (-sin(B) / cos(B)); elseif (F <= 1.55e+25) 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[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.6e+14], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.4e-134], t$95$0, If[LessEqual[F, 8.5e-136], N[(x / N[((-N[Sin[B], $MachinePrecision]) / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.55e+25], 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 {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{if}\;F \leq -3.6 \cdot 10^{+14}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -2.4 \cdot 10^{-134}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-136}:\\
\;\;\;\;\frac{x}{\frac{-\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{+25}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -3.6e14Initial program 57.3%
Taylor expanded in F around -inf 99.6%
+-commutative99.6%
unsub-neg99.6%
un-div-inv99.8%
Applied egg-rr99.8%
if -3.6e14 < F < -2.4000000000000001e-134 or 8.49999999999999973e-136 < F < 1.5499999999999999e25Initial program 99.4%
Taylor expanded in B around 0 91.6%
if -2.4000000000000001e-134 < F < 8.49999999999999973e-136Initial program 99.5%
Taylor expanded in F around -inf 37.3%
Taylor expanded in x around inf 78.2%
associate-/l*78.2%
associate-*r/78.2%
neg-mul-178.2%
associate-/l*78.2%
associate-*l/78.1%
*-commutative78.1%
Simplified78.1%
*-commutative78.1%
frac-2neg78.1%
associate-*l/78.2%
remove-double-neg78.2%
Applied egg-rr78.2%
associate-/l*78.2%
Simplified78.2%
if 1.5499999999999999e25 < F Initial program 50.1%
Taylor expanded in F around inf 99.7%
Final simplification92.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B))))
(t_1 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)))
(if (<= F -3.6e+14)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.3e-71)
(- (* (/ F (sin B)) t_1) (/ x B))
(if (<= F 1.7e-10) (+ t_0 (* t_1 (/ F 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 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -3.6e+14) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.3e-71) {
tmp = ((F / sin(B)) * t_1) - (x / B);
} else if (F <= 1.7e-10) {
tmp = t_0 + (t_1 * (F / 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 * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
if (f <= (-3.6d+14)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.3d-71)) then
tmp = ((f / sin(b)) * t_1) - (x / b)
else if (f <= 1.7d-10) then
tmp = t_0 + (t_1 * (f / 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 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -3.6e+14) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.3e-71) {
tmp = ((F / Math.sin(B)) * t_1) - (x / B);
} else if (F <= 1.7e-10) {
tmp = t_0 + (t_1 * (F / 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 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) tmp = 0 if F <= -3.6e+14: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.3e-71: tmp = ((F / math.sin(B)) * t_1) - (x / B) elif F <= 1.7e-10: tmp = t_0 + (t_1 * (F / 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(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5 tmp = 0.0 if (F <= -3.6e+14) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.3e-71) tmp = Float64(Float64(Float64(F / sin(B)) * t_1) - Float64(x / B)); elseif (F <= 1.7e-10) tmp = Float64(t_0 + Float64(t_1 * Float64(F / 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 * F) + 2.0) + (x * 2.0)) ^ -0.5; tmp = 0.0; if (F <= -3.6e+14) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.3e-71) tmp = ((F / sin(B)) * t_1) - (x / B); elseif (F <= 1.7e-10) tmp = t_0 + (t_1 * (F / 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[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[F, -3.6e+14], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.3e-71], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-10], N[(t$95$0 + N[(t$95$1 * N[(F / 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}\\
t_1 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{if}\;F \leq -3.6 \cdot 10^{+14}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.3 \cdot 10^{-71}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_1 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-10}:\\
\;\;\;\;t_0 + t_1 \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -3.6e14Initial program 57.3%
Taylor expanded in F around -inf 99.6%
+-commutative99.6%
unsub-neg99.6%
un-div-inv99.8%
Applied egg-rr99.8%
if -3.6e14 < F < -1.2999999999999999e-71Initial program 99.4%
Taylor expanded in B around 0 99.2%
if -1.2999999999999999e-71 < F < 1.70000000000000007e-10Initial program 99.4%
Taylor expanded in B around 0 82.9%
if 1.70000000000000007e-10 < F Initial program 53.6%
Taylor expanded in F around inf 98.9%
Final simplification92.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(t_1 (+ (/ x B) (* -0.3333333333333333 (* B x)))))
(if (<= F -1350.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -9.5e-94)
(- (* t_0 (* F (/ 1.0 B))) t_1)
(if (<= F 1.06e-135)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 1.7e-10)
(- (* t_0 (+ (/ F B) (* 0.16666666666666666 (* F B)))) t_1)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double t_1 = (x / B) + (-0.3333333333333333 * (B * x));
double tmp;
if (F <= -1350.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -9.5e-94) {
tmp = (t_0 * (F * (1.0 / B))) - t_1;
} else if (F <= 1.06e-135) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 1.7e-10) {
tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - t_1;
} 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) :: t_1
real(8) :: tmp
t_0 = (((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
t_1 = (x / b) + ((-0.3333333333333333d0) * (b * x))
if (f <= (-1350.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-9.5d-94)) then
tmp = (t_0 * (f * (1.0d0 / b))) - t_1
else if (f <= 1.06d-135) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 1.7d-10) then
tmp = (t_0 * ((f / b) + (0.16666666666666666d0 * (f * b)))) - t_1
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 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double t_1 = (x / B) + (-0.3333333333333333 * (B * x));
double tmp;
if (F <= -1350.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -9.5e-94) {
tmp = (t_0 * (F * (1.0 / B))) - t_1;
} else if (F <= 1.06e-135) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 1.7e-10) {
tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - t_1;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) t_1 = (x / B) + (-0.3333333333333333 * (B * x)) tmp = 0 if F <= -1350.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -9.5e-94: tmp = (t_0 * (F * (1.0 / B))) - t_1 elif F <= 1.06e-135: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 1.7e-10: tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - t_1 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 * F) + 2.0) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x))) tmp = 0.0 if (F <= -1350.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -9.5e-94) tmp = Float64(Float64(t_0 * Float64(F * Float64(1.0 / B))) - t_1); elseif (F <= 1.06e-135) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 1.7e-10) tmp = Float64(Float64(t_0 * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - t_1); 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 * F) + 2.0) + (x * 2.0)) ^ -0.5; t_1 = (x / B) + (-0.3333333333333333 * (B * x)); tmp = 0.0; if (F <= -1350.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -9.5e-94) tmp = (t_0 * (F * (1.0 / B))) - t_1; elseif (F <= 1.06e-135) tmp = (x * cos(B)) / -sin(B); elseif (F <= 1.7e-10) tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - t_1; 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[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1350.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9.5e-94], N[(N[(t$95$0 * N[(F * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 1.06e-135], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.7e-10], N[(N[(t$95$0 * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $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 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{if}\;F \leq -1350:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -9.5 \cdot 10^{-94}:\\
\;\;\;\;t_0 \cdot \left(F \cdot \frac{1}{B}\right) - t_1\\
\mathbf{elif}\;F \leq 1.06 \cdot 10^{-135}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-10}:\\
\;\;\;\;t_0 \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1350Initial program 58.6%
Taylor expanded in F around -inf 99.1%
+-commutative99.1%
unsub-neg99.1%
un-div-inv99.3%
Applied egg-rr99.3%
if -1350 < F < -9.4999999999999997e-94Initial program 99.3%
Taylor expanded in B around 0 91.5%
div-inv91.5%
*-commutative91.5%
Applied egg-rr91.5%
Taylor expanded in B around 0 76.0%
if -9.4999999999999997e-94 < F < 1.06000000000000004e-135Initial program 99.5%
Taylor expanded in F around -inf 37.7%
Taylor expanded in x around inf 76.4%
associate-/l*76.4%
associate-*r/76.4%
neg-mul-176.4%
associate-/l*76.4%
associate-*l/76.3%
*-commutative76.3%
Simplified76.3%
*-commutative76.3%
frac-2neg76.3%
associate-*l/76.4%
remove-double-neg76.4%
Applied egg-rr76.4%
if 1.06000000000000004e-135 < F < 1.70000000000000007e-10Initial program 99.3%
Taylor expanded in B around 0 80.1%
Taylor expanded in B around 0 75.3%
if 1.70000000000000007e-10 < F Initial program 53.6%
Taylor expanded in F around inf 98.9%
Final simplification88.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (cos B) (/ (- x) (sin B))))
(t_1 (+ (/ x B) (* -0.3333333333333333 (* B x))))
(t_2
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (* F (/ 1.0 B))) t_1)))
(if (<= F -5200.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -8.6e-94)
t_2
(if (<= F 8e-135)
t_0
(if (<= F 1.06e+71)
t_2
(if (<= F 6.8e+212) t_0 (- (/ 1.0 (sin B)) t_1))))))))
double code(double F, double B, double x) {
double t_0 = cos(B) * (-x / sin(B));
double t_1 = (x / B) + (-0.3333333333333333 * (B * x));
double t_2 = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F * (1.0 / B))) - t_1;
double tmp;
if (F <= -5200.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -8.6e-94) {
tmp = t_2;
} else if (F <= 8e-135) {
tmp = t_0;
} else if (F <= 1.06e+71) {
tmp = t_2;
} else if (F <= 6.8e+212) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = cos(b) * (-x / sin(b))
t_1 = (x / b) + ((-0.3333333333333333d0) * (b * x))
t_2 = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f * (1.0d0 / b))) - t_1
if (f <= (-5200.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-8.6d-94)) then
tmp = t_2
else if (f <= 8d-135) then
tmp = t_0
else if (f <= 1.06d+71) then
tmp = t_2
else if (f <= 6.8d+212) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.cos(B) * (-x / Math.sin(B));
double t_1 = (x / B) + (-0.3333333333333333 * (B * x));
double t_2 = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F * (1.0 / B))) - t_1;
double tmp;
if (F <= -5200.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -8.6e-94) {
tmp = t_2;
} else if (F <= 8e-135) {
tmp = t_0;
} else if (F <= 1.06e+71) {
tmp = t_2;
} else if (F <= 6.8e+212) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.cos(B) * (-x / math.sin(B)) t_1 = (x / B) + (-0.3333333333333333 * (B * x)) t_2 = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F * (1.0 / B))) - t_1 tmp = 0 if F <= -5200.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -8.6e-94: tmp = t_2 elif F <= 8e-135: tmp = t_0 elif F <= 1.06e+71: tmp = t_2 elif F <= 6.8e+212: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(cos(B) * Float64(Float64(-x) / sin(B))) t_1 = Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x))) t_2 = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F * Float64(1.0 / B))) - t_1) tmp = 0.0 if (F <= -5200.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -8.6e-94) tmp = t_2; elseif (F <= 8e-135) tmp = t_0; elseif (F <= 1.06e+71) tmp = t_2; elseif (F <= 6.8e+212) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = cos(B) * (-x / sin(B)); t_1 = (x / B) + (-0.3333333333333333 * (B * x)); t_2 = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F * (1.0 / B))) - t_1; tmp = 0.0; if (F <= -5200.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -8.6e-94) tmp = t_2; elseif (F <= 8e-135) tmp = t_0; elseif (F <= 1.06e+71) tmp = t_2; elseif (F <= 6.8e+212) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[F, -5200.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8.6e-94], t$95$2, If[LessEqual[F, 8e-135], t$95$0, If[LessEqual[F, 1.06e+71], t$95$2, If[LessEqual[F, 6.8e+212], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos B \cdot \frac{-x}{\sin B}\\
t_1 := \frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\\
t_2 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \left(F \cdot \frac{1}{B}\right) - t_1\\
\mathbf{if}\;F \leq -5200:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -8.6 \cdot 10^{-94}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-135}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.06 \cdot 10^{+71}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{+212}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -5200Initial program 58.6%
Taylor expanded in F around -inf 99.1%
Taylor expanded in B around 0 84.9%
if -5200 < F < -8.5999999999999997e-94 or 8.0000000000000003e-135 < F < 1.06e71Initial program 99.4%
Taylor expanded in B around 0 83.8%
div-inv83.9%
*-commutative83.9%
Applied egg-rr83.9%
Taylor expanded in B around 0 75.3%
if -8.5999999999999997e-94 < F < 8.0000000000000003e-135 or 1.06e71 < F < 6.80000000000000073e212Initial program 91.3%
Taylor expanded in F around -inf 45.3%
Taylor expanded in x around inf 73.7%
associate-/l*73.7%
associate-*r/73.7%
neg-mul-173.7%
associate-/l*73.7%
associate-*l/73.7%
*-commutative73.7%
Simplified73.7%
if 6.80000000000000073e212 < F Initial program 21.4%
Taylor expanded in B around 0 5.0%
Taylor expanded in F around inf 69.3%
Final simplification76.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (/ x B) (* -0.3333333333333333 (* B x))))
(t_1
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (* F (/ 1.0 B))) t_0)))
(if (<= F -1350.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -9.2e-94)
t_1
(if (<= F 1e-132)
(/ x (/ (- (sin B)) (cos B)))
(if (<= F 1.22e+67)
t_1
(if (<= F 7.2e+213)
(* (cos B) (/ (- x) (sin B)))
(- (/ 1.0 (sin B)) t_0))))))))
double code(double F, double B, double x) {
double t_0 = (x / B) + (-0.3333333333333333 * (B * x));
double t_1 = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F * (1.0 / B))) - t_0;
double tmp;
if (F <= -1350.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -9.2e-94) {
tmp = t_1;
} else if (F <= 1e-132) {
tmp = x / (-sin(B) / cos(B));
} else if (F <= 1.22e+67) {
tmp = t_1;
} else if (F <= 7.2e+213) {
tmp = cos(B) * (-x / sin(B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x / b) + ((-0.3333333333333333d0) * (b * x))
t_1 = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f * (1.0d0 / b))) - t_0
if (f <= (-1350.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-9.2d-94)) then
tmp = t_1
else if (f <= 1d-132) then
tmp = x / (-sin(b) / cos(b))
else if (f <= 1.22d+67) then
tmp = t_1
else if (f <= 7.2d+213) then
tmp = cos(b) * (-x / sin(b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (x / B) + (-0.3333333333333333 * (B * x));
double t_1 = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F * (1.0 / B))) - t_0;
double tmp;
if (F <= -1350.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -9.2e-94) {
tmp = t_1;
} else if (F <= 1e-132) {
tmp = x / (-Math.sin(B) / Math.cos(B));
} else if (F <= 1.22e+67) {
tmp = t_1;
} else if (F <= 7.2e+213) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (x / B) + (-0.3333333333333333 * (B * x)) t_1 = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F * (1.0 / B))) - t_0 tmp = 0 if F <= -1350.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -9.2e-94: tmp = t_1 elif F <= 1e-132: tmp = x / (-math.sin(B) / math.cos(B)) elif F <= 1.22e+67: tmp = t_1 elif F <= 7.2e+213: tmp = math.cos(B) * (-x / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x))) t_1 = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F * Float64(1.0 / B))) - t_0) tmp = 0.0 if (F <= -1350.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -9.2e-94) tmp = t_1; elseif (F <= 1e-132) tmp = Float64(x / Float64(Float64(-sin(B)) / cos(B))); elseif (F <= 1.22e+67) tmp = t_1; elseif (F <= 7.2e+213) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x / B) + (-0.3333333333333333 * (B * x)); t_1 = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F * (1.0 / B))) - t_0; tmp = 0.0; if (F <= -1350.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -9.2e-94) tmp = t_1; elseif (F <= 1e-132) tmp = x / (-sin(B) / cos(B)); elseif (F <= 1.22e+67) tmp = t_1; elseif (F <= 7.2e+213) tmp = cos(B) * (-x / sin(B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -1350.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9.2e-94], t$95$1, If[LessEqual[F, 1e-132], N[(x / N[((-N[Sin[B], $MachinePrecision]) / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.22e+67], t$95$1, If[LessEqual[F, 7.2e+213], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\\
t_1 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \left(F \cdot \frac{1}{B}\right) - t_0\\
\mathbf{if}\;F \leq -1350:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -9.2 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 10^{-132}:\\
\;\;\;\;\frac{x}{\frac{-\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 1.22 \cdot 10^{+67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{+213}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1350Initial program 58.6%
Taylor expanded in F around -inf 99.1%
Taylor expanded in B around 0 84.9%
if -1350 < F < -9.1999999999999997e-94 or 9.9999999999999999e-133 < F < 1.22000000000000004e67Initial program 99.4%
Taylor expanded in B around 0 83.8%
div-inv83.9%
*-commutative83.9%
Applied egg-rr83.9%
Taylor expanded in B around 0 75.3%
if -9.1999999999999997e-94 < F < 9.9999999999999999e-133Initial program 99.5%
Taylor expanded in F around -inf 37.7%
Taylor expanded in x around inf 76.4%
associate-/l*76.4%
associate-*r/76.4%
neg-mul-176.4%
associate-/l*76.4%
associate-*l/76.3%
*-commutative76.3%
Simplified76.3%
*-commutative76.3%
frac-2neg76.3%
associate-*l/76.4%
remove-double-neg76.4%
Applied egg-rr76.4%
associate-/l*76.4%
Simplified76.4%
if 1.22000000000000004e67 < F < 7.2000000000000002e213Initial program 69.5%
Taylor expanded in F around -inf 65.6%
Taylor expanded in x around inf 66.4%
associate-/l*66.6%
associate-*r/66.6%
neg-mul-166.6%
associate-/l*66.4%
associate-*l/66.6%
*-commutative66.6%
Simplified66.6%
if 7.2000000000000002e213 < F Initial program 21.4%
Taylor expanded in B around 0 5.0%
Taylor expanded in F around inf 69.3%
Final simplification76.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (/ x B) (* -0.3333333333333333 (* B x))))
(t_1
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (* F (/ 1.0 B))) t_0)))
(if (<= F -3300.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -9.5e-94)
t_1
(if (<= F 1.4e-131)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 9e+70)
t_1
(if (<= F 6.8e+212)
(* (cos B) (/ (- x) (sin B)))
(- (/ 1.0 (sin B)) t_0))))))))
double code(double F, double B, double x) {
double t_0 = (x / B) + (-0.3333333333333333 * (B * x));
double t_1 = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F * (1.0 / B))) - t_0;
double tmp;
if (F <= -3300.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -9.5e-94) {
tmp = t_1;
} else if (F <= 1.4e-131) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 9e+70) {
tmp = t_1;
} else if (F <= 6.8e+212) {
tmp = cos(B) * (-x / sin(B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x / b) + ((-0.3333333333333333d0) * (b * x))
t_1 = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f * (1.0d0 / b))) - t_0
if (f <= (-3300.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-9.5d-94)) then
tmp = t_1
else if (f <= 1.4d-131) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 9d+70) then
tmp = t_1
else if (f <= 6.8d+212) then
tmp = cos(b) * (-x / sin(b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (x / B) + (-0.3333333333333333 * (B * x));
double t_1 = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F * (1.0 / B))) - t_0;
double tmp;
if (F <= -3300.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -9.5e-94) {
tmp = t_1;
} else if (F <= 1.4e-131) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 9e+70) {
tmp = t_1;
} else if (F <= 6.8e+212) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (x / B) + (-0.3333333333333333 * (B * x)) t_1 = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F * (1.0 / B))) - t_0 tmp = 0 if F <= -3300.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -9.5e-94: tmp = t_1 elif F <= 1.4e-131: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 9e+70: tmp = t_1 elif F <= 6.8e+212: tmp = math.cos(B) * (-x / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x))) t_1 = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F * Float64(1.0 / B))) - t_0) tmp = 0.0 if (F <= -3300.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -9.5e-94) tmp = t_1; elseif (F <= 1.4e-131) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 9e+70) tmp = t_1; elseif (F <= 6.8e+212) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x / B) + (-0.3333333333333333 * (B * x)); t_1 = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F * (1.0 / B))) - t_0; tmp = 0.0; if (F <= -3300.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -9.5e-94) tmp = t_1; elseif (F <= 1.4e-131) tmp = (x * cos(B)) / -sin(B); elseif (F <= 9e+70) tmp = t_1; elseif (F <= 6.8e+212) tmp = cos(B) * (-x / sin(B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -3300.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9.5e-94], t$95$1, If[LessEqual[F, 1.4e-131], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 9e+70], t$95$1, If[LessEqual[F, 6.8e+212], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\\
t_1 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \left(F \cdot \frac{1}{B}\right) - t_0\\
\mathbf{if}\;F \leq -3300:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -9.5 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-131}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 9 \cdot 10^{+70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{+212}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -3300Initial program 58.6%
Taylor expanded in F around -inf 99.1%
Taylor expanded in B around 0 84.9%
if -3300 < F < -9.4999999999999997e-94 or 1.4e-131 < F < 8.9999999999999999e70Initial program 99.4%
Taylor expanded in B around 0 83.8%
div-inv83.9%
*-commutative83.9%
Applied egg-rr83.9%
Taylor expanded in B around 0 75.3%
if -9.4999999999999997e-94 < F < 1.4e-131Initial program 99.5%
Taylor expanded in F around -inf 37.7%
Taylor expanded in x around inf 76.4%
associate-/l*76.4%
associate-*r/76.4%
neg-mul-176.4%
associate-/l*76.4%
associate-*l/76.3%
*-commutative76.3%
Simplified76.3%
*-commutative76.3%
frac-2neg76.3%
associate-*l/76.4%
remove-double-neg76.4%
Applied egg-rr76.4%
if 8.9999999999999999e70 < F < 6.80000000000000073e212Initial program 69.5%
Taylor expanded in F around -inf 65.6%
Taylor expanded in x around inf 66.4%
associate-/l*66.6%
associate-*r/66.6%
neg-mul-166.6%
associate-/l*66.4%
associate-*l/66.6%
*-commutative66.6%
Simplified66.6%
if 6.80000000000000073e212 < F Initial program 21.4%
Taylor expanded in B around 0 5.0%
Taylor expanded in F around inf 69.3%
Final simplification76.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (/ x B) (* -0.3333333333333333 (* B x))))
(t_1
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (* F (/ 1.0 B))) t_0)))
(if (<= F -1000.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -7.5e-94)
t_1
(if (<= F 1.8e-135)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 2.15e+67)
t_1
(if (<= F 7.2e+213)
(* (cos B) (/ (- x) (sin B)))
(- (/ 1.0 (sin B)) t_0))))))))
double code(double F, double B, double x) {
double t_0 = (x / B) + (-0.3333333333333333 * (B * x));
double t_1 = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F * (1.0 / B))) - t_0;
double tmp;
if (F <= -1000.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -7.5e-94) {
tmp = t_1;
} else if (F <= 1.8e-135) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 2.15e+67) {
tmp = t_1;
} else if (F <= 7.2e+213) {
tmp = cos(B) * (-x / sin(B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x / b) + ((-0.3333333333333333d0) * (b * x))
t_1 = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f * (1.0d0 / b))) - t_0
if (f <= (-1000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-7.5d-94)) then
tmp = t_1
else if (f <= 1.8d-135) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 2.15d+67) then
tmp = t_1
else if (f <= 7.2d+213) then
tmp = cos(b) * (-x / sin(b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (x / B) + (-0.3333333333333333 * (B * x));
double t_1 = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F * (1.0 / B))) - t_0;
double tmp;
if (F <= -1000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -7.5e-94) {
tmp = t_1;
} else if (F <= 1.8e-135) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 2.15e+67) {
tmp = t_1;
} else if (F <= 7.2e+213) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (x / B) + (-0.3333333333333333 * (B * x)) t_1 = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F * (1.0 / B))) - t_0 tmp = 0 if F <= -1000.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -7.5e-94: tmp = t_1 elif F <= 1.8e-135: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 2.15e+67: tmp = t_1 elif F <= 7.2e+213: tmp = math.cos(B) * (-x / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x))) t_1 = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F * Float64(1.0 / B))) - t_0) tmp = 0.0 if (F <= -1000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -7.5e-94) tmp = t_1; elseif (F <= 1.8e-135) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 2.15e+67) tmp = t_1; elseif (F <= 7.2e+213) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x / B) + (-0.3333333333333333 * (B * x)); t_1 = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F * (1.0 / B))) - t_0; tmp = 0.0; if (F <= -1000.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -7.5e-94) tmp = t_1; elseif (F <= 1.8e-135) tmp = (x * cos(B)) / -sin(B); elseif (F <= 2.15e+67) tmp = t_1; elseif (F <= 7.2e+213) tmp = cos(B) * (-x / sin(B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -1000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.5e-94], t$95$1, If[LessEqual[F, 1.8e-135], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 2.15e+67], t$95$1, If[LessEqual[F, 7.2e+213], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\\
t_1 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \left(F \cdot \frac{1}{B}\right) - t_0\\
\mathbf{if}\;F \leq -1000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -7.5 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-135}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 2.15 \cdot 10^{+67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{+213}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1e3Initial program 58.6%
Taylor expanded in F around -inf 99.1%
+-commutative99.1%
unsub-neg99.1%
un-div-inv99.3%
Applied egg-rr99.3%
if -1e3 < F < -7.5000000000000003e-94 or 1.79999999999999989e-135 < F < 2.1500000000000001e67Initial program 99.4%
Taylor expanded in B around 0 83.8%
div-inv83.9%
*-commutative83.9%
Applied egg-rr83.9%
Taylor expanded in B around 0 75.3%
if -7.5000000000000003e-94 < F < 1.79999999999999989e-135Initial program 99.5%
Taylor expanded in F around -inf 37.7%
Taylor expanded in x around inf 76.4%
associate-/l*76.4%
associate-*r/76.4%
neg-mul-176.4%
associate-/l*76.4%
associate-*l/76.3%
*-commutative76.3%
Simplified76.3%
*-commutative76.3%
frac-2neg76.3%
associate-*l/76.4%
remove-double-neg76.4%
Applied egg-rr76.4%
if 2.1500000000000001e67 < F < 7.2000000000000002e213Initial program 69.5%
Taylor expanded in F around -inf 65.6%
Taylor expanded in x around inf 66.4%
associate-/l*66.6%
associate-*r/66.6%
neg-mul-166.6%
associate-/l*66.4%
associate-*l/66.6%
*-commutative66.6%
Simplified66.6%
if 7.2000000000000002e213 < F Initial program 21.4%
Taylor expanded in B around 0 5.0%
Taylor expanded in F around inf 69.3%
Final simplification80.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B)))
(t_1 (+ (/ x B) (* -0.3333333333333333 (* B x))))
(t_2
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (* F (/ 1.0 B))) t_1)))
(if (<= F -1650.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.5e-138)
t_2
(if (<= F 5.6e-141)
t_0
(if (<= F 2.3e+68)
t_2
(if (<= F 6.8e+212) t_0 (- (/ 1.0 (sin B)) t_1))))))))
double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double t_1 = (x / B) + (-0.3333333333333333 * (B * x));
double t_2 = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F * (1.0 / B))) - t_1;
double tmp;
if (F <= -1650.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.5e-138) {
tmp = t_2;
} else if (F <= 5.6e-141) {
tmp = t_0;
} else if (F <= 2.3e+68) {
tmp = t_2;
} else if (F <= 6.8e+212) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
t_1 = (x / b) + ((-0.3333333333333333d0) * (b * x))
t_2 = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f * (1.0d0 / b))) - t_1
if (f <= (-1650.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.5d-138)) then
tmp = t_2
else if (f <= 5.6d-141) then
tmp = t_0
else if (f <= 2.3d+68) then
tmp = t_2
else if (f <= 6.8d+212) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
double t_1 = (x / B) + (-0.3333333333333333 * (B * x));
double t_2 = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F * (1.0 / B))) - t_1;
double tmp;
if (F <= -1650.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.5e-138) {
tmp = t_2;
} else if (F <= 5.6e-141) {
tmp = t_0;
} else if (F <= 2.3e+68) {
tmp = t_2;
} else if (F <= 6.8e+212) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) t_1 = (x / B) + (-0.3333333333333333 * (B * x)) t_2 = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F * (1.0 / B))) - t_1 tmp = 0 if F <= -1650.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.5e-138: tmp = t_2 elif F <= 5.6e-141: tmp = t_0 elif F <= 2.3e+68: tmp = t_2 elif F <= 6.8e+212: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) t_1 = Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x))) t_2 = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F * Float64(1.0 / B))) - t_1) tmp = 0.0 if (F <= -1650.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.5e-138) tmp = t_2; elseif (F <= 5.6e-141) tmp = t_0; elseif (F <= 2.3e+68) tmp = t_2; elseif (F <= 6.8e+212) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B); t_1 = (x / B) + (-0.3333333333333333 * (B * x)); t_2 = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F * (1.0 / B))) - t_1; tmp = 0.0; if (F <= -1650.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.5e-138) tmp = t_2; elseif (F <= 5.6e-141) tmp = t_0; elseif (F <= 2.3e+68) tmp = t_2; elseif (F <= 6.8e+212) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[F, -1650.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.5e-138], t$95$2, If[LessEqual[F, 5.6e-141], t$95$0, If[LessEqual[F, 2.3e+68], t$95$2, If[LessEqual[F, 6.8e+212], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
t_1 := \frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\\
t_2 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \left(F \cdot \frac{1}{B}\right) - t_1\\
\mathbf{if}\;F \leq -1650:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.5 \cdot 10^{-138}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-141}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{+68}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{+212}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -1650Initial program 58.6%
Taylor expanded in F around -inf 99.1%
Taylor expanded in B around 0 84.9%
if -1650 < F < -1.5e-138 or 5.60000000000000023e-141 < F < 2.3e68Initial program 99.4%
Taylor expanded in B around 0 78.1%
div-inv78.1%
*-commutative78.1%
Applied egg-rr78.1%
Taylor expanded in B around 0 70.9%
if -1.5e-138 < F < 5.60000000000000023e-141 or 2.3e68 < F < 6.80000000000000073e212Initial program 90.4%
Taylor expanded in F around -inf 46.5%
Taylor expanded in B around 0 58.3%
if 6.80000000000000073e212 < F Initial program 21.4%
Taylor expanded in B around 0 5.0%
Taylor expanded in F around inf 69.3%
Final simplification69.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B)))
(t_1 (+ (/ x B) (* -0.3333333333333333 (* B x))))
(t_2 (- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) t_1)))
(if (<= F -3900.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.6e-140)
t_2
(if (<= F 4.6e-141)
t_0
(if (<= F 3.8e+71)
t_2
(if (<= F 7.2e+213) t_0 (- (/ 1.0 (sin B)) t_1))))))))
double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double t_1 = (x / B) + (-0.3333333333333333 * (B * x));
double t_2 = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - t_1;
double tmp;
if (F <= -3900.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.6e-140) {
tmp = t_2;
} else if (F <= 4.6e-141) {
tmp = t_0;
} else if (F <= 3.8e+71) {
tmp = t_2;
} else if (F <= 7.2e+213) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
t_1 = (x / b) + ((-0.3333333333333333d0) * (b * x))
t_2 = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - t_1
if (f <= (-3900.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.6d-140)) then
tmp = t_2
else if (f <= 4.6d-141) then
tmp = t_0
else if (f <= 3.8d+71) then
tmp = t_2
else if (f <= 7.2d+213) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
double t_1 = (x / B) + (-0.3333333333333333 * (B * x));
double t_2 = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - t_1;
double tmp;
if (F <= -3900.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.6e-140) {
tmp = t_2;
} else if (F <= 4.6e-141) {
tmp = t_0;
} else if (F <= 3.8e+71) {
tmp = t_2;
} else if (F <= 7.2e+213) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) t_1 = (x / B) + (-0.3333333333333333 * (B * x)) t_2 = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - t_1 tmp = 0 if F <= -3900.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.6e-140: tmp = t_2 elif F <= 4.6e-141: tmp = t_0 elif F <= 3.8e+71: tmp = t_2 elif F <= 7.2e+213: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) t_1 = Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x))) t_2 = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - t_1) tmp = 0.0 if (F <= -3900.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.6e-140) tmp = t_2; elseif (F <= 4.6e-141) tmp = t_0; elseif (F <= 3.8e+71) tmp = t_2; elseif (F <= 7.2e+213) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B); t_1 = (x / B) + (-0.3333333333333333 * (B * x)); t_2 = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - t_1; tmp = 0.0; if (F <= -3900.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.6e-140) tmp = t_2; elseif (F <= 4.6e-141) tmp = t_0; elseif (F <= 3.8e+71) tmp = t_2; elseif (F <= 7.2e+213) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[F, -3900.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.6e-140], t$95$2, If[LessEqual[F, 4.6e-141], t$95$0, If[LessEqual[F, 3.8e+71], t$95$2, If[LessEqual[F, 7.2e+213], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
t_1 := \frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\\
t_2 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - t_1\\
\mathbf{if}\;F \leq -3900:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.6 \cdot 10^{-140}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-141}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 3.8 \cdot 10^{+71}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{+213}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -3900Initial program 58.6%
Taylor expanded in F around -inf 99.1%
Taylor expanded in B around 0 84.9%
if -3900 < F < -3.6e-140 or 4.5999999999999999e-141 < F < 3.8000000000000001e71Initial program 99.4%
Taylor expanded in B around 0 78.1%
Taylor expanded in B around 0 70.9%
if -3.6e-140 < F < 4.5999999999999999e-141 or 3.8000000000000001e71 < F < 7.2000000000000002e213Initial program 90.4%
Taylor expanded in F around -inf 46.5%
Taylor expanded in B around 0 58.3%
if 7.2000000000000002e213 < F Initial program 21.4%
Taylor expanded in B around 0 5.0%
Taylor expanded in F around inf 69.3%
Final simplification69.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
(if (<= F -5.8e+19)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3.05e+212)
t_0
(if (<= F 7.5e+265)
(/ 1.0 (sin B))
(if (<= F 8.5e+290)
t_0
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B))))))))
double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double tmp;
if (F <= -5.8e+19) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3.05e+212) {
tmp = t_0;
} else if (F <= 7.5e+265) {
tmp = 1.0 / sin(B);
} else if (F <= 8.5e+290) {
tmp = t_0;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
if (f <= (-5.8d+19)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3.05d+212) then
tmp = t_0
else if (f <= 7.5d+265) then
tmp = 1.0d0 / sin(b)
else if (f <= 8.5d+290) then
tmp = t_0
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / 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))) + (-1.0 / B);
double tmp;
if (F <= -5.8e+19) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3.05e+212) {
tmp = t_0;
} else if (F <= 7.5e+265) {
tmp = 1.0 / Math.sin(B);
} else if (F <= 8.5e+290) {
tmp = t_0;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) tmp = 0 if F <= -5.8e+19: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3.05e+212: tmp = t_0 elif F <= 7.5e+265: tmp = 1.0 / math.sin(B) elif F <= 8.5e+290: tmp = t_0 else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) tmp = 0.0 if (F <= -5.8e+19) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3.05e+212) tmp = t_0; elseif (F <= 7.5e+265) tmp = Float64(1.0 / sin(B)); elseif (F <= 8.5e+290) tmp = t_0; else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B); tmp = 0.0; if (F <= -5.8e+19) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3.05e+212) tmp = t_0; elseif (F <= 7.5e+265) tmp = 1.0 / sin(B); elseif (F <= 8.5e+290) tmp = t_0; else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8e+19], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.05e+212], t$95$0, If[LessEqual[F, 7.5e+265], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e+290], t$95$0, N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{+19}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.05 \cdot 10^{+212}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{+265}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{+290}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.8e19Initial program 56.6%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 86.1%
if -5.8e19 < F < 3.0499999999999999e212 or 7.49999999999999951e265 < F < 8.50000000000000061e290Initial program 91.5%
Taylor expanded in F around -inf 46.2%
Taylor expanded in B around 0 52.6%
if 3.0499999999999999e212 < F < 7.49999999999999951e265Initial program 21.1%
Taylor expanded in B around 0 8.9%
Taylor expanded in F around inf 61.2%
Taylor expanded in x around 0 66.8%
if 8.50000000000000061e290 < F Initial program 0.4%
Taylor expanded in B around 0 0.2%
Taylor expanded in F around inf 83.5%
Taylor expanded in B around 0 83.9%
associate--l+83.9%
cancel-sign-sub-inv83.9%
metadata-eval83.9%
*-commutative83.9%
div-sub83.9%
Simplified83.9%
Final simplification62.3%
(FPCore (F B x)
:precision binary64
(if (<= F -6.2e+19)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 7.2e+214)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(- (/ 1.0 (sin B)) (+ (/ x B) (* -0.3333333333333333 (* B x)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e+19) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 7.2e+214) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else {
tmp = (1.0 / sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.2d+19)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 7.2d+214) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else
tmp = (1.0d0 / sin(b)) - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e+19) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 7.2e+214) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else {
tmp = (1.0 / Math.sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.2e+19: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 7.2e+214: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) else: tmp = (1.0 / math.sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.2e+19) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 7.2e+214) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.2e+19) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 7.2e+214) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); else tmp = (1.0 / sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.2e+19], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.2e+214], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.2 \cdot 10^{+19}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{+214}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\end{array}
\end{array}
if F < -6.2e19Initial program 56.6%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 86.1%
if -6.2e19 < F < 7.2000000000000002e214Initial program 94.1%
Taylor expanded in F around -inf 44.7%
Taylor expanded in B around 0 51.4%
if 7.2000000000000002e214 < F Initial program 21.4%
Taylor expanded in B around 0 5.0%
Taylor expanded in F around inf 69.3%
Final simplification61.9%
(FPCore (F B x)
:precision binary64
(if (<= F -2.3e-63)
(/ (- -1.0 x) B)
(if (<= F 3.9e-72)
(/ (- x) B)
(if (<= F 2.5e+136)
(- (/ 1.0 B) (+ (/ x B) (* -0.3333333333333333 (* B x))))
(if (<= F 3.2e+270) (/ 1.0 (sin B)) (/ (- 1.0 x) B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-63) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.9e-72) {
tmp = -x / B;
} else if (F <= 2.5e+136) {
tmp = (1.0 / B) - ((x / B) + (-0.3333333333333333 * (B * x)));
} else if (F <= 3.2e+270) {
tmp = 1.0 / sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.3d-63)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3.9d-72) then
tmp = -x / b
else if (f <= 2.5d+136) then
tmp = (1.0d0 / b) - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
else if (f <= 3.2d+270) then
tmp = 1.0d0 / sin(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-63) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.9e-72) {
tmp = -x / B;
} else if (F <= 2.5e+136) {
tmp = (1.0 / B) - ((x / B) + (-0.3333333333333333 * (B * x)));
} else if (F <= 3.2e+270) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.3e-63: tmp = (-1.0 - x) / B elif F <= 3.9e-72: tmp = -x / B elif F <= 2.5e+136: tmp = (1.0 / B) - ((x / B) + (-0.3333333333333333 * (B * x))) elif F <= 3.2e+270: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.3e-63) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.9e-72) tmp = Float64(Float64(-x) / B); elseif (F <= 2.5e+136) tmp = Float64(Float64(1.0 / B) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); elseif (F <= 3.2e+270) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.3e-63) tmp = (-1.0 - x) / B; elseif (F <= 3.9e-72) tmp = -x / B; elseif (F <= 2.5e+136) tmp = (1.0 / B) - ((x / B) + (-0.3333333333333333 * (B * x))); elseif (F <= 3.2e+270) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.3e-63], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.9e-72], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 2.5e+136], N[(N[(1.0 / B), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e+270], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.3 \cdot 10^{-63}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.9 \cdot 10^{-72}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{+136}:\\
\;\;\;\;\frac{1}{B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{+270}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.3e-63Initial program 67.4%
Taylor expanded in F around -inf 85.9%
Taylor expanded in B around 0 54.8%
mul-1-neg54.8%
Simplified54.8%
if -2.3e-63 < F < 3.9e-72Initial program 99.4%
Taylor expanded in F around -inf 37.7%
Taylor expanded in B around 0 22.0%
mul-1-neg22.0%
Simplified22.0%
Taylor expanded in x around inf 37.4%
if 3.9e-72 < F < 2.5000000000000001e136Initial program 95.7%
Taylor expanded in B around 0 66.5%
Taylor expanded in F around inf 63.6%
Taylor expanded in B around 0 63.6%
if 2.5000000000000001e136 < F < 3.2000000000000001e270Initial program 36.8%
Taylor expanded in B around 0 15.0%
Taylor expanded in F around inf 60.9%
Taylor expanded in x around 0 54.1%
if 3.2000000000000001e270 < F Initial program 27.3%
Taylor expanded in B around 0 0.2%
Taylor expanded in F around inf 63.8%
Taylor expanded in B around 0 65.5%
Final simplification49.3%
(FPCore (F B x)
:precision binary64
(if (<= F -3.85e-90)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3.9e-72)
(/ (- x) B)
(if (<= F 5e+136)
(- (/ 1.0 B) (+ (/ x B) (* -0.3333333333333333 (* B x))))
(if (<= F 1.45e+270) (/ 1.0 (sin B)) (/ (- 1.0 x) B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.85e-90) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3.9e-72) {
tmp = -x / B;
} else if (F <= 5e+136) {
tmp = (1.0 / B) - ((x / B) + (-0.3333333333333333 * (B * x)));
} else if (F <= 1.45e+270) {
tmp = 1.0 / sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.85d-90)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3.9d-72) then
tmp = -x / b
else if (f <= 5d+136) then
tmp = (1.0d0 / b) - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
else if (f <= 1.45d+270) then
tmp = 1.0d0 / sin(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.85e-90) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3.9e-72) {
tmp = -x / B;
} else if (F <= 5e+136) {
tmp = (1.0 / B) - ((x / B) + (-0.3333333333333333 * (B * x)));
} else if (F <= 1.45e+270) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.85e-90: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3.9e-72: tmp = -x / B elif F <= 5e+136: tmp = (1.0 / B) - ((x / B) + (-0.3333333333333333 * (B * x))) elif F <= 1.45e+270: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.85e-90) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3.9e-72) tmp = Float64(Float64(-x) / B); elseif (F <= 5e+136) tmp = Float64(Float64(1.0 / B) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); elseif (F <= 1.45e+270) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.85e-90) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3.9e-72) tmp = -x / B; elseif (F <= 5e+136) tmp = (1.0 / B) - ((x / B) + (-0.3333333333333333 * (B * x))); elseif (F <= 1.45e+270) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.85e-90], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.9e-72], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 5e+136], N[(N[(1.0 / B), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.45e+270], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.85 \cdot 10^{-90}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.9 \cdot 10^{-72}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{+136}:\\
\;\;\;\;\frac{1}{B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{+270}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.84999999999999986e-90Initial program 68.6%
Taylor expanded in F around -inf 84.2%
Taylor expanded in B around 0 72.4%
if -3.84999999999999986e-90 < F < 3.9e-72Initial program 99.4%
Taylor expanded in F around -inf 37.7%
Taylor expanded in B around 0 22.6%
mul-1-neg22.6%
Simplified22.6%
Taylor expanded in x around inf 38.5%
if 3.9e-72 < F < 5.0000000000000002e136Initial program 95.7%
Taylor expanded in B around 0 66.5%
Taylor expanded in F around inf 63.6%
Taylor expanded in B around 0 63.6%
if 5.0000000000000002e136 < F < 1.44999999999999995e270Initial program 36.8%
Taylor expanded in B around 0 15.0%
Taylor expanded in F around inf 60.9%
Taylor expanded in x around 0 54.1%
if 1.44999999999999995e270 < F Initial program 27.3%
Taylor expanded in B around 0 0.2%
Taylor expanded in F around inf 63.8%
Taylor expanded in B around 0 65.5%
Final simplification55.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) B)))
(if (<= F -4e+222)
(/ -1.0 B)
(if (<= F -2.8e+70)
t_0
(if (<= F -7.6) (/ -1.0 B) (if (<= F 2.4e-109) t_0 (/ (- 1.0 x) B)))))))
double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (F <= -4e+222) {
tmp = -1.0 / B;
} else if (F <= -2.8e+70) {
tmp = t_0;
} else if (F <= -7.6) {
tmp = -1.0 / B;
} else if (F <= 2.4e-109) {
tmp = t_0;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = -x / b
if (f <= (-4d+222)) then
tmp = (-1.0d0) / b
else if (f <= (-2.8d+70)) then
tmp = t_0
else if (f <= (-7.6d0)) then
tmp = (-1.0d0) / b
else if (f <= 2.4d-109) then
tmp = t_0
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (F <= -4e+222) {
tmp = -1.0 / B;
} else if (F <= -2.8e+70) {
tmp = t_0;
} else if (F <= -7.6) {
tmp = -1.0 / B;
} else if (F <= 2.4e-109) {
tmp = t_0;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = -x / B tmp = 0 if F <= -4e+222: tmp = -1.0 / B elif F <= -2.8e+70: tmp = t_0 elif F <= -7.6: tmp = -1.0 / B elif F <= 2.4e-109: tmp = t_0 else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / B) tmp = 0.0 if (F <= -4e+222) tmp = Float64(-1.0 / B); elseif (F <= -2.8e+70) tmp = t_0; elseif (F <= -7.6) tmp = Float64(-1.0 / B); elseif (F <= 2.4e-109) tmp = t_0; else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / B; tmp = 0.0; if (F <= -4e+222) tmp = -1.0 / B; elseif (F <= -2.8e+70) tmp = t_0; elseif (F <= -7.6) tmp = -1.0 / B; elseif (F <= 2.4e-109) tmp = t_0; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / B), $MachinePrecision]}, If[LessEqual[F, -4e+222], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, -2.8e+70], t$95$0, If[LessEqual[F, -7.6], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 2.4e-109], t$95$0, N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{B}\\
\mathbf{if}\;F \leq -4 \cdot 10^{+222}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{+70}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -7.6:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-109}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.0000000000000002e222 or -2.7999999999999999e70 < F < -7.5999999999999996Initial program 63.9%
Taylor expanded in F around -inf 93.5%
Taylor expanded in B around 0 54.6%
mul-1-neg54.6%
Simplified54.6%
Taylor expanded in x around 0 44.9%
if -4.0000000000000002e222 < F < -2.7999999999999999e70 or -7.5999999999999996 < F < 2.39999999999999989e-109Initial program 89.6%
Taylor expanded in F around -inf 50.6%
Taylor expanded in B around 0 31.1%
mul-1-neg31.1%
Simplified31.1%
Taylor expanded in x around inf 37.6%
if 2.39999999999999989e-109 < F Initial program 59.3%
Taylor expanded in B around 0 33.6%
Taylor expanded in F around inf 62.7%
Taylor expanded in B around 0 53.1%
Final simplification43.5%
(FPCore (F B x) :precision binary64 (if (<= F -4.2e-73) (/ (- -1.0 x) B) (if (<= F 3e-109) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.2e-73) {
tmp = (-1.0 - x) / B;
} else if (F <= 3e-109) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.2d-73)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3d-109) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.2e-73) {
tmp = (-1.0 - x) / B;
} else if (F <= 3e-109) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.2e-73: tmp = (-1.0 - x) / B elif F <= 3e-109: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.2e-73) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3e-109) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.2e-73) tmp = (-1.0 - x) / B; elseif (F <= 3e-109) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.2e-73], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3e-109], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.2 \cdot 10^{-73}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-109}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.1999999999999997e-73Initial program 67.4%
Taylor expanded in F around -inf 85.9%
Taylor expanded in B around 0 54.8%
mul-1-neg54.8%
Simplified54.8%
if -4.1999999999999997e-73 < F < 3.00000000000000021e-109Initial program 99.4%
Taylor expanded in F around -inf 35.8%
Taylor expanded in B around 0 19.0%
mul-1-neg19.0%
Simplified19.0%
Taylor expanded in x around inf 35.5%
if 3.00000000000000021e-109 < F Initial program 59.3%
Taylor expanded in B around 0 33.6%
Taylor expanded in F around inf 62.7%
Taylor expanded in B around 0 53.1%
Final simplification47.3%
(FPCore (F B x) :precision binary64 (if (or (<= x -3.6e-58) (not (<= x 1.15e-120))) (/ (- x) B) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -3.6e-58) || !(x <= 1.15e-120)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-3.6d-58)) .or. (.not. (x <= 1.15d-120))) then
tmp = -x / b
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -3.6e-58) || !(x <= 1.15e-120)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -3.6e-58) or not (x <= 1.15e-120): tmp = -x / B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -3.6e-58) || !(x <= 1.15e-120)) tmp = Float64(Float64(-x) / B); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -3.6e-58) || ~((x <= 1.15e-120))) tmp = -x / B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -3.6e-58], N[Not[LessEqual[x, 1.15e-120]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{-58} \lor \neg \left(x \leq 1.15 \cdot 10^{-120}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -3.60000000000000009e-58 or 1.14999999999999993e-120 < x Initial program 80.4%
Taylor expanded in F around -inf 78.2%
Taylor expanded in B around 0 47.1%
mul-1-neg47.1%
Simplified47.1%
Taylor expanded in x around inf 52.3%
if -3.60000000000000009e-58 < x < 1.14999999999999993e-120Initial program 71.5%
Taylor expanded in F around -inf 31.8%
Taylor expanded in B around 0 21.8%
mul-1-neg21.8%
Simplified21.8%
Taylor expanded in x around 0 21.8%
Final simplification38.9%
(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 76.5%
Taylor expanded in F around -inf 57.9%
Taylor expanded in B around 0 36.0%
mul-1-neg36.0%
Simplified36.0%
Taylor expanded in x around 0 12.0%
Final simplification12.0%
herbie shell --seed 2023301
(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))))))