
(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 21 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 -4e+155)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000.0)
(- (/ (/ F (sqrt (fma F F 2.0))) (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 <= -4e+155) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / 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 <= -4e+155) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / 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, -4e+155], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4 \cdot 10^{+155}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -4.00000000000000003e155Initial program 38.3%
Simplified62.5%
Taylor expanded in x around 0 62.5%
associate-*l/62.5%
*-lft-identity62.5%
+-commutative62.5%
unpow262.5%
fma-undefine62.5%
Simplified62.5%
Taylor expanded in F around -inf 99.8%
if -4.00000000000000003e155 < F < 1e8Initial program 98.2%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.7%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.7%
Applied egg-rr99.7%
if 1e8 < F Initial program 62.2%
Simplified79.2%
Taylor expanded in x around 0 79.0%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-undefine79.2%
Simplified79.2%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -1.5e+53)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 90000000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (* F t_0) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- t_0 t_1)))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.5e+53) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 90000000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F * t_0) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = t_0 - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = x / tan(b)
if (f <= (-1.5d+53)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 90000000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f * t_0) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = t_0 - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.5e+53) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 90000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F * t_0) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = t_0 - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -1.5e+53: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 90000000.0: tmp = (-1.0 / (math.tan(B) / x)) + ((F * t_0) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = t_0 - t_1 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.5e+53) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 90000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F * t_0) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(t_0 - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.5e+53) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 90000000.0) tmp = (-1.0 / (tan(B) / x)) + ((F * t_0) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = t_0 - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.5e+53], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 90000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F * t$95$0), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.5 \cdot 10^{+53}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 90000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \left(F \cdot t\_0\right) \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t\_0 - t\_1\\
\end{array}
\end{array}
if F < -1.49999999999999999e53Initial program 62.0%
Simplified79.0%
Taylor expanded in x around 0 79.0%
associate-*l/79.0%
*-lft-identity79.0%
+-commutative79.0%
unpow279.0%
fma-undefine79.0%
Simplified79.0%
Taylor expanded in F around -inf 99.8%
if -1.49999999999999999e53 < F < 9e7Initial program 99.4%
div-inv99.6%
clear-num99.4%
Applied egg-rr99.4%
clear-num99.4%
associate-/r/99.5%
Applied egg-rr99.5%
if 9e7 < F Initial program 62.2%
Simplified79.2%
Taylor expanded in x around 0 79.0%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-undefine79.2%
Simplified79.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 -1.26e+53)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 50000000.0)
(+
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F (sin B)))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.26e+53) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 50000000.0) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / sin(B))) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.26d+53)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 50000000.0d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / sin(b))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.26e+53) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 50000000.0) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / Math.sin(B))) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.26e+53: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 50000000.0: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / math.sin(B))) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.26e+53) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 50000000.0) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / sin(B))) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.26e+53) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 50000000.0) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / sin(B))) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.26e+53], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 50000000.0], 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 * N[(-1.0 / N[Tan[B], $MachinePrecision]), $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.26 \cdot 10^{+53}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 50000000:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.25999999999999999e53Initial program 62.0%
Simplified79.0%
Taylor expanded in x around 0 79.0%
associate-*l/79.0%
*-lft-identity79.0%
+-commutative79.0%
unpow279.0%
fma-undefine79.0%
Simplified79.0%
Taylor expanded in F around -inf 99.8%
if -1.25999999999999999e53 < F < 5e7Initial program 99.4%
if 5e7 < F Initial program 62.2%
Simplified79.2%
Taylor expanded in x around 0 79.0%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-undefine79.2%
Simplified79.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 -1.26e+53)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F (sin 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 <= -1.26e+53) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = (-1.0 / (tan(B) / x)) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / sin(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.26d+53)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 100000000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / sin(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.26e+53) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / Math.sin(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 <= -1.26e+53: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 100000000.0: tmp = (-1.0 / (math.tan(B) / x)) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / math.sin(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 <= -1.26e+53) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + 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)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.26e+53) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 100000000.0) tmp = (-1.0 / (tan(B) / x)) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / sin(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, -1.26e+53], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $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] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.26 \cdot 10^{+53}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.25999999999999999e53Initial program 62.0%
Simplified79.0%
Taylor expanded in x around 0 79.0%
associate-*l/79.0%
*-lft-identity79.0%
+-commutative79.0%
unpow279.0%
fma-undefine79.0%
Simplified79.0%
Taylor expanded in F around -inf 99.8%
if -1.25999999999999999e53 < F < 1e8Initial program 99.4%
div-inv99.6%
clear-num99.4%
Applied egg-rr99.4%
if 1e8 < F Initial program 62.2%
Simplified79.2%
Taylor expanded in x around 0 79.0%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-undefine79.2%
Simplified79.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 -2300000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (* 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 <= -2300000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
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 <= (-2300000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) 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 <= -2300000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
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 <= -2300000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: 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 <= -2300000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) 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 <= -2300000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) 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, -2300000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], 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 -2300000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.3e9Initial program 67.4%
Simplified81.9%
Taylor expanded in x around 0 81.9%
associate-*l/81.9%
*-lft-identity81.9%
+-commutative81.9%
unpow281.9%
fma-undefine81.9%
Simplified81.9%
Taylor expanded in F around -inf 99.8%
if -2.3e9 < F < 1.3999999999999999Initial program 99.3%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.3%
if 1.3999999999999999 < F Initial program 62.2%
Simplified79.2%
Taylor expanded in x around 0 79.0%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-undefine79.2%
Simplified79.2%
Taylor expanded in F around inf 99.8%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2300000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (/ (* 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 <= -2300000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
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 <= (-2300000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) 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 <= -2300000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
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 <= -2300000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: 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 <= -2300000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(Float64(F * 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 <= -2300000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) 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, -2300000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2300000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.3e9Initial program 67.4%
Simplified81.9%
Taylor expanded in x around 0 81.9%
associate-*l/81.9%
*-lft-identity81.9%
+-commutative81.9%
unpow281.9%
fma-undefine81.9%
Simplified81.9%
Taylor expanded in F around -inf 99.8%
if -2.3e9 < F < 1.3999999999999999Initial program 99.3%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.4%
if 1.3999999999999999 < F Initial program 62.2%
Simplified79.2%
Taylor expanded in x around 0 79.0%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-undefine79.2%
Simplified79.2%
Taylor expanded in F around inf 99.8%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2300000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (/ (/ F (sqrt 2.0)) (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 <= -2300000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = ((F / sqrt(2.0)) / 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 <= (-2300000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = ((f / sqrt(2.0d0)) / 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 <= -2300000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = ((F / Math.sqrt(2.0)) / 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 <= -2300000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: tmp = ((F / math.sqrt(2.0)) / 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 <= -2300000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(Float64(F / sqrt(2.0)) / 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 <= -2300000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) tmp = ((F / sqrt(2.0)) / 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, -2300000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(N[(F / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2300000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.3e9Initial program 67.4%
Simplified81.9%
Taylor expanded in x around 0 81.9%
associate-*l/81.9%
*-lft-identity81.9%
+-commutative81.9%
unpow281.9%
fma-undefine81.9%
Simplified81.9%
Taylor expanded in F around -inf 99.8%
if -2.3e9 < F < 1.3999999999999999Initial program 99.3%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.7%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 98.4%
if 1.3999999999999999 < F Initial program 62.2%
Simplified79.2%
Taylor expanded in x around 0 79.0%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-undefine79.2%
Simplified79.2%
Taylor expanded in F around inf 99.8%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F (sin B)))
(/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -3.1e+34)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -6.6e-36)
t_0
(if (<= F 6e-151)
(/ x (- (tan B)))
(if (<= F 1.2e-27) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / sin(B))) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -3.1e+34) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -6.6e-36) {
tmp = t_0;
} else if (F <= 6e-151) {
tmp = x / -tan(B);
} else if (F <= 1.2e-27) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / sin(b))) - (x / b)
t_1 = x / tan(b)
if (f <= (-3.1d+34)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-6.6d-36)) then
tmp = t_0
else if (f <= 6d-151) then
tmp = x / -tan(b)
else if (f <= 1.2d-27) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / Math.sin(B))) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -3.1e+34) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -6.6e-36) {
tmp = t_0;
} else if (F <= 6e-151) {
tmp = x / -Math.tan(B);
} else if (F <= 1.2e-27) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / math.sin(B))) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -3.1e+34: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -6.6e-36: tmp = t_0 elif F <= 6e-151: tmp = x / -math.tan(B) elif F <= 1.2e-27: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / sin(B))) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.1e+34) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -6.6e-36) tmp = t_0; elseif (F <= 6e-151) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 1.2e-27) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / sin(B))) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -3.1e+34) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -6.6e-36) tmp = t_0; elseif (F <= 6e-151) tmp = x / -tan(B); elseif (F <= 1.2e-27) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(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]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.1e+34], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -6.6e-36], t$95$0, If[LessEqual[F, 6e-151], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.2e-27], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.1 \cdot 10^{+34}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -6.6 \cdot 10^{-36}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-151}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-27}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -3.09999999999999977e34Initial program 64.6%
Simplified80.4%
Taylor expanded in x around 0 80.4%
associate-*l/80.4%
*-lft-identity80.4%
+-commutative80.4%
unpow280.4%
fma-undefine80.4%
Simplified80.4%
Taylor expanded in F around -inf 99.8%
if -3.09999999999999977e34 < F < -6.59999999999999981e-36 or 6e-151 < F < 1.20000000000000001e-27Initial program 99.2%
Taylor expanded in B around 0 83.0%
if -6.59999999999999981e-36 < F < 6e-151Initial program 99.4%
Taylor expanded in F around -inf 42.6%
Taylor expanded in x around inf 83.6%
mul-1-neg83.6%
associate-/l*83.6%
distribute-lft-neg-in83.6%
Simplified83.6%
distribute-lft-neg-out83.6%
clear-num83.4%
tan-quot83.4%
div-inv83.7%
neg-sub083.7%
Applied egg-rr83.7%
neg-sub083.7%
distribute-frac-neg283.7%
Simplified83.7%
if 1.20000000000000001e-27 < F Initial program 64.2%
Simplified80.3%
Taylor expanded in x around 0 80.2%
associate-*l/80.3%
*-lft-identity80.3%
+-commutative80.3%
unpow280.3%
fma-undefine80.3%
Simplified80.3%
Taylor expanded in F around inf 98.7%
Final simplification91.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2300000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 7600.0)
(+
(/ -1.0 (/ (tan B) x))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F 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 <= -2300000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 7600.0) {
tmp = (-1.0 / (tan(B) / x)) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / 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 <= (-2300000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 7600.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / 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 <= -2300000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 7600.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / 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 <= -2300000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 7600.0: tmp = (-1.0 / (math.tan(B) / x)) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / 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 <= -2300000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 7600.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / 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 <= -2300000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 7600.0) tmp = (-1.0 / (tan(B) / x)) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / 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, -2300000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7600.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $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 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2300000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 7600:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.3e9Initial program 67.4%
Simplified81.9%
Taylor expanded in x around 0 81.9%
associate-*l/81.9%
*-lft-identity81.9%
+-commutative81.9%
unpow281.9%
fma-undefine81.9%
Simplified81.9%
Taylor expanded in F around -inf 99.8%
if -2.3e9 < F < 7600Initial program 99.3%
div-inv99.6%
clear-num99.4%
Applied egg-rr99.4%
Taylor expanded in B around 0 85.4%
if 7600 < F Initial program 62.2%
Simplified79.2%
Taylor expanded in x around 0 79.0%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-undefine79.2%
Simplified79.2%
Taylor expanded in F around inf 99.8%
Final simplification92.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2300000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -6.5e-36)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 7.2e-29) (/ x (- (tan B))) (- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2300000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -6.5e-36) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 7.2e-29) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2300000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-6.5d-36)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 7.2d-29) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2300000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -6.5e-36) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 7.2e-29) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2300000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -6.5e-36: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 7.2e-29: tmp = x / -math.tan(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2300000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -6.5e-36) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 7.2e-29) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2300000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -6.5e-36) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 7.2e-29) tmp = x / -tan(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2300000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -6.5e-36], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.2e-29], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2300000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -6.5 \cdot 10^{-36}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{-29}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.3e9Initial program 67.4%
Simplified81.9%
Taylor expanded in x around 0 81.9%
associate-*l/81.9%
*-lft-identity81.9%
+-commutative81.9%
unpow281.9%
fma-undefine81.9%
Simplified81.9%
Taylor expanded in F around -inf 99.8%
if -2.3e9 < F < -6.50000000000000012e-36Initial program 99.4%
div-inv99.4%
clear-num99.4%
Applied egg-rr99.4%
Taylor expanded in B around 0 90.5%
Taylor expanded in B around 0 81.5%
if -6.50000000000000012e-36 < F < 7.19999999999999948e-29Initial program 99.3%
Taylor expanded in F around -inf 41.2%
Taylor expanded in x around inf 76.8%
mul-1-neg76.8%
associate-/l*76.7%
distribute-lft-neg-in76.7%
Simplified76.7%
distribute-lft-neg-out76.7%
clear-num76.6%
tan-quot76.6%
div-inv76.9%
neg-sub076.9%
Applied egg-rr76.9%
neg-sub076.9%
distribute-frac-neg276.9%
Simplified76.9%
if 7.19999999999999948e-29 < F Initial program 64.2%
Simplified80.3%
Taylor expanded in x around 0 80.2%
associate-*l/80.3%
*-lft-identity80.3%
+-commutative80.3%
unpow280.3%
fma-undefine80.3%
Simplified80.3%
Taylor expanded in F around inf 98.7%
Final simplification89.1%
(FPCore (F B x)
:precision binary64
(if (<= F -2300000000.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -5.8e-38)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 1.9e-31)
(/ x (- (tan B)))
(- (/ 1.0 B) (/ 1.0 (/ (tan B) x)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2300000000.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -5.8e-38) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 1.9e-31) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / B) - (1.0 / (tan(B) / x));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2300000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-5.8d-38)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 1.9d-31) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / b) - (1.0d0 / (tan(b) / x))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2300000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -5.8e-38) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 1.9e-31) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / B) - (1.0 / (Math.tan(B) / x));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2300000000.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -5.8e-38: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 1.9e-31: tmp = x / -math.tan(B) else: tmp = (1.0 / B) - (1.0 / (math.tan(B) / x)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2300000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -5.8e-38) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 1.9e-31) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 / B) - Float64(1.0 / Float64(tan(B) / x))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2300000000.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -5.8e-38) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 1.9e-31) tmp = x / -tan(B); else tmp = (1.0 / B) - (1.0 / (tan(B) / x)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2300000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.8e-38], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.9e-31], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2300000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -5.8 \cdot 10^{-38}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.9 \cdot 10^{-31}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{1}{\frac{\tan B}{x}}\\
\end{array}
\end{array}
if F < -2.3e9Initial program 67.4%
Simplified81.9%
Taylor expanded in x around 0 81.9%
associate-*l/81.9%
*-lft-identity81.9%
+-commutative81.9%
unpow281.9%
fma-undefine81.9%
Simplified81.9%
Taylor expanded in F around -inf 99.8%
if -2.3e9 < F < -5.79999999999999988e-38Initial program 99.4%
div-inv99.4%
clear-num99.4%
Applied egg-rr99.4%
Taylor expanded in B around 0 90.5%
Taylor expanded in B around 0 81.5%
if -5.79999999999999988e-38 < F < 1.9e-31Initial program 99.3%
Taylor expanded in F around -inf 42.7%
Taylor expanded in x around inf 79.3%
mul-1-neg79.3%
associate-/l*79.2%
distribute-lft-neg-in79.2%
Simplified79.2%
distribute-lft-neg-out79.2%
clear-num79.1%
tan-quot79.1%
div-inv79.4%
neg-sub079.4%
Applied egg-rr79.4%
neg-sub079.4%
distribute-frac-neg279.4%
Simplified79.4%
if 1.9e-31 < F Initial program 65.9%
div-inv66.0%
clear-num66.0%
Applied egg-rr66.0%
Taylor expanded in B around 0 49.4%
Taylor expanded in F around inf 73.6%
Final simplification82.7%
(FPCore (F B x)
:precision binary64
(if (<= F -4.1e+55)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -2300000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.02e-38)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 2.7e-30)
(/ x (- (tan B)))
(- (/ 1.0 B) (/ 1.0 (/ (tan B) x))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.1e+55) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -2300000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.02e-38) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 2.7e-30) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / B) - (1.0 / (tan(B) / x));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.1d+55)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-2300000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.02d-38)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 2.7d-30) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / b) - (1.0d0 / (tan(b) / x))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.1e+55) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -2300000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.02e-38) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 2.7e-30) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / B) - (1.0 / (Math.tan(B) / x));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.1e+55: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -2300000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.02e-38: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 2.7e-30: tmp = x / -math.tan(B) else: tmp = (1.0 / B) - (1.0 / (math.tan(B) / x)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.1e+55) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -2300000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.02e-38) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 2.7e-30) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 / B) - Float64(1.0 / Float64(tan(B) / x))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.1e+55) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -2300000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.02e-38) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 2.7e-30) tmp = x / -tan(B); else tmp = (1.0 / B) - (1.0 / (tan(B) / x)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.1e+55], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2300000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.02e-38], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e-30], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.1 \cdot 10^{+55}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -2300000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.02 \cdot 10^{-38}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-30}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{1}{\frac{\tan B}{x}}\\
\end{array}
\end{array}
if F < -4.09999999999999981e55Initial program 63.0%
Simplified78.6%
Taylor expanded in x around 0 78.6%
associate-*l/78.6%
*-lft-identity78.6%
+-commutative78.6%
unpow278.6%
fma-undefine78.6%
Simplified78.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 87.0%
if -4.09999999999999981e55 < F < -2.3e9Initial program 90.6%
Simplified99.5%
Taylor expanded in x around 0 99.2%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around -inf 99.7%
tan-quot99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in B around 0 90.0%
if -2.3e9 < F < -1.01999999999999998e-38Initial program 99.4%
div-inv99.4%
clear-num99.4%
Applied egg-rr99.4%
Taylor expanded in B around 0 90.5%
Taylor expanded in B around 0 81.5%
if -1.01999999999999998e-38 < F < 2.69999999999999987e-30Initial program 99.3%
Taylor expanded in F around -inf 42.7%
Taylor expanded in x around inf 79.3%
mul-1-neg79.3%
associate-/l*79.2%
distribute-lft-neg-in79.2%
Simplified79.2%
distribute-lft-neg-out79.2%
clear-num79.1%
tan-quot79.1%
div-inv79.4%
neg-sub079.4%
Applied egg-rr79.4%
neg-sub079.4%
distribute-frac-neg279.4%
Simplified79.4%
if 2.69999999999999987e-30 < F Initial program 65.9%
div-inv66.0%
clear-num66.0%
Applied egg-rr66.0%
Taylor expanded in B around 0 49.4%
Taylor expanded in F around inf 73.6%
Final simplification79.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.25e+56)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -3.1e-13)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F 3.5e+94) (not (<= F 1.16e+142)))
(/ x (- (tan B)))
(/ (+ x 1.0) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e+56) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -3.1e-13) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= 3.5e+94) || !(F <= 1.16e+142)) {
tmp = x / -tan(B);
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.25d+56)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-3.1d-13)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= 3.5d+94) .or. (.not. (f <= 1.16d+142))) then
tmp = x / -tan(b)
else
tmp = (x + 1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e+56) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -3.1e-13) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= 3.5e+94) || !(F <= 1.16e+142)) {
tmp = x / -Math.tan(B);
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.25e+56: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -3.1e-13: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= 3.5e+94) or not (F <= 1.16e+142): tmp = x / -math.tan(B) else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.25e+56) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -3.1e-13) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= 3.5e+94) || !(F <= 1.16e+142)) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.25e+56) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -3.1e-13) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= 3.5e+94) || ~((F <= 1.16e+142))) tmp = x / -tan(B); else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.25e+56], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.1e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 3.5e+94], N[Not[LessEqual[F, 1.16e+142]], $MachinePrecision]], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.25 \cdot 10^{+56}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -3.1 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{+94} \lor \neg \left(F \leq 1.16 \cdot 10^{+142}\right):\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < -1.25000000000000006e56Initial program 63.0%
Simplified78.6%
Taylor expanded in x around 0 78.6%
associate-*l/78.6%
*-lft-identity78.6%
+-commutative78.6%
unpow278.6%
fma-undefine78.6%
Simplified78.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 87.0%
if -1.25000000000000006e56 < F < -3.0999999999999999e-13Initial program 94.3%
Simplified99.5%
Taylor expanded in x around 0 99.4%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around -inf 79.5%
tan-quot79.6%
associate-/r/79.6%
Applied egg-rr79.6%
Taylor expanded in B around 0 73.7%
if -3.0999999999999999e-13 < F < 3.4999999999999997e94 or 1.16000000000000003e142 < F Initial program 86.3%
Taylor expanded in F around -inf 44.7%
Taylor expanded in x around inf 67.0%
mul-1-neg67.0%
associate-/l*67.0%
distribute-lft-neg-in67.0%
Simplified67.0%
distribute-lft-neg-out67.0%
clear-num66.9%
tan-quot66.9%
div-inv67.1%
neg-sub067.1%
Applied egg-rr67.1%
neg-sub067.1%
distribute-frac-neg267.1%
Simplified67.1%
if 3.4999999999999997e94 < F < 1.16000000000000003e142Initial program 70.2%
Taylor expanded in F around -inf 23.8%
Taylor expanded in B around 0 9.6%
mul-1-neg9.6%
distribute-neg-frac29.6%
Simplified9.6%
add-sqr-sqrt1.4%
sqrt-unprod18.3%
sqr-neg18.3%
sqrt-unprod38.5%
add-sqr-sqrt62.2%
*-un-lft-identity62.2%
Applied egg-rr62.2%
*-lft-identity62.2%
Simplified62.2%
Final simplification71.4%
(FPCore (F B x)
:precision binary64
(if (<= F -3.2e+54)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -3.1e-13)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.35e-30)
(/ x (- (tan B)))
(- (/ 1.0 B) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.2e+54) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -3.1e-13) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.35e-30) {
tmp = x / -tan(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 <= (-3.2d+54)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-3.1d-13)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.35d-30) then
tmp = x / -tan(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 <= -3.2e+54) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -3.1e-13) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.35e-30) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.2e+54: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -3.1e-13: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.35e-30: tmp = x / -math.tan(B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.2e+54) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -3.1e-13) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.35e-30) tmp = Float64(x / Float64(-tan(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 <= -3.2e+54) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -3.1e-13) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.35e-30) tmp = x / -tan(B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.2e+54], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.1e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.35e-30], N[(x / (-N[Tan[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 -3.2 \cdot 10^{+54}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -3.1 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.35 \cdot 10^{-30}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -3.2e54Initial program 63.0%
Simplified78.6%
Taylor expanded in x around 0 78.6%
associate-*l/78.6%
*-lft-identity78.6%
+-commutative78.6%
unpow278.6%
fma-undefine78.6%
Simplified78.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 87.0%
if -3.2e54 < F < -3.0999999999999999e-13Initial program 94.3%
Simplified99.5%
Taylor expanded in x around 0 99.4%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around -inf 79.5%
tan-quot79.6%
associate-/r/79.6%
Applied egg-rr79.6%
Taylor expanded in B around 0 73.7%
if -3.0999999999999999e-13 < F < 2.34999999999999985e-30Initial program 99.3%
Taylor expanded in F around -inf 42.3%
Taylor expanded in x around inf 77.3%
mul-1-neg77.3%
associate-/l*77.3%
distribute-lft-neg-in77.3%
Simplified77.3%
distribute-lft-neg-out77.3%
clear-num77.1%
tan-quot77.2%
div-inv77.4%
neg-sub077.4%
Applied egg-rr77.4%
neg-sub077.4%
distribute-frac-neg277.4%
Simplified77.4%
if 2.34999999999999985e-30 < F Initial program 65.9%
Taylor expanded in F around inf 75.7%
Taylor expanded in B around 0 73.6%
Final simplification78.0%
(FPCore (F B x)
:precision binary64
(if (<= F -1.9e+55)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -3.1e-13)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 7.8e-31)
(/ x (- (tan B)))
(- (/ 1.0 B) (/ 1.0 (/ (tan B) x)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e+55) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -3.1e-13) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 7.8e-31) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / B) - (1.0 / (tan(B) / x));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.9d+55)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-3.1d-13)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 7.8d-31) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / b) - (1.0d0 / (tan(b) / x))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e+55) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -3.1e-13) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 7.8e-31) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / B) - (1.0 / (Math.tan(B) / x));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.9e+55: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -3.1e-13: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 7.8e-31: tmp = x / -math.tan(B) else: tmp = (1.0 / B) - (1.0 / (math.tan(B) / x)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.9e+55) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -3.1e-13) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 7.8e-31) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 / B) - Float64(1.0 / Float64(tan(B) / x))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.9e+55) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -3.1e-13) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 7.8e-31) tmp = x / -tan(B); else tmp = (1.0 / B) - (1.0 / (tan(B) / x)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.9e+55], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.1e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.8e-31], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.9 \cdot 10^{+55}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -3.1 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.8 \cdot 10^{-31}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{1}{\frac{\tan B}{x}}\\
\end{array}
\end{array}
if F < -1.9e55Initial program 63.0%
Simplified78.6%
Taylor expanded in x around 0 78.6%
associate-*l/78.6%
*-lft-identity78.6%
+-commutative78.6%
unpow278.6%
fma-undefine78.6%
Simplified78.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 87.0%
if -1.9e55 < F < -3.0999999999999999e-13Initial program 94.3%
Simplified99.5%
Taylor expanded in x around 0 99.4%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around -inf 79.5%
tan-quot79.6%
associate-/r/79.6%
Applied egg-rr79.6%
Taylor expanded in B around 0 73.7%
if -3.0999999999999999e-13 < F < 7.8000000000000003e-31Initial program 99.3%
Taylor expanded in F around -inf 42.3%
Taylor expanded in x around inf 77.3%
mul-1-neg77.3%
associate-/l*77.3%
distribute-lft-neg-in77.3%
Simplified77.3%
distribute-lft-neg-out77.3%
clear-num77.1%
tan-quot77.2%
div-inv77.4%
neg-sub077.4%
Applied egg-rr77.4%
neg-sub077.4%
distribute-frac-neg277.4%
Simplified77.4%
if 7.8000000000000003e-31 < F Initial program 65.9%
div-inv66.0%
clear-num66.0%
Applied egg-rr66.0%
Taylor expanded in B around 0 49.4%
Taylor expanded in F around inf 73.6%
Final simplification78.0%
(FPCore (F B x)
:precision binary64
(if (<= F -1.25e-47)
(- (/ -1.0 B) (/ x (tan B)))
(if (or (<= F 2.25e+92) (not (<= F 2.1e+141)))
(/ x (- (tan B)))
(/ (+ x 1.0) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e-47) {
tmp = (-1.0 / B) - (x / tan(B));
} else if ((F <= 2.25e+92) || !(F <= 2.1e+141)) {
tmp = x / -tan(B);
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.25d-47)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if ((f <= 2.25d+92) .or. (.not. (f <= 2.1d+141))) then
tmp = x / -tan(b)
else
tmp = (x + 1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e-47) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if ((F <= 2.25e+92) || !(F <= 2.1e+141)) {
tmp = x / -Math.tan(B);
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.25e-47: tmp = (-1.0 / B) - (x / math.tan(B)) elif (F <= 2.25e+92) or not (F <= 2.1e+141): tmp = x / -math.tan(B) else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.25e-47) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif ((F <= 2.25e+92) || !(F <= 2.1e+141)) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.25e-47) tmp = (-1.0 / B) - (x / tan(B)); elseif ((F <= 2.25e+92) || ~((F <= 2.1e+141))) tmp = x / -tan(B); else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.25e-47], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 2.25e+92], N[Not[LessEqual[F, 2.1e+141]], $MachinePrecision]], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.25 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.25 \cdot 10^{+92} \lor \neg \left(F \leq 2.1 \cdot 10^{+141}\right):\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < -1.25000000000000003e-47Initial program 73.9%
Simplified85.5%
Taylor expanded in x around 0 85.5%
associate-*l/85.5%
*-lft-identity85.5%
+-commutative85.5%
unpow285.5%
fma-undefine85.5%
Simplified85.5%
Taylor expanded in F around -inf 89.5%
Taylor expanded in B around 0 73.6%
if -1.25000000000000003e-47 < F < 2.25e92 or 2.0999999999999998e141 < F Initial program 85.5%
Taylor expanded in F around -inf 44.5%
Taylor expanded in x around inf 67.5%
mul-1-neg67.5%
associate-/l*67.5%
distribute-lft-neg-in67.5%
Simplified67.5%
distribute-lft-neg-out67.5%
clear-num67.4%
tan-quot67.4%
div-inv67.7%
neg-sub067.7%
Applied egg-rr67.7%
neg-sub067.7%
distribute-frac-neg267.7%
Simplified67.7%
if 2.25e92 < F < 2.0999999999999998e141Initial program 70.2%
Taylor expanded in F around -inf 23.8%
Taylor expanded in B around 0 9.6%
mul-1-neg9.6%
distribute-neg-frac29.6%
Simplified9.6%
add-sqr-sqrt1.4%
sqrt-unprod18.3%
sqr-neg18.3%
sqrt-unprod38.5%
add-sqr-sqrt62.2%
*-un-lft-identity62.2%
Applied egg-rr62.2%
*-lft-identity62.2%
Simplified62.2%
Final simplification69.2%
(FPCore (F B x) :precision binary64 (/ x (- (tan B))))
double code(double F, double B, double x) {
return x / -tan(B);
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = x / -tan(b)
end function
public static double code(double F, double B, double x) {
return x / -Math.tan(B);
}
def code(F, B, x): return x / -math.tan(B)
function code(F, B, x) return Float64(x / Float64(-tan(B))) end
function tmp = code(F, B, x) tmp = x / -tan(B); end
code[F_, B_, x_] := N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{-\tan B}
\end{array}
Initial program 81.2%
Taylor expanded in F around -inf 57.3%
Taylor expanded in x around inf 60.9%
mul-1-neg60.9%
associate-/l*60.8%
distribute-lft-neg-in60.8%
Simplified60.8%
distribute-lft-neg-out60.8%
clear-num60.7%
tan-quot60.8%
div-inv60.9%
neg-sub060.9%
Applied egg-rr60.9%
neg-sub060.9%
distribute-frac-neg260.9%
Simplified60.9%
Final simplification60.9%
(FPCore (F B x)
:precision binary64
(if (<= F -3e-41)
(/ (- -1.0 x) B)
(if (or (<= F 5.5e+25) (and (not (<= F 5.6e+142)) (<= F 3.8e+204)))
(/ x (- B))
(/ (+ x 1.0) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3e-41) {
tmp = (-1.0 - x) / B;
} else if ((F <= 5.5e+25) || (!(F <= 5.6e+142) && (F <= 3.8e+204))) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3d-41)) then
tmp = ((-1.0d0) - x) / b
else if ((f <= 5.5d+25) .or. (.not. (f <= 5.6d+142)) .and. (f <= 3.8d+204)) then
tmp = x / -b
else
tmp = (x + 1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3e-41) {
tmp = (-1.0 - x) / B;
} else if ((F <= 5.5e+25) || (!(F <= 5.6e+142) && (F <= 3.8e+204))) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3e-41: tmp = (-1.0 - x) / B elif (F <= 5.5e+25) or (not (F <= 5.6e+142) and (F <= 3.8e+204)): tmp = x / -B else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3e-41) tmp = Float64(Float64(-1.0 - x) / B); elseif ((F <= 5.5e+25) || (!(F <= 5.6e+142) && (F <= 3.8e+204))) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3e-41) tmp = (-1.0 - x) / B; elseif ((F <= 5.5e+25) || (~((F <= 5.6e+142)) && (F <= 3.8e+204))) tmp = x / -B; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3e-41], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 5.5e+25], And[N[Not[LessEqual[F, 5.6e+142]], $MachinePrecision], LessEqual[F, 3.8e+204]]], N[(x / (-B)), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{-41}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{+25} \lor \neg \left(F \leq 5.6 \cdot 10^{+142}\right) \land F \leq 3.8 \cdot 10^{+204}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < -2.99999999999999989e-41Initial program 72.9%
Taylor expanded in F around -inf 90.3%
Taylor expanded in B around 0 51.1%
mul-1-neg51.1%
distribute-neg-frac251.1%
Simplified51.1%
Taylor expanded in B around 0 51.1%
associate-*r/51.1%
neg-mul-151.1%
distribute-neg-in51.1%
metadata-eval51.1%
unsub-neg51.1%
Simplified51.1%
if -2.99999999999999989e-41 < F < 5.50000000000000018e25 or 5.6e142 < F < 3.7999999999999998e204Initial program 94.5%
Taylor expanded in F around -inf 44.5%
Taylor expanded in B around 0 25.9%
mul-1-neg25.9%
distribute-neg-frac225.9%
Simplified25.9%
Taylor expanded in x around inf 38.6%
mul-1-neg38.6%
distribute-neg-frac238.6%
Simplified38.6%
if 5.50000000000000018e25 < F < 5.6e142 or 3.7999999999999998e204 < F Initial program 61.7%
Taylor expanded in F around -inf 40.9%
Taylor expanded in B around 0 9.5%
mul-1-neg9.5%
distribute-neg-frac29.5%
Simplified9.5%
add-sqr-sqrt3.1%
sqrt-unprod17.6%
sqr-neg17.6%
sqrt-unprod24.7%
add-sqr-sqrt38.9%
*-un-lft-identity38.9%
Applied egg-rr38.9%
*-lft-identity38.9%
Simplified38.9%
Final simplification42.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (- B))))
(if (<= F -1.7e+186)
t_0
(if (<= F -7e+73) (/ -1.0 B) (if (<= F 2.65e+26) t_0 (/ (+ x 1.0) B))))))
double code(double F, double B, double x) {
double t_0 = x / -B;
double tmp;
if (F <= -1.7e+186) {
tmp = t_0;
} else if (F <= -7e+73) {
tmp = -1.0 / B;
} else if (F <= 2.65e+26) {
tmp = t_0;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / -b
if (f <= (-1.7d+186)) then
tmp = t_0
else if (f <= (-7d+73)) then
tmp = (-1.0d0) / b
else if (f <= 2.65d+26) then
tmp = t_0
else
tmp = (x + 1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / -B;
double tmp;
if (F <= -1.7e+186) {
tmp = t_0;
} else if (F <= -7e+73) {
tmp = -1.0 / B;
} else if (F <= 2.65e+26) {
tmp = t_0;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): t_0 = x / -B tmp = 0 if F <= -1.7e+186: tmp = t_0 elif F <= -7e+73: tmp = -1.0 / B elif F <= 2.65e+26: tmp = t_0 else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) t_0 = Float64(x / Float64(-B)) tmp = 0.0 if (F <= -1.7e+186) tmp = t_0; elseif (F <= -7e+73) tmp = Float64(-1.0 / B); elseif (F <= 2.65e+26) tmp = t_0; else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / -B; tmp = 0.0; if (F <= -1.7e+186) tmp = t_0; elseif (F <= -7e+73) tmp = -1.0 / B; elseif (F <= 2.65e+26) tmp = t_0; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / (-B)), $MachinePrecision]}, If[LessEqual[F, -1.7e+186], t$95$0, If[LessEqual[F, -7e+73], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 2.65e+26], t$95$0, N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{-B}\\
\mathbf{if}\;F \leq -1.7 \cdot 10^{+186}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -7 \cdot 10^{+73}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 2.65 \cdot 10^{+26}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < -1.70000000000000003e186 or -7.00000000000000004e73 < F < 2.64999999999999984e26Initial program 89.4%
Taylor expanded in F around -inf 57.0%
Taylor expanded in B around 0 32.6%
mul-1-neg32.6%
distribute-neg-frac232.6%
Simplified32.6%
Taylor expanded in x around inf 36.8%
mul-1-neg36.8%
distribute-neg-frac236.8%
Simplified36.8%
if -1.70000000000000003e186 < F < -7.00000000000000004e73Initial program 83.0%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 56.9%
mul-1-neg56.9%
distribute-neg-frac256.9%
Simplified56.9%
Taylor expanded in x around 0 47.0%
if 2.64999999999999984e26 < F Initial program 59.4%
Taylor expanded in F around -inf 46.8%
Taylor expanded in B around 0 15.6%
mul-1-neg15.6%
distribute-neg-frac215.6%
Simplified15.6%
add-sqr-sqrt5.7%
sqrt-unprod16.6%
sqr-neg16.6%
sqrt-unprod20.6%
add-sqr-sqrt32.2%
*-un-lft-identity32.2%
Applied egg-rr32.2%
*-lft-identity32.2%
Simplified32.2%
Final simplification36.3%
(FPCore (F B x) :precision binary64 (if (or (<= x -3.3e-245) (not (<= x 4.8e-176))) (/ x (- B)) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -3.3e-245) || !(x <= 4.8e-176)) {
tmp = x / -B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-3.3d-245)) .or. (.not. (x <= 4.8d-176))) then
tmp = x / -b
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -3.3e-245) || !(x <= 4.8e-176)) {
tmp = x / -B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -3.3e-245) or not (x <= 4.8e-176): tmp = x / -B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -3.3e-245) || !(x <= 4.8e-176)) tmp = Float64(x / Float64(-B)); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -3.3e-245) || ~((x <= 4.8e-176))) tmp = x / -B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -3.3e-245], N[Not[LessEqual[x, 4.8e-176]], $MachinePrecision]], N[(x / (-B)), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{-245} \lor \neg \left(x \leq 4.8 \cdot 10^{-176}\right):\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -3.3000000000000001e-245 or 4.80000000000000012e-176 < x Initial program 84.9%
Taylor expanded in F around -inf 63.6%
Taylor expanded in B around 0 32.8%
mul-1-neg32.8%
distribute-neg-frac232.8%
Simplified32.8%
Taylor expanded in x around inf 37.1%
mul-1-neg37.1%
distribute-neg-frac237.1%
Simplified37.1%
if -3.3000000000000001e-245 < x < 4.80000000000000012e-176Initial program 67.7%
Taylor expanded in F around -inf 34.5%
Taylor expanded in B around 0 19.3%
mul-1-neg19.3%
distribute-neg-frac219.3%
Simplified19.3%
Taylor expanded in x around 0 19.3%
Final simplification33.3%
(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 81.2%
Taylor expanded in F around -inf 57.3%
Taylor expanded in B around 0 29.9%
mul-1-neg29.9%
distribute-neg-frac229.9%
Simplified29.9%
Taylor expanded in x around 0 9.9%
Final simplification9.9%
herbie shell --seed 2024115
(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))))))