
(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 32 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -50000000000.0)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 0.0062)
(- (/ (pow (fma 2.0 x (fma F F 2.0)) -0.5) (/ (sin B) F)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -50000000000.0) {
tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 0.0062) {
tmp = (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) / (sin(B) / F)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -50000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 0.0062) tmp = Float64(Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) / Float64(sin(B) / F)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -50000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0062], N[(N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -50000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 0.0062:\\
\;\;\;\;\frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{\sin B}{F}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
if -5e10 < F < 0.00619999999999999978Initial program 99.5%
Simplified99.6%
associate-*r/99.7%
associate-*l/99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
if 0.00619999999999999978 < F Initial program 59.2%
Simplified70.2%
Taylor expanded in F around inf 99.8%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -42000000000.0)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 1e+37)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -42000000000.0) {
tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 1e+37) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -42000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 1e+37) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -42000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e+37], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -42000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 10^{+37}:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -4.2e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
if -4.2e10 < F < 9.99999999999999954e36Initial program 99.5%
Simplified99.6%
if 9.99999999999999954e36 < F Initial program 55.1%
Simplified67.3%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -36000000000.0)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 7.8e+36)
(+
(* x (/ -1.0 (tan B)))
(* (/ 1.0 (/ (sin B) F)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 7.8e+36) {
tmp = (x * (-1.0 / tan(B))) + ((1.0 / (sin(B) / F)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-36000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - ((x * cos(b)) / sin(b))
else if (f <= 7.8d+36) then
tmp = (x * ((-1.0d0) / tan(b))) + ((1.0d0 / (sin(b) / f)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / Math.sin(B)) - ((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 7.8e+36) {
tmp = (x * (-1.0 / Math.tan(B))) + ((1.0 / (Math.sin(B) / F)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -36000000000.0: tmp = (-1.0 / math.sin(B)) - ((x * math.cos(B)) / math.sin(B)) elif F <= 7.8e+36: tmp = (x * (-1.0 / math.tan(B))) + ((1.0 / (math.sin(B) / F)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -36000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 7.8e+36) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(1.0 / Float64(sin(B) / F)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -36000000000.0) tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B)); elseif (F <= 7.8e+36) tmp = (x * (-1.0 / tan(B))) + ((1.0 / (sin(B) / F)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -36000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.8e+36], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -36000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 7.8 \cdot 10^{+36}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -3.6e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
if -3.6e10 < F < 7.80000000000000042e36Initial program 99.5%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
if 7.80000000000000042e36 < F Initial program 55.1%
Simplified67.3%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -50000000000.0)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 2.2e+33)
(+
(* x (/ -1.0 (tan B)))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F (sin B))))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -50000000000.0) {
tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 2.2e+33) {
tmp = (x * (-1.0 / tan(B))) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / sin(B)));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-50000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - ((x * cos(b)) / sin(b))
else if (f <= 2.2d+33) then
tmp = (x * ((-1.0d0) / tan(b))) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / sin(b)))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -50000000000.0) {
tmp = (-1.0 / Math.sin(B)) - ((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 2.2e+33) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / Math.sin(B)));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -50000000000.0: tmp = (-1.0 / math.sin(B)) - ((x * math.cos(B)) / math.sin(B)) elif F <= 2.2e+33: tmp = (x * (-1.0 / math.tan(B))) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / math.sin(B))) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -50000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 2.2e+33) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / sin(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -50000000000.0) tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B)); elseif (F <= 2.2e+33) tmp = (x * (-1.0 / tan(B))) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / sin(B))); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -50000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.2e+33], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -50000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{+33}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -5e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
if -5e10 < F < 2.19999999999999994e33Initial program 99.5%
if 2.19999999999999994e33 < F Initial program 57.2%
Simplified68.8%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -60000000000.0)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 2.2e+33)
(-
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F (sin B)))
(/ 1.0 (/ (tan B) x)))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -60000000000.0) {
tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 2.2e+33) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / sin(B))) - (1.0 / (tan(B) / x));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-60000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - ((x * cos(b)) / sin(b))
else if (f <= 2.2d+33) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / sin(b))) - (1.0d0 / (tan(b) / x))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -60000000000.0) {
tmp = (-1.0 / Math.sin(B)) - ((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 2.2e+33) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / Math.sin(B))) - (1.0 / (Math.tan(B) / x));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -60000000000.0: tmp = (-1.0 / math.sin(B)) - ((x * math.cos(B)) / math.sin(B)) elif F <= 2.2e+33: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / math.sin(B))) - (1.0 / (math.tan(B) / x)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -60000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 2.2e+33) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / sin(B))) - Float64(1.0 / Float64(tan(B) / x))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -60000000000.0) tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B)); elseif (F <= 2.2e+33) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / sin(B))) - (1.0 / (tan(B) / x)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -60000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.2e+33], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -60000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{+33}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{1}{\frac{\tan B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -6e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
if -6e10 < F < 2.19999999999999994e33Initial program 99.5%
div-inv99.7%
neg-mul-199.7%
clear-num99.5%
un-div-inv99.5%
Applied egg-rr99.5%
if 2.19999999999999994e33 < F Initial program 57.2%
Simplified68.8%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -36000000000.0)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 0.0062)
(- (/ F (/ (sin B) (sqrt 0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 0.0062) {
tmp = (F / (sin(B) / sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-36000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - ((x * cos(b)) / sin(b))
else if (f <= 0.0062d0) then
tmp = (f / (sin(b) / sqrt(0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / Math.sin(B)) - ((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 0.0062) {
tmp = (F / (Math.sin(B) / Math.sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -36000000000.0: tmp = (-1.0 / math.sin(B)) - ((x * math.cos(B)) / math.sin(B)) elif F <= 0.0062: tmp = (F / (math.sin(B) / math.sqrt(0.5))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -36000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 0.0062) tmp = Float64(Float64(F / Float64(sin(B) / sqrt(0.5))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -36000000000.0) tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B)); elseif (F <= 0.0062) tmp = (F / (sin(B) / sqrt(0.5))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -36000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0062], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -36000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 0.0062:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.6e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
if -3.6e10 < F < 0.00619999999999999978Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in x around 0 99.2%
clear-num99.2%
inv-pow99.2%
Applied egg-rr99.2%
unpow-199.2%
Simplified99.2%
clear-num99.2%
sub-neg99.2%
distribute-neg-frac299.2%
Applied egg-rr99.2%
distribute-frac-neg299.2%
sub-neg99.2%
associate-*r/99.2%
*-rgt-identity99.2%
times-frac99.2%
/-rgt-identity99.2%
associate-/r/99.3%
Simplified99.3%
if 0.00619999999999999978 < F Initial program 59.2%
Simplified70.2%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -36000000000.0)
(+ (/ -1.0 (sin B)) (/ -1.0 (/ (tan B) x)))
(if (<= F 0.0062)
(- (/ F (/ (sin B) (sqrt 0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x));
} else if (F <= 0.0062) {
tmp = (F / (sin(B) / sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-36000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) + ((-1.0d0) / (tan(b) / x))
else if (f <= 0.0062d0) then
tmp = (f / (sin(b) / sqrt(0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / Math.sin(B)) + (-1.0 / (Math.tan(B) / x));
} else if (F <= 0.0062) {
tmp = (F / (Math.sin(B) / Math.sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -36000000000.0: tmp = (-1.0 / math.sin(B)) + (-1.0 / (math.tan(B) / x)) elif F <= 0.0062: tmp = (F / (math.sin(B) / math.sqrt(0.5))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -36000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(-1.0 / Float64(tan(B) / x))); elseif (F <= 0.0062) tmp = Float64(Float64(F / Float64(sin(B) / sqrt(0.5))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -36000000000.0) tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x)); elseif (F <= 0.0062) tmp = (F / (sin(B) / sqrt(0.5))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -36000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0062], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -36000000000:\\
\;\;\;\;\frac{-1}{\sin B} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 0.0062:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.6e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
if -3.6e10 < F < 0.00619999999999999978Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in x around 0 99.2%
clear-num99.2%
inv-pow99.2%
Applied egg-rr99.2%
unpow-199.2%
Simplified99.2%
clear-num99.2%
sub-neg99.2%
distribute-neg-frac299.2%
Applied egg-rr99.2%
distribute-frac-neg299.2%
sub-neg99.2%
associate-*r/99.2%
*-rgt-identity99.2%
times-frac99.2%
/-rgt-identity99.2%
associate-/r/99.3%
Simplified99.3%
if 0.00619999999999999978 < F Initial program 59.2%
Simplified70.2%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -36000000000.0)
(+ (/ -1.0 (sin B)) (/ -1.0 (/ (tan B) x)))
(if (<= F 0.0062)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x));
} else if (F <= 0.0062) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-36000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) + ((-1.0d0) / (tan(b) / x))
else if (f <= 0.0062d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / Math.sin(B)) + (-1.0 / (Math.tan(B) / x));
} else if (F <= 0.0062) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -36000000000.0: tmp = (-1.0 / math.sin(B)) + (-1.0 / (math.tan(B) / x)) elif F <= 0.0062: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -36000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(-1.0 / Float64(tan(B) / x))); elseif (F <= 0.0062) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -36000000000.0) tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x)); elseif (F <= 0.0062) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -36000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0062], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -36000000000:\\
\;\;\;\;\frac{-1}{\sin B} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 0.0062:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.6e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
if -3.6e10 < F < 0.00619999999999999978Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in x around 0 99.2%
if 0.00619999999999999978 < F Initial program 59.2%
Simplified70.2%
Taylor expanded in F around inf 99.8%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -36000000000.0)
(+ (/ -1.0 (sin B)) (/ -1.0 (/ (tan B) x)))
(if (<= F 2e-93)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) t_0)
(if (<= F 0.0062)
(-
(* (/ 1.0 (/ (sin B) F)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x));
} else if (F <= 2e-93) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else if (F <= 0.0062) {
tmp = ((1.0 / (sin(B) / F)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-36000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) + ((-1.0d0) / (tan(b) / x))
else if (f <= 2d-93) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - t_0
else if (f <= 0.0062d0) then
tmp = ((1.0d0 / (sin(b) / f)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / Math.sin(B)) + (-1.0 / (Math.tan(B) / x));
} else if (F <= 2e-93) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else if (F <= 0.0062) {
tmp = ((1.0 / (Math.sin(B) / F)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -36000000000.0: tmp = (-1.0 / math.sin(B)) + (-1.0 / (math.tan(B) / x)) elif F <= 2e-93: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0 elif F <= 0.0062: tmp = ((1.0 / (math.sin(B) / F)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -36000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(-1.0 / Float64(tan(B) / x))); elseif (F <= 2e-93) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - t_0); elseif (F <= 0.0062) tmp = Float64(Float64(Float64(1.0 / Float64(sin(B) / F)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -36000000000.0) tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x)); elseif (F <= 2e-93) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0; elseif (F <= 0.0062) tmp = ((1.0 / (sin(B) / F)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -36000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2e-93], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0062], N[(N[(N[(1.0 / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -36000000000:\\
\;\;\;\;\frac{-1}{\sin B} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-93}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t\_0\\
\mathbf{elif}\;F \leq 0.0062:\\
\;\;\;\;\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.6e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
if -3.6e10 < F < 1.9999999999999998e-93Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in B around 0 86.3%
if 1.9999999999999998e-93 < F < 0.00619999999999999978Initial program 99.3%
clear-num99.4%
inv-pow99.4%
Applied egg-rr99.4%
unpow-199.4%
Simplified99.4%
Taylor expanded in B around 0 99.4%
associate-*r/99.4%
neg-mul-199.4%
Simplified99.4%
if 0.00619999999999999978 < F Initial program 59.2%
Simplified70.2%
Taylor expanded in F around inf 99.8%
Final simplification94.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -36000000000.0)
(+ (/ -1.0 (sin B)) (/ -1.0 (/ (tan B) x)))
(if (<= F 2.8e-93)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) t_0)
(if (<= F 0.0062)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F (sin B))) (/ x B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x));
} else if (F <= 2.8e-93) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else if (F <= 0.0062) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / sin(B))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-36000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) + ((-1.0d0) / (tan(b) / x))
else if (f <= 2.8d-93) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - t_0
else if (f <= 0.0062d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / sin(b))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / Math.sin(B)) + (-1.0 / (Math.tan(B) / x));
} else if (F <= 2.8e-93) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else if (F <= 0.0062) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -36000000000.0: tmp = (-1.0 / math.sin(B)) + (-1.0 / (math.tan(B) / x)) elif F <= 2.8e-93: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0 elif F <= 0.0062: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / math.sin(B))) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -36000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(-1.0 / Float64(tan(B) / x))); elseif (F <= 2.8e-93) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - t_0); elseif (F <= 0.0062) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -36000000000.0) tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x)); elseif (F <= 2.8e-93) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0; elseif (F <= 0.0062) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / sin(B))) - (x / B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -36000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.8e-93], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0062], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -36000000000:\\
\;\;\;\;\frac{-1}{\sin B} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-93}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t\_0\\
\mathbf{elif}\;F \leq 0.0062:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.6e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
if -3.6e10 < F < 2.79999999999999998e-93Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in B around 0 86.3%
if 2.79999999999999998e-93 < F < 0.00619999999999999978Initial program 99.3%
Taylor expanded in B around 0 99.3%
associate-*r/99.4%
neg-mul-199.4%
Simplified99.3%
if 0.00619999999999999978 < F Initial program 59.2%
Simplified70.2%
Taylor expanded in F around inf 99.8%
Final simplification94.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e-5)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -2.7e-66)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F 2.3e-93)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 0.0046)
(/ F (/ (sin B) (sqrt 0.5)))
(- (/ 1.0 (sin B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e-5) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -2.7e-66) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= 2.3e-93) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 0.0046) {
tmp = F / (sin(B) / sqrt(0.5));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1d-5)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-2.7d-66)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= 2.3d-93) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 0.0046d0) then
tmp = f / (sin(b) / sqrt(0.5d0))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1e-5) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -2.7e-66) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= 2.3e-93) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 0.0046) {
tmp = F / (Math.sin(B) / Math.sqrt(0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1e-5: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -2.7e-66: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= 2.3e-93: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 0.0046: tmp = F / (math.sin(B) / math.sqrt(0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e-5) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -2.7e-66) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= 2.3e-93) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 0.0046) tmp = Float64(F / Float64(sin(B) / sqrt(0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1e-5) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -2.7e-66) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= 2.3e-93) tmp = (x * cos(B)) / -sin(B); elseif (F <= 0.0046) tmp = F / (sin(B) / sqrt(0.5)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.7e-66], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e-93], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.0046], N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $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}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -2.7 \cdot 10^{-66}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-93}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 0.0046:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.00000000000000008e-5Initial program 61.2%
Simplified75.5%
Taylor expanded in F around -inf 99.7%
if -1.00000000000000008e-5 < F < -2.69999999999999996e-66Initial program 99.3%
Simplified99.6%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 90.6%
associate-/l*90.6%
Simplified90.6%
if -2.69999999999999996e-66 < F < 2.2999999999999998e-93Initial program 99.6%
Simplified99.7%
Taylor expanded in F around -inf 33.0%
clear-num32.8%
inv-pow32.8%
Applied egg-rr32.8%
unpow-132.8%
Simplified32.8%
Taylor expanded in x around inf 83.4%
mul-1-neg83.4%
Simplified83.4%
if 2.2999999999999998e-93 < F < 0.0045999999999999999Initial program 99.3%
Simplified99.0%
Taylor expanded in F around 0 96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in x around 0 96.4%
clear-num96.6%
inv-pow96.6%
Applied egg-rr96.6%
unpow-196.6%
Simplified96.6%
Taylor expanded in F around inf 77.4%
*-rgt-identity77.4%
times-frac77.5%
/-rgt-identity77.5%
associate-/r/77.9%
Simplified77.9%
if 0.0045999999999999999 < F Initial program 59.2%
Simplified70.2%
Taylor expanded in F around inf 99.8%
Final simplification91.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -36000000000.0)
(+ (/ -1.0 (sin B)) (/ -1.0 (/ (tan B) x)))
(if (<= F 7e-84)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) t_0)
(if (<= F 0.0062)
(- (* F (/ 1.0 (/ (sin B) (sqrt 0.5)))) (/ x B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x));
} else if (F <= 7e-84) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else if (F <= 0.0062) {
tmp = (F * (1.0 / (sin(B) / sqrt(0.5)))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-36000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) + ((-1.0d0) / (tan(b) / x))
else if (f <= 7d-84) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - t_0
else if (f <= 0.0062d0) then
tmp = (f * (1.0d0 / (sin(b) / sqrt(0.5d0)))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / Math.sin(B)) + (-1.0 / (Math.tan(B) / x));
} else if (F <= 7e-84) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else if (F <= 0.0062) {
tmp = (F * (1.0 / (Math.sin(B) / Math.sqrt(0.5)))) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -36000000000.0: tmp = (-1.0 / math.sin(B)) + (-1.0 / (math.tan(B) / x)) elif F <= 7e-84: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0 elif F <= 0.0062: tmp = (F * (1.0 / (math.sin(B) / math.sqrt(0.5)))) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -36000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(-1.0 / Float64(tan(B) / x))); elseif (F <= 7e-84) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - t_0); elseif (F <= 0.0062) tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) / sqrt(0.5)))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -36000000000.0) tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x)); elseif (F <= 7e-84) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0; elseif (F <= 0.0062) tmp = (F * (1.0 / (sin(B) / sqrt(0.5)))) - (x / B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -36000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7e-84], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0062], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -36000000000:\\
\;\;\;\;\frac{-1}{\sin B} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-84}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t\_0\\
\mathbf{elif}\;F \leq 0.0062:\\
\;\;\;\;F \cdot \frac{1}{\frac{\sin B}{\sqrt{0.5}}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.6e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
if -3.6e10 < F < 7.0000000000000002e-84Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in B around 0 86.4%
if 7.0000000000000002e-84 < F < 0.00619999999999999978Initial program 99.2%
Simplified99.0%
Taylor expanded in F around 0 96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in x around 0 96.2%
Taylor expanded in B around 0 96.2%
clear-num96.5%
inv-pow96.5%
Applied egg-rr96.5%
unpow-196.5%
Simplified96.5%
if 0.00619999999999999978 < F Initial program 59.2%
Simplified70.2%
Taylor expanded in F around inf 99.8%
Final simplification94.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -36000000000.0)
(+ (/ -1.0 (sin B)) (/ -1.0 (/ (tan B) x)))
(if (<= F 9.6e-81)
(- (/ (* F (sqrt 0.5)) B) t_0)
(if (<= F 0.0048)
(- (* F (/ 1.0 (/ (sin B) (sqrt 0.5)))) (/ x B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x));
} else if (F <= 9.6e-81) {
tmp = ((F * sqrt(0.5)) / B) - t_0;
} else if (F <= 0.0048) {
tmp = (F * (1.0 / (sin(B) / sqrt(0.5)))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-36000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) + ((-1.0d0) / (tan(b) / x))
else if (f <= 9.6d-81) then
tmp = ((f * sqrt(0.5d0)) / b) - t_0
else if (f <= 0.0048d0) then
tmp = (f * (1.0d0 / (sin(b) / sqrt(0.5d0)))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / Math.sin(B)) + (-1.0 / (Math.tan(B) / x));
} else if (F <= 9.6e-81) {
tmp = ((F * Math.sqrt(0.5)) / B) - t_0;
} else if (F <= 0.0048) {
tmp = (F * (1.0 / (Math.sin(B) / Math.sqrt(0.5)))) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -36000000000.0: tmp = (-1.0 / math.sin(B)) + (-1.0 / (math.tan(B) / x)) elif F <= 9.6e-81: tmp = ((F * math.sqrt(0.5)) / B) - t_0 elif F <= 0.0048: tmp = (F * (1.0 / (math.sin(B) / math.sqrt(0.5)))) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -36000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(-1.0 / Float64(tan(B) / x))); elseif (F <= 9.6e-81) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - t_0); elseif (F <= 0.0048) tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) / sqrt(0.5)))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -36000000000.0) tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x)); elseif (F <= 9.6e-81) tmp = ((F * sqrt(0.5)) / B) - t_0; elseif (F <= 0.0048) tmp = (F * (1.0 / (sin(B) / sqrt(0.5)))) - (x / B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -36000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.6e-81], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0048], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -36000000000:\\
\;\;\;\;\frac{-1}{\sin B} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 9.6 \cdot 10^{-81}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - t\_0\\
\mathbf{elif}\;F \leq 0.0048:\\
\;\;\;\;F \cdot \frac{1}{\frac{\sin B}{\sqrt{0.5}}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.6e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
if -3.6e10 < F < 9.5999999999999996e-81Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
clear-num99.7%
inv-pow99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
Taylor expanded in B around 0 86.5%
if 9.5999999999999996e-81 < F < 0.00479999999999999958Initial program 99.3%
Simplified99.0%
Taylor expanded in F around 0 96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in x around 0 96.1%
Taylor expanded in B around 0 96.1%
clear-num96.4%
inv-pow96.4%
Applied egg-rr96.4%
unpow-196.4%
Simplified96.4%
if 0.00479999999999999958 < F Initial program 59.2%
Simplified70.2%
Taylor expanded in F around inf 99.8%
Final simplification94.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (/ 1.0 (sin B))))
(if (<= F -36000000000.0)
(+ (/ -1.0 (sin B)) (/ -1.0 (/ (tan B) x)))
(if (<= F 2.8e-93)
(- (/ (* F (sqrt 0.5)) B) t_0)
(if (<= F 0.0062) (- (* F (* t_1 (sqrt 0.5))) (/ x B)) (- t_1 t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = 1.0 / sin(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x));
} else if (F <= 2.8e-93) {
tmp = ((F * sqrt(0.5)) / B) - t_0;
} else if (F <= 0.0062) {
tmp = (F * (t_1 * sqrt(0.5))) - (x / B);
} else {
tmp = t_1 - 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 / tan(b)
t_1 = 1.0d0 / sin(b)
if (f <= (-36000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) + ((-1.0d0) / (tan(b) / x))
else if (f <= 2.8d-93) then
tmp = ((f * sqrt(0.5d0)) / b) - t_0
else if (f <= 0.0062d0) then
tmp = (f * (t_1 * sqrt(0.5d0))) - (x / b)
else
tmp = t_1 - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double t_1 = 1.0 / Math.sin(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / Math.sin(B)) + (-1.0 / (Math.tan(B) / x));
} else if (F <= 2.8e-93) {
tmp = ((F * Math.sqrt(0.5)) / B) - t_0;
} else if (F <= 0.0062) {
tmp = (F * (t_1 * Math.sqrt(0.5))) - (x / B);
} else {
tmp = t_1 - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = 1.0 / math.sin(B) tmp = 0 if F <= -36000000000.0: tmp = (-1.0 / math.sin(B)) + (-1.0 / (math.tan(B) / x)) elif F <= 2.8e-93: tmp = ((F * math.sqrt(0.5)) / B) - t_0 elif F <= 0.0062: tmp = (F * (t_1 * math.sqrt(0.5))) - (x / B) else: tmp = t_1 - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(1.0 / sin(B)) tmp = 0.0 if (F <= -36000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(-1.0 / Float64(tan(B) / x))); elseif (F <= 2.8e-93) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - t_0); elseif (F <= 0.0062) tmp = Float64(Float64(F * Float64(t_1 * sqrt(0.5))) - Float64(x / B)); else tmp = Float64(t_1 - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = 1.0 / sin(B); tmp = 0.0; if (F <= -36000000000.0) tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x)); elseif (F <= 2.8e-93) tmp = ((F * sqrt(0.5)) / B) - t_0; elseif (F <= 0.0062) tmp = (F * (t_1 * sqrt(0.5))) - (x / B); else tmp = t_1 - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -36000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.8e-93], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0062], N[(N[(F * N[(t$95$1 * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -36000000000:\\
\;\;\;\;\frac{-1}{\sin B} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-93}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - t\_0\\
\mathbf{elif}\;F \leq 0.0062:\\
\;\;\;\;F \cdot \left(t\_1 \cdot \sqrt{0.5}\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\_0\\
\end{array}
\end{array}
if F < -3.6e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
if -3.6e10 < F < 2.79999999999999998e-93Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
Taylor expanded in B around 0 86.3%
if 2.79999999999999998e-93 < F < 0.00619999999999999978Initial program 99.3%
Simplified99.0%
Taylor expanded in F around 0 96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in x around 0 96.4%
Taylor expanded in B around 0 96.4%
div-inv96.5%
Applied egg-rr96.5%
if 0.00619999999999999978 < F Initial program 59.2%
Simplified70.2%
Taylor expanded in F around inf 99.8%
Final simplification94.0%
(FPCore (F B x)
:precision binary64
(if (<= F -0.085)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F -3.8e-156) (and (not (<= F 2.4e-93)) (<= F 0.0057)))
(/ F (/ (sin B) (sqrt 0.5)))
(- (/ 1.0 B) (* x (/ 1.0 (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.085) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= -3.8e-156) || (!(F <= 2.4e-93) && (F <= 0.0057))) {
tmp = F / (sin(B) / sqrt(0.5));
} else {
tmp = (1.0 / B) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.085d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= (-3.8d-156)) .or. (.not. (f <= 2.4d-93)) .and. (f <= 0.0057d0)) then
tmp = f / (sin(b) / sqrt(0.5d0))
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.085) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= -3.8e-156) || (!(F <= 2.4e-93) && (F <= 0.0057))) {
tmp = F / (Math.sin(B) / Math.sqrt(0.5));
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.085: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= -3.8e-156) or (not (F <= 2.4e-93) and (F <= 0.0057)): tmp = F / (math.sin(B) / math.sqrt(0.5)) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.085) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= -3.8e-156) || (!(F <= 2.4e-93) && (F <= 0.0057))) tmp = Float64(F / Float64(sin(B) / sqrt(0.5))); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.085) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= -3.8e-156) || (~((F <= 2.4e-93)) && (F <= 0.0057))) tmp = F / (sin(B) / sqrt(0.5)); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.085], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, -3.8e-156], And[N[Not[LessEqual[F, 2.4e-93]], $MachinePrecision], LessEqual[F, 0.0057]]], N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.085:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.8 \cdot 10^{-156} \lor \neg \left(F \leq 2.4 \cdot 10^{-93}\right) \land F \leq 0.0057:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -0.0850000000000000061Initial program 61.2%
Simplified75.5%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 79.5%
if -0.0850000000000000061 < F < -3.80000000000000008e-156 or 2.4000000000000001e-93 < F < 0.0057000000000000002Initial program 99.4%
Simplified99.3%
Taylor expanded in F around 0 98.0%
*-commutative98.0%
Simplified98.0%
Taylor expanded in x around 0 98.0%
clear-num98.2%
inv-pow98.2%
Applied egg-rr98.2%
unpow-198.2%
Simplified98.2%
Taylor expanded in F around inf 72.4%
*-rgt-identity72.4%
times-frac72.4%
/-rgt-identity72.4%
associate-/r/72.7%
Simplified72.7%
if -3.80000000000000008e-156 < F < 2.4000000000000001e-93 or 0.0057000000000000002 < F Initial program 81.3%
Taylor expanded in B around 0 69.7%
Taylor expanded in F around inf 61.3%
Final simplification68.0%
(FPCore (F B x)
:precision binary64
(if (<= F -0.0021)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F -3.9e-156) (and (not (<= F 1.95e-93)) (<= F 0.0048)))
(* F (/ (sqrt 0.5) (sin B)))
(- (/ 1.0 B) (* x (/ 1.0 (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.0021) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= -3.9e-156) || (!(F <= 1.95e-93) && (F <= 0.0048))) {
tmp = F * (sqrt(0.5) / sin(B));
} else {
tmp = (1.0 / B) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.0021d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= (-3.9d-156)) .or. (.not. (f <= 1.95d-93)) .and. (f <= 0.0048d0)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.0021) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= -3.9e-156) || (!(F <= 1.95e-93) && (F <= 0.0048))) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.0021: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= -3.9e-156) or (not (F <= 1.95e-93) and (F <= 0.0048)): tmp = F * (math.sqrt(0.5) / math.sin(B)) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.0021) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= -3.9e-156) || (!(F <= 1.95e-93) && (F <= 0.0048))) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.0021) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= -3.9e-156) || (~((F <= 1.95e-93)) && (F <= 0.0048))) tmp = F * (sqrt(0.5) / sin(B)); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.0021], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, -3.9e-156], And[N[Not[LessEqual[F, 1.95e-93]], $MachinePrecision], LessEqual[F, 0.0048]]], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.0021:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.9 \cdot 10^{-156} \lor \neg \left(F \leq 1.95 \cdot 10^{-93}\right) \land F \leq 0.0048:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -0.00209999999999999987Initial program 61.2%
Simplified75.5%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 79.5%
if -0.00209999999999999987 < F < -3.9000000000000001e-156 or 1.95000000000000009e-93 < F < 0.00479999999999999958Initial program 99.4%
Simplified99.3%
Taylor expanded in F around 0 98.0%
*-commutative98.0%
Simplified98.0%
Taylor expanded in x around 0 72.4%
associate-/l*72.3%
Simplified72.3%
if -3.9000000000000001e-156 < F < 1.95000000000000009e-93 or 0.00479999999999999958 < F Initial program 81.3%
Taylor expanded in B around 0 69.7%
Taylor expanded in F around inf 61.3%
Final simplification67.9%
(FPCore (F B x)
:precision binary64
(if (<= F -7.2e-5)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -2.35e-66)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F 3.1e-93)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 0.0052)
(/ F (/ (sin B) (sqrt 0.5)))
(- (/ 1.0 B) (* x (/ 1.0 (tan B)))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-5) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -2.35e-66) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= 3.1e-93) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 0.0052) {
tmp = F / (sin(B) / sqrt(0.5));
} else {
tmp = (1.0 / B) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.2d-5)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-2.35d-66)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= 3.1d-93) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 0.0052d0) then
tmp = f / (sin(b) / sqrt(0.5d0))
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-5) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -2.35e-66) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= 3.1e-93) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 0.0052) {
tmp = F / (Math.sin(B) / Math.sqrt(0.5));
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e-5: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -2.35e-66: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= 3.1e-93: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 0.0052: tmp = F / (math.sin(B) / math.sqrt(0.5)) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -2.35e-66) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= 3.1e-93) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 0.0052) tmp = Float64(F / Float64(sin(B) / sqrt(0.5))); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e-5) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -2.35e-66) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= 3.1e-93) tmp = (x * cos(B)) / -sin(B); elseif (F <= 0.0052) tmp = F / (sin(B) / sqrt(0.5)); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.35e-66], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.1e-93], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.0052], N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -2.35 \cdot 10^{-66}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-93}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 0.0052:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -7.20000000000000018e-5Initial program 61.2%
Simplified75.5%
Taylor expanded in F around -inf 99.7%
if -7.20000000000000018e-5 < F < -2.35e-66Initial program 99.3%
Simplified99.6%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 90.6%
associate-/l*90.6%
Simplified90.6%
if -2.35e-66 < F < 3.1e-93Initial program 99.6%
Simplified99.7%
Taylor expanded in F around -inf 33.0%
clear-num32.8%
inv-pow32.8%
Applied egg-rr32.8%
unpow-132.8%
Simplified32.8%
Taylor expanded in x around inf 83.4%
mul-1-neg83.4%
Simplified83.4%
if 3.1e-93 < F < 0.0051999999999999998Initial program 99.3%
Simplified99.0%
Taylor expanded in F around 0 96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in x around 0 96.4%
clear-num96.6%
inv-pow96.6%
Applied egg-rr96.6%
unpow-196.6%
Simplified96.6%
Taylor expanded in F around inf 77.4%
*-rgt-identity77.4%
times-frac77.5%
/-rgt-identity77.5%
associate-/r/77.9%
Simplified77.9%
if 0.0051999999999999998 < F Initial program 59.2%
Taylor expanded in B around 0 43.5%
Taylor expanded in F around inf 70.0%
Final simplification84.2%
(FPCore (F B x)
:precision binary64
(if (<= F -0.0017)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.4e-66)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F 3.2e-93)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 0.0047)
(/ F (/ (sin B) (sqrt 0.5)))
(- (/ 1.0 B) (* x (/ 1.0 (tan B)))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.0017) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.4e-66) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= 3.2e-93) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 0.0047) {
tmp = F / (sin(B) / sqrt(0.5));
} else {
tmp = (1.0 / B) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.0017d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.4d-66)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= 3.2d-93) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 0.0047d0) then
tmp = f / (sin(b) / sqrt(0.5d0))
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.0017) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.4e-66) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= 3.2e-93) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 0.0047) {
tmp = F / (Math.sin(B) / Math.sqrt(0.5));
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.0017: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.4e-66: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= 3.2e-93: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 0.0047: tmp = F / (math.sin(B) / math.sqrt(0.5)) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.0017) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.4e-66) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= 3.2e-93) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 0.0047) tmp = Float64(F / Float64(sin(B) / sqrt(0.5))); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.0017) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.4e-66) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= 3.2e-93) tmp = (x * cos(B)) / -sin(B); elseif (F <= 0.0047) tmp = F / (sin(B) / sqrt(0.5)); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.0017], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.4e-66], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e-93], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.0047], N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.0017:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.4 \cdot 10^{-66}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-93}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 0.0047:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -0.00169999999999999991Initial program 61.2%
Simplified75.5%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 79.5%
if -0.00169999999999999991 < F < -2.40000000000000026e-66Initial program 99.3%
Simplified99.6%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 90.6%
associate-/l*90.6%
Simplified90.6%
if -2.40000000000000026e-66 < F < 3.1999999999999999e-93Initial program 99.6%
Simplified99.7%
Taylor expanded in F around -inf 33.0%
clear-num32.8%
inv-pow32.8%
Applied egg-rr32.8%
unpow-132.8%
Simplified32.8%
Taylor expanded in x around inf 83.4%
mul-1-neg83.4%
Simplified83.4%
if 3.1999999999999999e-93 < F < 0.00470000000000000018Initial program 99.3%
Simplified99.0%
Taylor expanded in F around 0 96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in x around 0 96.4%
clear-num96.6%
inv-pow96.6%
Applied egg-rr96.6%
unpow-196.6%
Simplified96.6%
Taylor expanded in F around inf 77.4%
*-rgt-identity77.4%
times-frac77.5%
/-rgt-identity77.5%
associate-/r/77.9%
Simplified77.9%
if 0.00470000000000000018 < F Initial program 59.2%
Taylor expanded in B around 0 43.5%
Taylor expanded in F around inf 70.0%
Final simplification78.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -36000000000.0)
(+ (/ -1.0 (sin B)) (/ -1.0 (/ (tan B) x)))
(if (<= F 2.7e-77)
(- (/ (* F (sqrt 0.5)) B) t_0)
(if (<= F 0.006)
(- (* F (/ (sqrt 0.5) (sin B))) (/ x B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x));
} else if (F <= 2.7e-77) {
tmp = ((F * sqrt(0.5)) / B) - t_0;
} else if (F <= 0.006) {
tmp = (F * (sqrt(0.5) / sin(B))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-36000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) + ((-1.0d0) / (tan(b) / x))
else if (f <= 2.7d-77) then
tmp = ((f * sqrt(0.5d0)) / b) - t_0
else if (f <= 0.006d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / Math.sin(B)) + (-1.0 / (Math.tan(B) / x));
} else if (F <= 2.7e-77) {
tmp = ((F * Math.sqrt(0.5)) / B) - t_0;
} else if (F <= 0.006) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -36000000000.0: tmp = (-1.0 / math.sin(B)) + (-1.0 / (math.tan(B) / x)) elif F <= 2.7e-77: tmp = ((F * math.sqrt(0.5)) / B) - t_0 elif F <= 0.006: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -36000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(-1.0 / Float64(tan(B) / x))); elseif (F <= 2.7e-77) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - t_0); elseif (F <= 0.006) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -36000000000.0) tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x)); elseif (F <= 2.7e-77) tmp = ((F * sqrt(0.5)) / B) - t_0; elseif (F <= 0.006) tmp = (F * (sqrt(0.5) / sin(B))) - (x / B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -36000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e-77], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.006], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -36000000000:\\
\;\;\;\;\frac{-1}{\sin B} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-77}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - t\_0\\
\mathbf{elif}\;F \leq 0.006:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.6e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
if -3.6e10 < F < 2.7e-77Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
clear-num99.7%
inv-pow99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
Taylor expanded in B around 0 86.5%
if 2.7e-77 < F < 0.0060000000000000001Initial program 99.3%
Simplified99.0%
Taylor expanded in F around 0 96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in x around 0 96.1%
Taylor expanded in B around 0 96.1%
if 0.0060000000000000001 < F Initial program 59.2%
Simplified70.2%
Taylor expanded in F around inf 99.8%
Final simplification94.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -36000000000.0)
(+ (/ -1.0 (sin B)) (/ -1.0 (/ (tan B) x)))
(if (<= F 2.8e-93)
(- (* F (/ (sqrt 0.5) B)) t_0)
(if (<= F 0.0058)
(- (* F (/ (sqrt 0.5) (sin B))) (/ x B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x));
} else if (F <= 2.8e-93) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else if (F <= 0.0058) {
tmp = (F * (sqrt(0.5) / sin(B))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-36000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) + ((-1.0d0) / (tan(b) / x))
else if (f <= 2.8d-93) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else if (f <= 0.0058d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / Math.sin(B)) + (-1.0 / (Math.tan(B) / x));
} else if (F <= 2.8e-93) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else if (F <= 0.0058) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -36000000000.0: tmp = (-1.0 / math.sin(B)) + (-1.0 / (math.tan(B) / x)) elif F <= 2.8e-93: tmp = (F * (math.sqrt(0.5) / B)) - t_0 elif F <= 0.0058: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -36000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(-1.0 / Float64(tan(B) / x))); elseif (F <= 2.8e-93) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); elseif (F <= 0.0058) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -36000000000.0) tmp = (-1.0 / sin(B)) + (-1.0 / (tan(B) / x)); elseif (F <= 2.8e-93) tmp = (F * (sqrt(0.5) / B)) - t_0; elseif (F <= 0.0058) tmp = (F * (sqrt(0.5) / sin(B))) - (x / B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -36000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.8e-93], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0058], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -36000000000:\\
\;\;\;\;\frac{-1}{\sin B} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-93}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{elif}\;F \leq 0.0058:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.6e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
if -3.6e10 < F < 2.79999999999999998e-93Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in B around 0 86.3%
if 2.79999999999999998e-93 < F < 0.0058Initial program 99.3%
Simplified99.0%
Taylor expanded in F around 0 96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in x around 0 96.4%
Taylor expanded in B around 0 96.4%
if 0.0058 < F Initial program 59.2%
Simplified70.2%
Taylor expanded in F around inf 99.8%
Final simplification94.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -36000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.1e-93)
(- (* F (/ (sqrt 0.5) B)) t_0)
(if (<= F 0.0062)
(- (* F (/ (sqrt 0.5) (sin B))) (/ x B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.1e-93) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else if (F <= 0.0062) {
tmp = (F * (sqrt(0.5) / sin(B))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-36000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.1d-93) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else if (f <= 0.0062d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.1e-93) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else if (F <= 0.0062) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -36000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.1e-93: tmp = (F * (math.sqrt(0.5) / B)) - t_0 elif F <= 0.0062: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -36000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.1e-93) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); elseif (F <= 0.0062) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -36000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.1e-93) tmp = (F * (sqrt(0.5) / B)) - t_0; elseif (F <= 0.0062) tmp = (F * (sqrt(0.5) / sin(B))) - (x / B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -36000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.1e-93], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0062], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -36000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-93}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{elif}\;F \leq 0.0062:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.6e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
if -3.6e10 < F < 2.1000000000000001e-93Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in B around 0 86.3%
if 2.1000000000000001e-93 < F < 0.00619999999999999978Initial program 99.3%
Simplified99.0%
Taylor expanded in F around 0 96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in x around 0 96.4%
Taylor expanded in B around 0 96.4%
if 0.00619999999999999978 < F Initial program 59.2%
Simplified70.2%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -36000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.4e-42)
(- (* F (/ (sqrt 0.5) B)) t_0)
(if (<= F 0.0057)
(/ F (/ (sin B) (sqrt 0.5)))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.4e-42) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else if (F <= 0.0057) {
tmp = F / (sin(B) / sqrt(0.5));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-36000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.4d-42) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else if (f <= 0.0057d0) then
tmp = f / (sin(b) / sqrt(0.5d0))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -36000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.4e-42) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else if (F <= 0.0057) {
tmp = F / (Math.sin(B) / Math.sqrt(0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -36000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.4e-42: tmp = (F * (math.sqrt(0.5) / B)) - t_0 elif F <= 0.0057: tmp = F / (math.sin(B) / math.sqrt(0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -36000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.4e-42) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); elseif (F <= 0.0057) tmp = Float64(F / Float64(sin(B) / sqrt(0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -36000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.4e-42) tmp = (F * (sqrt(0.5) / B)) - t_0; elseif (F <= 0.0057) tmp = F / (sin(B) / sqrt(0.5)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -36000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.4e-42], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0057], N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $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}{\tan B}\\
\mathbf{if}\;F \leq -36000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-42}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{elif}\;F \leq 0.0057:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.6e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
if -3.6e10 < F < 2.40000000000000003e-42Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in B around 0 85.1%
if 2.40000000000000003e-42 < F < 0.0057000000000000002Initial program 99.0%
Simplified98.8%
Taylor expanded in F around 0 92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in x around 0 92.9%
clear-num93.3%
inv-pow93.3%
Applied egg-rr93.3%
unpow-193.3%
Simplified93.3%
Taylor expanded in F around inf 92.8%
*-rgt-identity92.8%
times-frac93.0%
/-rgt-identity93.0%
associate-/r/93.6%
Simplified93.6%
if 0.0057000000000000002 < F Initial program 59.2%
Simplified70.2%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(if (<= F -1500000000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.2e-93)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 2.3e-9)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1500000000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.2e-93) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 2.3e-9) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1500000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.2d-93) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 2.3d-9) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1500000000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.2e-93) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 2.3e-9) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1500000000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.2e-93: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 2.3e-9: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1500000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.2e-93) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 2.3e-9) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1500000000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.2e-93) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 2.3e-9) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1500000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.2e-93], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e-9], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1500000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-93}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-9}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -1.5e12Initial program 58.8%
Simplified74.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 79.7%
if -1.5e12 < F < 2.19999999999999996e-93Initial program 99.5%
Simplified99.7%
Taylor expanded in F around -inf 33.0%
Taylor expanded in B around 0 50.1%
if 2.19999999999999996e-93 < F < 2.2999999999999999e-9Initial program 99.2%
Simplified99.0%
Taylor expanded in F around 0 99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in B around 0 67.4%
Taylor expanded in F around 0 67.6%
if 2.2999999999999999e-9 < F Initial program 60.4%
Taylor expanded in B around 0 42.3%
Taylor expanded in F around inf 68.1%
Final simplification63.5%
(FPCore (F B x)
:precision binary64
(if (<= F -1460000000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.4e-93)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 3.9e-10)
(- (* (sqrt 0.5) (/ F B)) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1460000000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.4e-93) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 3.9e-10) {
tmp = (sqrt(0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1460000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.4d-93) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 3.9d-10) then
tmp = (sqrt(0.5d0) * (f / b)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1460000000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.4e-93) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 3.9e-10) {
tmp = (Math.sqrt(0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1460000000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.4e-93: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 3.9e-10: tmp = (math.sqrt(0.5) * (F / B)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1460000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.4e-93) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 3.9e-10) tmp = Float64(Float64(sqrt(0.5) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1460000000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.4e-93) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 3.9e-10) tmp = (sqrt(0.5) * (F / B)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1460000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.4e-93], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.9e-10], N[(N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1460000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-93}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 3.9 \cdot 10^{-10}:\\
\;\;\;\;\sqrt{0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -1.46e12Initial program 58.8%
Simplified74.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 79.7%
if -1.46e12 < F < 2.4000000000000001e-93Initial program 99.5%
Simplified99.7%
Taylor expanded in F around -inf 33.0%
Taylor expanded in B around 0 50.1%
if 2.4000000000000001e-93 < F < 3.9e-10Initial program 99.2%
Simplified99.0%
Taylor expanded in F around 0 99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in B around 0 67.4%
Taylor expanded in F around 0 67.6%
Taylor expanded in x around 0 67.6%
if 3.9e-10 < F Initial program 60.4%
Taylor expanded in B around 0 42.3%
Taylor expanded in F around inf 68.1%
Final simplification63.5%
(FPCore (F B x)
:precision binary64
(if (<= F -29500000000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.8e-93)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 2.1e-9)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 B) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -29500000000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.8e-93) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 2.1e-9) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-29500000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.8d-93) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 2.1d-9) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -29500000000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.8e-93) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 2.1e-9) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -29500000000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.8e-93: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 2.1e-9: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -29500000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.8e-93) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 2.1e-9) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -29500000000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.8e-93) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 2.1e-9) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -29500000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.8e-93], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.1e-9], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -29500000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-93}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-9}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -2.95e13Initial program 58.8%
Simplified74.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 79.7%
if -2.95e13 < F < 2.79999999999999998e-93Initial program 99.5%
Simplified99.7%
Taylor expanded in F around -inf 33.0%
Taylor expanded in B around 0 50.1%
if 2.79999999999999998e-93 < F < 2.10000000000000019e-9Initial program 99.2%
Simplified99.0%
Taylor expanded in F around 0 99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in B around 0 67.4%
Taylor expanded in x around 0 67.4%
if 2.10000000000000019e-9 < F Initial program 60.4%
Taylor expanded in B around 0 42.3%
Taylor expanded in F around inf 68.1%
Final simplification63.5%
(FPCore (F B x) :precision binary64 (if (or (<= x -2.4e-129) (not (<= x 1.6e-116))) (- (/ -1.0 B) (/ x (tan B))) (/ -1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -2.4e-129) || !(x <= 1.6e-116)) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = -1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-2.4d-129)) .or. (.not. (x <= 1.6d-116))) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = (-1.0d0) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -2.4e-129) || !(x <= 1.6e-116)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = -1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -2.4e-129) or not (x <= 1.6e-116): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = -1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -2.4e-129) || !(x <= 1.6e-116)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(-1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -2.4e-129) || ~((x <= 1.6e-116))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = -1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -2.4e-129], N[Not[LessEqual[x, 1.6e-116]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{-129} \lor \neg \left(x \leq 1.6 \cdot 10^{-116}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\end{array}
\end{array}
if x < -2.39999999999999989e-129 or 1.60000000000000005e-116 < x Initial program 82.8%
Simplified91.4%
Taylor expanded in F around -inf 62.1%
Taylor expanded in B around 0 67.8%
if -2.39999999999999989e-129 < x < 1.60000000000000005e-116Initial program 71.9%
Simplified75.1%
Taylor expanded in F around -inf 30.5%
clear-num30.5%
inv-pow30.5%
Applied egg-rr30.5%
unpow-130.5%
Simplified30.5%
Taylor expanded in x around 0 30.5%
Final simplification54.5%
(FPCore (F B x) :precision binary64 (if (<= B 6e-45) (/ (- (* F (sqrt 0.5)) x) B) (- (/ -1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 6e-45) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (-1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (b <= 6d-45) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = ((-1.0d0) / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 6e-45) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (-1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 6e-45: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (-1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 6e-45) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 6e-45) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (-1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 6e-45], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 6 \cdot 10^{-45}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 6.00000000000000022e-45Initial program 77.4%
Simplified85.8%
Taylor expanded in F around 0 59.1%
*-commutative59.1%
Simplified59.1%
Taylor expanded in B around 0 38.5%
Taylor expanded in x around 0 39.9%
if 6.00000000000000022e-45 < B Initial program 83.3%
Simplified85.1%
Taylor expanded in F around -inf 47.1%
Taylor expanded in B around 0 48.6%
(FPCore (F B x) :precision binary64 (if (<= F -2.72e+14) (- (/ -1.0 (sin B)) (/ x B)) (- (/ -1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.72e+14) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = (-1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.72d+14)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = ((-1.0d0) / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.72e+14) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (-1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.72e+14: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = (-1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.72e+14) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.72e+14) tmp = (-1.0 / sin(B)) - (x / B); else tmp = (-1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.72e+14], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.72 \cdot 10^{+14}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.72e14Initial program 58.8%
Simplified74.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 79.7%
if -2.72e14 < F Initial program 85.6%
Simplified89.5%
Taylor expanded in F around -inf 34.6%
Taylor expanded in B around 0 44.6%
(FPCore (F B x) :precision binary64 (if (<= F -36000000000.0) (/ -1.0 (sin B)) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -36000000000.0) {
tmp = -1.0 / sin(B);
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-36000000000.0d0)) then
tmp = (-1.0d0) / sin(b)
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -36000000000.0) {
tmp = -1.0 / Math.sin(B);
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -36000000000.0: tmp = -1.0 / math.sin(B) else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -36000000000.0) tmp = Float64(-1.0 / sin(B)); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -36000000000.0) tmp = -1.0 / sin(B); else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -36000000000.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -36000000000:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -3.6e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
Taylor expanded in x around 0 64.2%
if -3.6e10 < F Initial program 85.6%
Simplified89.5%
Taylor expanded in F around -inf 34.2%
Taylor expanded in B around 0 18.8%
mul-1-neg18.8%
distribute-neg-frac218.8%
+-commutative18.8%
Simplified18.8%
Taylor expanded in x around inf 29.6%
associate-*r/29.6%
neg-mul-129.6%
Simplified29.6%
(FPCore (F B x) :precision binary64 (if (<= F -2.3e-87) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-87) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.3d-87)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-87) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.3e-87: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.3e-87) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.3e-87) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.3e-87], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.3 \cdot 10^{-87}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -2.3000000000000001e-87Initial program 68.4%
Simplified80.0%
Taylor expanded in F around -inf 85.7%
Taylor expanded in B around 0 40.3%
mul-1-neg40.3%
distribute-neg-frac240.3%
+-commutative40.3%
Simplified40.3%
if -2.3000000000000001e-87 < F Initial program 84.0%
Simplified88.3%
Taylor expanded in F around -inf 33.8%
Taylor expanded in B around 0 18.6%
mul-1-neg18.6%
distribute-neg-frac218.6%
+-commutative18.6%
Simplified18.6%
Taylor expanded in x around inf 30.9%
associate-*r/30.9%
neg-mul-130.9%
Simplified30.9%
Final simplification34.0%
(FPCore (F B x) :precision binary64 (if (<= F -95000000000.0) (/ -1.0 B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -95000000000.0) {
tmp = -1.0 / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-95000000000.0d0)) then
tmp = (-1.0d0) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -95000000000.0) {
tmp = -1.0 / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -95000000000.0: tmp = -1.0 / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -95000000000.0) tmp = Float64(-1.0 / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -95000000000.0) tmp = -1.0 / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -95000000000.0], N[(-1.0 / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -95000000000:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -9.5e10Initial program 59.4%
Simplified74.4%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 46.0%
mul-1-neg46.0%
distribute-neg-frac246.0%
+-commutative46.0%
Simplified46.0%
Taylor expanded in x around 0 30.2%
if -9.5e10 < F Initial program 85.6%
Simplified89.5%
Taylor expanded in F around -inf 34.2%
Taylor expanded in B around 0 18.8%
mul-1-neg18.8%
distribute-neg-frac218.8%
+-commutative18.8%
Simplified18.8%
Taylor expanded in x around inf 29.6%
associate-*r/29.6%
neg-mul-129.6%
Simplified29.6%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 78.9%
Simplified85.6%
Taylor expanded in F around -inf 50.9%
Taylor expanded in B around 0 25.7%
mul-1-neg25.7%
distribute-neg-frac225.7%
+-commutative25.7%
Simplified25.7%
Taylor expanded in x around 0 10.4%
herbie shell --seed 2024150
(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))))))