
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.55e+80)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 160000000.0)
(- (* 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 <= -1.55e+80) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 160000000.0) {
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 <= -1.55e+80) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 160000000.0) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(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, -1.55e+80], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 160000000.0], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(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.55 \cdot 10^{+80}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 160000000:\\
\;\;\;\;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 < -1.54999999999999994e80Initial program 47.8%
distribute-lft-neg-in47.8%
+-commutative47.8%
associate-*l/68.3%
associate-/l*68.3%
fma-define68.3%
/-rgt-identity68.3%
remove-double-neg68.3%
fma-neg68.3%
Simplified68.4%
Taylor expanded in x around 0 68.4%
associate-*l/68.4%
*-lft-identity68.4%
+-commutative68.4%
unpow268.4%
fma-undefine68.4%
Simplified68.4%
Taylor expanded in F around -inf 99.9%
if -1.54999999999999994e80 < F < 1.6e8Initial program 98.2%
distribute-lft-neg-in98.2%
+-commutative98.2%
associate-*l/99.5%
associate-/l*99.5%
fma-define99.5%
/-rgt-identity99.5%
remove-double-neg99.5%
fma-neg99.5%
Simplified99.7%
if 1.6e8 < F Initial program 66.7%
distribute-lft-neg-in66.7%
+-commutative66.7%
associate-*l/79.6%
associate-/l*79.7%
fma-define79.7%
/-rgt-identity79.7%
remove-double-neg79.7%
fma-neg79.7%
Simplified79.9%
Taylor expanded in x around 0 79.8%
associate-*l/79.9%
*-lft-identity79.9%
+-commutative79.9%
unpow279.9%
fma-undefine79.9%
Simplified79.9%
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 -2e+80)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 120000000.0)
(- (* F (/ (sqrt (/ 1.0 (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 <= -2e+80) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 120000000.0) {
tmp = (F * (sqrt((1.0 / 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 <= -2e+80) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 120000000.0) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / 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, -2e+80], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 120000000.0], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $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 -2 \cdot 10^{+80}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 120000000:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\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 < -2e80Initial program 47.8%
distribute-lft-neg-in47.8%
+-commutative47.8%
associate-*l/68.3%
associate-/l*68.3%
fma-define68.3%
/-rgt-identity68.3%
remove-double-neg68.3%
fma-neg68.3%
Simplified68.4%
Taylor expanded in x around 0 68.4%
associate-*l/68.4%
*-lft-identity68.4%
+-commutative68.4%
unpow268.4%
fma-undefine68.4%
Simplified68.4%
Taylor expanded in F around -inf 99.9%
if -2e80 < F < 1.2e8Initial program 98.2%
distribute-lft-neg-in98.2%
+-commutative98.2%
associate-*l/99.5%
associate-/l*99.5%
fma-define99.5%
/-rgt-identity99.5%
remove-double-neg99.5%
fma-neg99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
if 1.2e8 < F Initial program 66.7%
distribute-lft-neg-in66.7%
+-commutative66.7%
associate-*l/79.6%
associate-/l*79.7%
fma-define79.7%
/-rgt-identity79.7%
remove-double-neg79.7%
fma-neg79.7%
Simplified79.9%
Taylor expanded in x around 0 79.8%
associate-*l/79.9%
*-lft-identity79.9%
+-commutative79.9%
unpow279.9%
fma-undefine79.9%
Simplified79.9%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.9e-21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 90000000.0)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -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 <= -5.9e-21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 90000000.0) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -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 <= (-5.9d-21)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 90000000.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-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 <= -5.9e-21) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 90000000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -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 <= -5.9e-21: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 90000000.0: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -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 <= -5.9e-21) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 90000000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -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 <= -5.9e-21) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 90000000.0) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -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, -5.9e-21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 90000000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(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 -5.9 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 90000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5.9000000000000003e-21Initial program 56.3%
distribute-lft-neg-in56.3%
+-commutative56.3%
associate-*l/74.7%
associate-/l*74.7%
fma-define74.7%
/-rgt-identity74.7%
remove-double-neg74.7%
fma-neg74.7%
Simplified74.9%
Taylor expanded in x around 0 74.8%
associate-*l/74.9%
*-lft-identity74.9%
+-commutative74.9%
unpow274.9%
fma-undefine74.9%
Simplified74.9%
Taylor expanded in F around -inf 99.8%
if -5.9000000000000003e-21 < F < 9e7Initial program 99.5%
if 9e7 < F Initial program 66.7%
distribute-lft-neg-in66.7%
+-commutative66.7%
associate-*l/79.6%
associate-/l*79.7%
fma-define79.7%
/-rgt-identity79.7%
remove-double-neg79.7%
fma-neg79.7%
Simplified79.9%
Taylor expanded in x around 0 79.8%
associate-*l/79.9%
*-lft-identity79.9%
+-commutative79.9%
unpow279.9%
fma-undefine79.9%
Simplified79.9%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.45)
(- (* 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 <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.45) {
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 <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.45d0) 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 <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.45) {
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 <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.45: 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 <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.45) 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 <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.45) 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, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.45], 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 -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 54.1%
distribute-lft-neg-in54.1%
+-commutative54.1%
associate-*l/73.5%
associate-/l*73.5%
fma-define73.5%
/-rgt-identity73.5%
remove-double-neg73.5%
fma-neg73.5%
Simplified73.6%
Taylor expanded in x around 0 73.5%
associate-*l/73.6%
*-lft-identity73.6%
+-commutative73.6%
unpow273.6%
fma-undefine73.6%
Simplified73.6%
Taylor expanded in F around -inf 99.8%
if -1.3999999999999999 < F < 1.44999999999999996Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
associate-*l/99.5%
associate-/l*99.5%
fma-define99.5%
/-rgt-identity99.5%
remove-double-neg99.5%
fma-neg99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 98.5%
if 1.44999999999999996 < F Initial program 66.7%
distribute-lft-neg-in66.7%
+-commutative66.7%
associate-*l/79.6%
associate-/l*79.7%
fma-define79.7%
/-rgt-identity79.7%
remove-double-neg79.7%
fma-neg79.7%
Simplified79.9%
Taylor expanded in x around 0 79.8%
associate-*l/79.9%
*-lft-identity79.9%
+-commutative79.9%
unpow279.9%
fma-undefine79.9%
Simplified79.9%
Taylor expanded in F around inf 99.8%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.45)
(- (/ (* 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 <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.45) {
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 <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.45d0) 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 <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.45) {
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 <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.45: 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 <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.45) 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 <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.45) 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, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.45], 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 -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 54.1%
distribute-lft-neg-in54.1%
+-commutative54.1%
associate-*l/73.5%
associate-/l*73.5%
fma-define73.5%
/-rgt-identity73.5%
remove-double-neg73.5%
fma-neg73.5%
Simplified73.6%
Taylor expanded in x around 0 73.5%
associate-*l/73.6%
*-lft-identity73.6%
+-commutative73.6%
unpow273.6%
fma-undefine73.6%
Simplified73.6%
Taylor expanded in F around -inf 99.8%
if -1.3999999999999999 < F < 1.44999999999999996Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
associate-*l/99.5%
associate-/l*99.5%
fma-define99.5%
/-rgt-identity99.5%
remove-double-neg99.5%
fma-neg99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 98.5%
*-commutative98.5%
Simplified98.5%
if 1.44999999999999996 < F Initial program 66.7%
distribute-lft-neg-in66.7%
+-commutative66.7%
associate-*l/79.6%
associate-/l*79.7%
fma-define79.7%
/-rgt-identity79.7%
remove-double-neg79.7%
fma-neg79.7%
Simplified79.9%
Taylor expanded in x around 0 79.8%
associate-*l/79.9%
*-lft-identity79.9%
+-commutative79.9%
unpow279.9%
fma-undefine79.9%
Simplified79.9%
Taylor expanded in F around inf 99.8%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ F (sin B))) (t_1 (/ x (tan B))))
(if (<= F -4.7e-38)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.6e-181)
(- (* t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 2.35e-110)
(/ x (- (tan B)))
(if (<= F 13.5)
(- (* t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = F / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -4.7e-38) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.6e-181) {
tmp = (t_0 * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 2.35e-110) {
tmp = x / -tan(B);
} else if (F <= 13.5) {
tmp = (t_0 * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} 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 = f / sin(b)
t_1 = x / tan(b)
if (f <= (-4.7d-38)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.6d-181)) then
tmp = (t_0 * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 2.35d-110) then
tmp = x / -tan(b)
else if (f <= 13.5d0) then
tmp = (t_0 * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
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 = F / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -4.7e-38) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.6e-181) {
tmp = (t_0 * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 2.35e-110) {
tmp = x / -Math.tan(B);
} else if (F <= 13.5) {
tmp = (t_0 * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = F / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -4.7e-38: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.6e-181: tmp = (t_0 * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) elif F <= 2.35e-110: tmp = x / -math.tan(B) elif F <= 13.5: tmp = (t_0 * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(F / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.7e-38) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.6e-181) tmp = Float64(Float64(t_0 * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 2.35e-110) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 13.5) tmp = Float64(Float64(t_0 * (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_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -4.7e-38) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.6e-181) tmp = (t_0 * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); elseif (F <= 2.35e-110) tmp = x / -tan(B); elseif (F <= 13.5) tmp = (t_0 * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.7e-38], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.6e-181], N[(N[(t$95$0 * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.35e-110], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 13.5], N[(N[(t$95$0 * 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$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.7 \cdot 10^{-38}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.6 \cdot 10^{-181}:\\
\;\;\;\;t\_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.35 \cdot 10^{-110}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 13.5:\\
\;\;\;\;t\_0 \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -4.69999999999999998e-38Initial program 58.3%
distribute-lft-neg-in58.3%
+-commutative58.3%
associate-*l/75.9%
associate-/l*75.9%
fma-define75.9%
/-rgt-identity75.9%
remove-double-neg75.9%
fma-neg75.9%
Simplified76.0%
Taylor expanded in x around 0 75.9%
associate-*l/76.0%
*-lft-identity76.0%
+-commutative76.0%
unpow276.0%
fma-undefine76.0%
Simplified76.0%
Taylor expanded in F around -inf 97.7%
if -4.69999999999999998e-38 < F < -1.6000000000000001e-181Initial program 99.3%
Taylor expanded in B around 0 85.2%
Taylor expanded in F around 0 85.2%
if -1.6000000000000001e-181 < F < 2.34999999999999996e-110Initial program 99.5%
Taylor expanded in F around -inf 39.1%
Taylor expanded in x around inf 86.6%
mul-1-neg86.6%
distribute-neg-frac286.6%
*-commutative86.6%
Simplified86.6%
neg-mul-186.6%
times-frac86.7%
Applied egg-rr86.7%
frac-times86.6%
div-inv86.4%
metadata-eval86.4%
neg-mul-186.4%
frac-2neg86.4%
add-sqr-sqrt43.7%
sqrt-unprod34.1%
frac-times34.1%
metadata-eval34.1%
metadata-eval34.1%
frac-times34.1%
rgt-mult-inverse34.0%
associate-*l/34.1%
rgt-mult-inverse34.0%
associate-*l/34.1%
sqrt-unprod1.1%
add-sqr-sqrt1.9%
associate-*l/1.9%
rgt-mult-inverse1.9%
associate-*r*1.9%
Applied egg-rr86.7%
neg-sub086.7%
distribute-frac-neg86.7%
Simplified86.7%
if 2.34999999999999996e-110 < F < 13.5Initial program 99.7%
Taylor expanded in B around 0 89.1%
if 13.5 < F Initial program 66.7%
distribute-lft-neg-in66.7%
+-commutative66.7%
associate-*l/79.6%
associate-/l*79.7%
fma-define79.7%
/-rgt-identity79.7%
remove-double-neg79.7%
fma-neg79.7%
Simplified79.9%
Taylor expanded in x around 0 79.8%
associate-*l/79.9%
*-lft-identity79.9%
+-commutative79.9%
unpow279.9%
fma-undefine79.9%
Simplified79.9%
Taylor expanded in F around inf 99.8%
Final simplification93.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -3.8e-38)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -4.4e-182)
t_0
(if (<= F 3e-113)
(/ x (- (tan B)))
(if (<= F 0.98) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -3.8e-38) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -4.4e-182) {
tmp = t_0;
} else if (F <= 3e-113) {
tmp = x / -tan(B);
} else if (F <= 0.98) {
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 = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
t_1 = x / tan(b)
if (f <= (-3.8d-38)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-4.4d-182)) then
tmp = t_0
else if (f <= 3d-113) then
tmp = x / -tan(b)
else if (f <= 0.98d0) 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 = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -3.8e-38) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -4.4e-182) {
tmp = t_0;
} else if (F <= 3e-113) {
tmp = x / -Math.tan(B);
} else if (F <= 0.98) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -3.8e-38: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -4.4e-182: tmp = t_0 elif F <= 3e-113: tmp = x / -math.tan(B) elif F <= 0.98: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.8e-38) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -4.4e-182) tmp = t_0; elseif (F <= 3e-113) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 0.98) 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 = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -3.8e-38) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -4.4e-182) tmp = t_0; elseif (F <= 3e-113) tmp = x / -tan(B); elseif (F <= 0.98) 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[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.8e-38], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.4e-182], t$95$0, If[LessEqual[F, 3e-113], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.98], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.8 \cdot 10^{-38}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -4.4 \cdot 10^{-182}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-113}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 0.98:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -3.8e-38Initial program 58.3%
distribute-lft-neg-in58.3%
+-commutative58.3%
associate-*l/75.9%
associate-/l*75.9%
fma-define75.9%
/-rgt-identity75.9%
remove-double-neg75.9%
fma-neg75.9%
Simplified76.0%
Taylor expanded in x around 0 75.9%
associate-*l/76.0%
*-lft-identity76.0%
+-commutative76.0%
unpow276.0%
fma-undefine76.0%
Simplified76.0%
Taylor expanded in F around -inf 97.7%
if -3.8e-38 < F < -4.3999999999999999e-182 or 3.0000000000000001e-113 < F < 0.97999999999999998Initial program 99.5%
Taylor expanded in B around 0 87.2%
Taylor expanded in F around 0 83.7%
if -4.3999999999999999e-182 < F < 3.0000000000000001e-113Initial program 99.5%
Taylor expanded in F around -inf 39.1%
Taylor expanded in x around inf 86.6%
mul-1-neg86.6%
distribute-neg-frac286.6%
*-commutative86.6%
Simplified86.6%
neg-mul-186.6%
times-frac86.7%
Applied egg-rr86.7%
frac-times86.6%
div-inv86.4%
metadata-eval86.4%
neg-mul-186.4%
frac-2neg86.4%
add-sqr-sqrt43.7%
sqrt-unprod34.1%
frac-times34.1%
metadata-eval34.1%
metadata-eval34.1%
frac-times34.1%
rgt-mult-inverse34.0%
associate-*l/34.1%
rgt-mult-inverse34.0%
associate-*l/34.1%
sqrt-unprod1.1%
add-sqr-sqrt1.9%
associate-*l/1.9%
rgt-mult-inverse1.9%
associate-*r*1.9%
Applied egg-rr86.7%
neg-sub086.7%
distribute-frac-neg86.7%
Simplified86.7%
if 0.97999999999999998 < F Initial program 66.7%
distribute-lft-neg-in66.7%
+-commutative66.7%
associate-*l/79.6%
associate-/l*79.7%
fma-define79.7%
/-rgt-identity79.7%
remove-double-neg79.7%
fma-neg79.7%
Simplified79.9%
Taylor expanded in x around 0 79.8%
associate-*l/79.9%
*-lft-identity79.9%
+-commutative79.9%
unpow279.9%
fma-undefine79.9%
Simplified79.9%
Taylor expanded in F around inf 99.8%
Final simplification93.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (t_1 (/ x (tan B))))
(if (<= F -5.9e-21)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 9e-111)
(+ (* x (/ -1.0 (tan B))) (* t_0 (/ F B)))
(if (<= F 700000.0)
(- (* (/ F (sin B)) t_0) (/ x B))
(- (/ 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);
double t_1 = x / tan(B);
double tmp;
if (F <= -5.9e-21) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 9e-111) {
tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B));
} else if (F <= 700000.0) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} 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)
t_1 = x / tan(b)
if (f <= (-5.9d-21)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 9d-111) then
tmp = (x * ((-1.0d0) / tan(b))) + (t_0 * (f / b))
else if (f <= 700000.0d0) then
tmp = ((f / sin(b)) * t_0) - (x / b)
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);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -5.9e-21) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 9e-111) {
tmp = (x * (-1.0 / Math.tan(B))) + (t_0 * (F / B));
} else if (F <= 700000.0) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} 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) t_1 = x / math.tan(B) tmp = 0 if F <= -5.9e-21: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 9e-111: tmp = (x * (-1.0 / math.tan(B))) + (t_0 * (F / B)) elif F <= 700000.0: tmp = ((F / math.sin(B)) * t_0) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.9e-21) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 9e-111) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * Float64(F / B))); elseif (F <= 700000.0) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); 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; t_1 = x / tan(B); tmp = 0.0; if (F <= -5.9e-21) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 9e-111) tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B)); elseif (F <= 700000.0) tmp = ((F / sin(B)) * t_0) - (x / B); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.9e-21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 9e-111], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 700000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], 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}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.9 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-111}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t\_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 700000:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -5.9000000000000003e-21Initial program 56.3%
distribute-lft-neg-in56.3%
+-commutative56.3%
associate-*l/74.7%
associate-/l*74.7%
fma-define74.7%
/-rgt-identity74.7%
remove-double-neg74.7%
fma-neg74.7%
Simplified74.9%
Taylor expanded in x around 0 74.8%
associate-*l/74.9%
*-lft-identity74.9%
+-commutative74.9%
unpow274.9%
fma-undefine74.9%
Simplified74.9%
Taylor expanded in F around -inf 99.8%
if -5.9000000000000003e-21 < F < 8.99999999999999987e-111Initial program 99.5%
Taylor expanded in B around 0 88.3%
if 8.99999999999999987e-111 < F < 7e5Initial program 99.7%
Taylor expanded in B around 0 89.1%
if 7e5 < F Initial program 66.7%
distribute-lft-neg-in66.7%
+-commutative66.7%
associate-*l/79.6%
associate-/l*79.7%
fma-define79.7%
/-rgt-identity79.7%
remove-double-neg79.7%
fma-neg79.7%
Simplified79.9%
Taylor expanded in x around 0 79.8%
associate-*l/79.9%
*-lft-identity79.9%
+-commutative79.9%
unpow279.9%
fma-undefine79.9%
Simplified79.9%
Taylor expanded in F around inf 99.8%
Final simplification94.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (t_1 (/ x (tan B))))
(if (<= F -400.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 5.2e-107)
(+ (/ -1.0 (/ (tan B) x)) (* t_0 (/ F B)))
(if (<= F 5200.0)
(- (* (/ F (sin B)) t_0) (/ x B))
(- (/ 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);
double t_1 = x / tan(B);
double tmp;
if (F <= -400.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 5.2e-107) {
tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 5200.0) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} 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)
t_1 = x / tan(b)
if (f <= (-400.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 5.2d-107) then
tmp = ((-1.0d0) / (tan(b) / x)) + (t_0 * (f / b))
else if (f <= 5200.0d0) then
tmp = ((f / sin(b)) * t_0) - (x / b)
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);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -400.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 5.2e-107) {
tmp = (-1.0 / (Math.tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 5200.0) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} 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) t_1 = x / math.tan(B) tmp = 0 if F <= -400.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 5.2e-107: tmp = (-1.0 / (math.tan(B) / x)) + (t_0 * (F / B)) elif F <= 5200.0: tmp = ((F / math.sin(B)) * t_0) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -400.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 5.2e-107) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(t_0 * Float64(F / B))); elseif (F <= 5200.0) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); 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; t_1 = x / tan(B); tmp = 0.0; if (F <= -400.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 5.2e-107) tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B)); elseif (F <= 5200.0) tmp = ((F / sin(B)) * t_0) - (x / B); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -400.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 5.2e-107], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5200.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], 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}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -400:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{-107}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + t\_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 5200:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -400Initial program 54.1%
distribute-lft-neg-in54.1%
+-commutative54.1%
associate-*l/73.5%
associate-/l*73.5%
fma-define73.5%
/-rgt-identity73.5%
remove-double-neg73.5%
fma-neg73.5%
Simplified73.6%
Taylor expanded in x around 0 73.5%
associate-*l/73.6%
*-lft-identity73.6%
+-commutative73.6%
unpow273.6%
fma-undefine73.6%
Simplified73.6%
Taylor expanded in F around -inf 99.8%
if -400 < F < 5.2000000000000001e-107Initial program 99.5%
div-inv99.7%
clear-num99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 88.8%
if 5.2000000000000001e-107 < F < 5200Initial program 99.7%
Taylor expanded in B around 0 89.1%
if 5200 < F Initial program 66.7%
distribute-lft-neg-in66.7%
+-commutative66.7%
associate-*l/79.6%
associate-/l*79.7%
fma-define79.7%
/-rgt-identity79.7%
remove-double-neg79.7%
fma-neg79.7%
Simplified79.9%
Taylor expanded in x around 0 79.8%
associate-*l/79.9%
*-lft-identity79.9%
+-commutative79.9%
unpow279.9%
fma-undefine79.9%
Simplified79.9%
Taylor expanded in F around inf 99.8%
Final simplification94.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.35e-76)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.25e-38) (/ 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 <= -1.35e-76) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.25e-38) {
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 <= (-1.35d-76)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.25d-38) 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 <= -1.35e-76) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.25e-38) {
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 <= -1.35e-76: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.25e-38: 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 <= -1.35e-76) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.25e-38) 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 <= -1.35e-76) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.25e-38) 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, -1.35e-76], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.25e-38], 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 -1.35 \cdot 10^{-76}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.25 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.35e-76Initial program 60.1%
distribute-lft-neg-in60.1%
+-commutative60.1%
associate-*l/76.9%
associate-/l*76.9%
fma-define76.9%
/-rgt-identity76.9%
remove-double-neg76.9%
fma-neg76.9%
Simplified77.0%
Taylor expanded in x around 0 77.0%
associate-*l/77.0%
*-lft-identity77.0%
+-commutative77.0%
unpow277.0%
fma-undefine77.0%
Simplified77.0%
Taylor expanded in F around -inf 93.7%
if -1.35e-76 < F < 2.25000000000000004e-38Initial program 99.5%
Taylor expanded in F around -inf 38.1%
Taylor expanded in x around inf 80.8%
mul-1-neg80.8%
distribute-neg-frac280.8%
*-commutative80.8%
Simplified80.8%
neg-mul-180.8%
times-frac80.8%
Applied egg-rr80.8%
frac-times80.8%
div-inv80.6%
metadata-eval80.6%
neg-mul-180.6%
frac-2neg80.6%
add-sqr-sqrt41.9%
sqrt-unprod34.9%
frac-times34.9%
metadata-eval34.9%
metadata-eval34.9%
frac-times34.9%
rgt-mult-inverse34.8%
associate-*l/34.9%
rgt-mult-inverse34.8%
associate-*l/34.9%
sqrt-unprod1.0%
add-sqr-sqrt2.0%
associate-*l/2.0%
rgt-mult-inverse2.0%
associate-*r*2.0%
Applied egg-rr80.9%
neg-sub080.9%
distribute-frac-neg80.9%
Simplified80.9%
if 2.25000000000000004e-38 < F Initial program 71.0%
distribute-lft-neg-in71.0%
+-commutative71.0%
associate-*l/82.2%
associate-/l*82.4%
fma-define82.4%
/-rgt-identity82.4%
remove-double-neg82.4%
fma-neg82.4%
Simplified82.5%
Taylor expanded in x around 0 82.4%
associate-*l/82.5%
*-lft-identity82.5%
+-commutative82.5%
unpow282.5%
fma-undefine82.5%
Simplified82.5%
Taylor expanded in F around inf 90.9%
Final simplification88.1%
(FPCore (F B x)
:precision binary64
(if (<= F -1.45e-76)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (or (<= F 3.5e-28) (not (<= F 7.6e+133)))
(/ x (- (tan B)))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.45e-76) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if ((F <= 3.5e-28) || !(F <= 7.6e+133)) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.45d-76)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if ((f <= 3.5d-28) .or. (.not. (f <= 7.6d+133))) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.45e-76) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if ((F <= 3.5e-28) || !(F <= 7.6e+133)) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.45e-76: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif (F <= 3.5e-28) or not (F <= 7.6e+133): tmp = x / -math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.45e-76) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif ((F <= 3.5e-28) || !(F <= 7.6e+133)) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.45e-76) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif ((F <= 3.5e-28) || ~((F <= 7.6e+133))) tmp = x / -tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.45e-76], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 3.5e-28], N[Not[LessEqual[F, 7.6e+133]], $MachinePrecision]], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.45 \cdot 10^{-76}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-28} \lor \neg \left(F \leq 7.6 \cdot 10^{+133}\right):\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.4500000000000001e-76Initial program 60.1%
distribute-lft-neg-in60.1%
+-commutative60.1%
associate-*l/76.9%
associate-/l*76.9%
fma-define76.9%
/-rgt-identity76.9%
remove-double-neg76.9%
fma-neg76.9%
Simplified77.0%
Taylor expanded in x around 0 77.0%
associate-*l/77.0%
*-lft-identity77.0%
+-commutative77.0%
unpow277.0%
fma-undefine77.0%
Simplified77.0%
Taylor expanded in F around -inf 93.7%
if -1.4500000000000001e-76 < F < 3.5e-28 or 7.6000000000000004e133 < F Initial program 88.3%
Taylor expanded in F around -inf 45.7%
Taylor expanded in x around inf 76.5%
mul-1-neg76.5%
distribute-neg-frac276.5%
*-commutative76.5%
Simplified76.5%
neg-mul-176.5%
times-frac76.5%
Applied egg-rr76.5%
frac-times76.5%
div-inv76.3%
metadata-eval76.3%
neg-mul-176.3%
frac-2neg76.3%
add-sqr-sqrt39.0%
sqrt-unprod34.3%
frac-times34.2%
metadata-eval34.2%
metadata-eval34.2%
frac-times34.3%
rgt-mult-inverse34.2%
associate-*l/34.2%
rgt-mult-inverse34.2%
associate-*l/34.2%
sqrt-unprod0.9%
add-sqr-sqrt1.9%
associate-*l/1.8%
rgt-mult-inverse1.8%
associate-*r*1.8%
Applied egg-rr76.6%
neg-sub076.6%
distribute-frac-neg76.6%
Simplified76.6%
if 3.5e-28 < F < 7.6000000000000004e133Initial program 84.5%
Taylor expanded in B around 0 75.5%
Taylor expanded in F around inf 71.0%
Final simplification82.0%
(FPCore (F B x)
:precision binary64
(if (<= F -2.7e+172)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -11.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F 3.5e-28) (not (<= F 7.5e+133)))
(/ x (- (tan B)))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.7e+172) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -11.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= 3.5e-28) || !(F <= 7.5e+133)) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.7d+172)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-11.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= 3.5d-28) .or. (.not. (f <= 7.5d+133))) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.7e+172) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -11.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= 3.5e-28) || !(F <= 7.5e+133)) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.7e+172: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -11.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= 3.5e-28) or not (F <= 7.5e+133): tmp = x / -math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.7e+172) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -11.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= 3.5e-28) || !(F <= 7.5e+133)) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.7e+172) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -11.0) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= 3.5e-28) || ~((F <= 7.5e+133))) tmp = x / -tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.7e+172], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -11.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 3.5e-28], N[Not[LessEqual[F, 7.5e+133]], $MachinePrecision]], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.7 \cdot 10^{+172}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -11:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-28} \lor \neg \left(F \leq 7.5 \cdot 10^{+133}\right):\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.7e172Initial program 41.6%
distribute-lft-neg-in41.6%
+-commutative41.6%
associate-*l/64.1%
associate-/l*64.1%
fma-define64.1%
/-rgt-identity64.1%
remove-double-neg64.1%
fma-neg64.1%
Simplified64.3%
Taylor expanded in F around -inf 99.6%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in F around 0 82.0%
if -2.7e172 < F < -11Initial program 72.6%
Taylor expanded in B around 0 56.1%
Taylor expanded in F around -inf 83.3%
distribute-lft-in83.3%
associate-*r/83.3%
metadata-eval83.3%
mul-1-neg83.3%
unsub-neg83.3%
Simplified83.3%
if -11 < F < 3.5e-28 or 7.49999999999999992e133 < F Initial program 89.2%
Taylor expanded in F around -inf 46.3%
Taylor expanded in x around inf 74.4%
mul-1-neg74.4%
distribute-neg-frac274.4%
*-commutative74.4%
Simplified74.4%
neg-mul-174.4%
times-frac74.4%
Applied egg-rr74.4%
frac-times74.4%
div-inv74.2%
metadata-eval74.2%
neg-mul-174.2%
frac-2neg74.2%
add-sqr-sqrt37.3%
sqrt-unprod33.0%
frac-times33.0%
metadata-eval33.0%
metadata-eval33.0%
frac-times33.0%
rgt-mult-inverse32.9%
associate-*l/33.0%
rgt-mult-inverse32.9%
associate-*l/32.9%
sqrt-unprod0.9%
add-sqr-sqrt2.0%
associate-*l/1.9%
rgt-mult-inverse1.9%
associate-*r*1.9%
Applied egg-rr74.5%
neg-sub074.5%
distribute-frac-neg74.5%
Simplified74.5%
if 3.5e-28 < F < 7.49999999999999992e133Initial program 84.5%
Taylor expanded in B around 0 75.5%
Taylor expanded in F around inf 71.0%
Final simplification76.5%
(FPCore (F B x)
:precision binary64
(if (<= F -7e+171)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -28.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F 0.95) (not (<= F 1.15e+133)))
(/ x (- (tan B)))
(+ (* B 0.16666666666666666) (/ (- 1.0 x) B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7e+171) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -28.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= 0.95) || !(F <= 1.15e+133)) {
tmp = x / -tan(B);
} else {
tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7d+171)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-28.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= 0.95d0) .or. (.not. (f <= 1.15d+133))) then
tmp = x / -tan(b)
else
tmp = (b * 0.16666666666666666d0) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7e+171) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -28.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= 0.95) || !(F <= 1.15e+133)) {
tmp = x / -Math.tan(B);
} else {
tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7e+171: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -28.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= 0.95) or not (F <= 1.15e+133): tmp = x / -math.tan(B) else: tmp = (B * 0.16666666666666666) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7e+171) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -28.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= 0.95) || !(F <= 1.15e+133)) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(B * 0.16666666666666666) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7e+171) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -28.0) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= 0.95) || ~((F <= 1.15e+133))) tmp = x / -tan(B); else tmp = (B * 0.16666666666666666) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7e+171], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -28.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 0.95], N[Not[LessEqual[F, 1.15e+133]], $MachinePrecision]], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(B * 0.16666666666666666), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7 \cdot 10^{+171}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -28:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.95 \lor \neg \left(F \leq 1.15 \cdot 10^{+133}\right):\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot 0.16666666666666666 + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6.9999999999999999e171Initial program 41.6%
distribute-lft-neg-in41.6%
+-commutative41.6%
associate-*l/64.1%
associate-/l*64.1%
fma-define64.1%
/-rgt-identity64.1%
remove-double-neg64.1%
fma-neg64.1%
Simplified64.3%
Taylor expanded in F around -inf 99.6%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in F around 0 82.0%
if -6.9999999999999999e171 < F < -28Initial program 72.6%
Taylor expanded in B around 0 56.1%
Taylor expanded in F around -inf 83.3%
distribute-lft-in83.3%
associate-*r/83.3%
metadata-eval83.3%
mul-1-neg83.3%
unsub-neg83.3%
Simplified83.3%
if -28 < F < 0.94999999999999996 or 1.14999999999999995e133 < F Initial program 89.7%
Taylor expanded in F around -inf 44.9%
Taylor expanded in x around inf 71.8%
mul-1-neg71.8%
distribute-neg-frac271.8%
*-commutative71.8%
Simplified71.8%
neg-mul-171.8%
times-frac71.9%
Applied egg-rr71.9%
frac-times71.8%
div-inv71.7%
metadata-eval71.7%
neg-mul-171.7%
frac-2neg71.7%
add-sqr-sqrt35.6%
sqrt-unprod31.6%
frac-times31.6%
metadata-eval31.6%
metadata-eval31.6%
frac-times31.6%
rgt-mult-inverse31.6%
associate-*l/31.6%
rgt-mult-inverse31.5%
associate-*l/31.6%
sqrt-unprod1.0%
add-sqr-sqrt2.0%
associate-*l/2.0%
rgt-mult-inverse2.0%
associate-*r*2.0%
Applied egg-rr71.9%
neg-sub071.9%
distribute-frac-neg71.9%
Simplified71.9%
if 0.94999999999999996 < F < 1.14999999999999995e133Initial program 80.1%
Taylor expanded in B around 0 68.4%
Taylor expanded in F around inf 65.1%
Taylor expanded in B around 0 50.6%
associate--l+50.6%
*-commutative50.6%
div-sub50.6%
Simplified50.6%
Final simplification73.2%
(FPCore (F B x)
:precision binary64
(if (<= F -3.15e-65)
(- (/ -1.0 B) (/ x (tan B)))
(if (or (<= F 0.95) (not (<= F 4.5e+127)))
(/ x (- (tan B)))
(+ (* B 0.16666666666666666) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.15e-65) {
tmp = (-1.0 / B) - (x / tan(B));
} else if ((F <= 0.95) || !(F <= 4.5e+127)) {
tmp = x / -tan(B);
} else {
tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.15d-65)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if ((f <= 0.95d0) .or. (.not. (f <= 4.5d+127))) then
tmp = x / -tan(b)
else
tmp = (b * 0.16666666666666666d0) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.15e-65) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if ((F <= 0.95) || !(F <= 4.5e+127)) {
tmp = x / -Math.tan(B);
} else {
tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.15e-65: tmp = (-1.0 / B) - (x / math.tan(B)) elif (F <= 0.95) or not (F <= 4.5e+127): tmp = x / -math.tan(B) else: tmp = (B * 0.16666666666666666) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.15e-65) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif ((F <= 0.95) || !(F <= 4.5e+127)) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(B * 0.16666666666666666) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.15e-65) tmp = (-1.0 / B) - (x / tan(B)); elseif ((F <= 0.95) || ~((F <= 4.5e+127))) tmp = x / -tan(B); else tmp = (B * 0.16666666666666666) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.15e-65], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 0.95], N[Not[LessEqual[F, 4.5e+127]], $MachinePrecision]], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(B * 0.16666666666666666), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.15 \cdot 10^{-65}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.95 \lor \neg \left(F \leq 4.5 \cdot 10^{+127}\right):\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot 0.16666666666666666 + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.1499999999999998e-65Initial program 59.7%
distribute-lft-neg-in59.7%
+-commutative59.7%
associate-*l/76.7%
associate-/l*76.6%
fma-define76.6%
/-rgt-identity76.6%
remove-double-neg76.6%
fma-neg76.6%
Simplified76.7%
Taylor expanded in F around -inf 94.5%
associate-/r*94.5%
Simplified94.5%
Taylor expanded in B around 0 74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in F around 0 74.7%
if -3.1499999999999998e-65 < F < 0.94999999999999996 or 4.50000000000000034e127 < F Initial program 89.0%
Taylor expanded in F around -inf 43.9%
Taylor expanded in x around inf 73.1%
mul-1-neg73.1%
distribute-neg-frac273.1%
*-commutative73.1%
Simplified73.1%
neg-mul-173.1%
times-frac73.1%
Applied egg-rr73.1%
frac-times73.1%
div-inv72.9%
metadata-eval72.9%
neg-mul-172.9%
frac-2neg72.9%
add-sqr-sqrt36.9%
sqrt-unprod32.5%
frac-times32.5%
metadata-eval32.5%
metadata-eval32.5%
frac-times32.5%
rgt-mult-inverse32.5%
associate-*l/32.5%
rgt-mult-inverse32.5%
associate-*l/32.5%
sqrt-unprod1.0%
add-sqr-sqrt2.0%
associate-*l/1.9%
rgt-mult-inverse1.9%
associate-*r*1.9%
Applied egg-rr73.2%
neg-sub073.2%
distribute-frac-neg73.2%
Simplified73.2%
if 0.94999999999999996 < F < 4.50000000000000034e127Initial program 80.1%
Taylor expanded in B around 0 68.4%
Taylor expanded in F around inf 65.1%
Taylor expanded in B around 0 50.6%
associate--l+50.6%
*-commutative50.6%
div-sub50.6%
Simplified50.6%
Final simplification71.6%
(FPCore (F B x)
:precision binary64
(if (<= F -6.5e+119)
(+ (/ (- -1.0 x) B) (* 0.3333333333333333 (* B x)))
(if (<= F -1.22e+24)
(/ -1.0 (sin B))
(if (<= F 4.3e-19)
(/ (- x) (sin B))
(+ (* B 0.16666666666666666) (/ (- 1.0 x) B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.5e+119) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (F <= -1.22e+24) {
tmp = -1.0 / sin(B);
} else if (F <= 4.3e-19) {
tmp = -x / sin(B);
} else {
tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.5d+119)) then
tmp = (((-1.0d0) - x) / b) + (0.3333333333333333d0 * (b * x))
else if (f <= (-1.22d+24)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 4.3d-19) then
tmp = -x / sin(b)
else
tmp = (b * 0.16666666666666666d0) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.5e+119) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (F <= -1.22e+24) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 4.3e-19) {
tmp = -x / Math.sin(B);
} else {
tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.5e+119: tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)) elif F <= -1.22e+24: tmp = -1.0 / math.sin(B) elif F <= 4.3e-19: tmp = -x / math.sin(B) else: tmp = (B * 0.16666666666666666) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.5e+119) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(0.3333333333333333 * Float64(B * x))); elseif (F <= -1.22e+24) tmp = Float64(-1.0 / sin(B)); elseif (F <= 4.3e-19) tmp = Float64(Float64(-x) / sin(B)); else tmp = Float64(Float64(B * 0.16666666666666666) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.5e+119) tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)); elseif (F <= -1.22e+24) tmp = -1.0 / sin(B); elseif (F <= 4.3e-19) tmp = -x / sin(B); else tmp = (B * 0.16666666666666666) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.5e+119], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.22e+24], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.3e-19], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(B * 0.16666666666666666), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.5 \cdot 10^{+119}:\\
\;\;\;\;\frac{-1 - x}{B} + 0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{elif}\;F \leq -1.22 \cdot 10^{+24}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{-19}:\\
\;\;\;\;\frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot 0.16666666666666666 + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6.4999999999999997e119Initial program 41.3%
distribute-lft-neg-in41.3%
+-commutative41.3%
associate-*l/63.5%
associate-/l*63.5%
fma-define63.5%
/-rgt-identity63.5%
remove-double-neg63.5%
fma-neg63.5%
Simplified63.6%
Taylor expanded in F around -inf 99.6%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in B around 0 51.0%
if -6.4999999999999997e119 < F < -1.21999999999999996e24Initial program 90.4%
distribute-lft-neg-in90.4%
+-commutative90.4%
associate-*l/99.5%
associate-/l*99.5%
fma-define99.5%
/-rgt-identity99.5%
remove-double-neg99.5%
fma-neg99.5%
Simplified99.5%
Taylor expanded in x around 0 99.3%
associate-*l/99.4%
*-lft-identity99.4%
+-commutative99.4%
unpow299.4%
fma-undefine99.4%
Simplified99.4%
Taylor expanded in F around -inf 99.6%
Taylor expanded in x around 0 73.1%
if -1.21999999999999996e24 < F < 4.3e-19Initial program 98.8%
Taylor expanded in F around -inf 40.9%
Taylor expanded in x around inf 75.5%
mul-1-neg75.5%
distribute-neg-frac275.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in B around 0 46.5%
if 4.3e-19 < F Initial program 68.8%
Taylor expanded in B around 0 37.6%
Taylor expanded in F around inf 48.2%
Taylor expanded in B around 0 37.7%
associate--l+37.7%
*-commutative37.7%
div-sub37.7%
Simplified37.7%
Final simplification47.4%
(FPCore (F B x) :precision binary64 (if (or (<= x -3.3e-97) (not (<= x 1e-231))) (/ x (- (tan B))) (/ -1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -3.3e-97) || !(x <= 1e-231)) {
tmp = 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 <= (-3.3d-97)) .or. (.not. (x <= 1d-231))) then
tmp = 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 <= -3.3e-97) || !(x <= 1e-231)) {
tmp = x / -Math.tan(B);
} else {
tmp = -1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -3.3e-97) or not (x <= 1e-231): tmp = x / -math.tan(B) else: tmp = -1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -3.3e-97) || !(x <= 1e-231)) tmp = Float64(x / Float64(-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 <= -3.3e-97) || ~((x <= 1e-231))) tmp = x / -tan(B); else tmp = -1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -3.3e-97], N[Not[LessEqual[x, 1e-231]], $MachinePrecision]], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{-97} \lor \neg \left(x \leq 10^{-231}\right):\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\end{array}
\end{array}
if x < -3.3000000000000001e-97 or 9.9999999999999999e-232 < x Initial program 81.6%
Taylor expanded in F around -inf 66.0%
Taylor expanded in x around inf 74.4%
mul-1-neg74.4%
distribute-neg-frac274.4%
*-commutative74.4%
Simplified74.4%
neg-mul-174.4%
times-frac74.5%
Applied egg-rr74.5%
frac-times74.4%
div-inv74.3%
metadata-eval74.3%
neg-mul-174.3%
frac-2neg74.3%
add-sqr-sqrt35.8%
sqrt-unprod32.0%
frac-times32.0%
metadata-eval32.0%
metadata-eval32.0%
frac-times32.0%
rgt-mult-inverse32.0%
associate-*l/32.0%
rgt-mult-inverse32.0%
associate-*l/32.0%
sqrt-unprod0.8%
add-sqr-sqrt1.5%
associate-*l/1.5%
rgt-mult-inverse1.5%
associate-*r*1.5%
Applied egg-rr74.5%
neg-sub074.5%
distribute-frac-neg74.5%
Simplified74.5%
if -3.3000000000000001e-97 < x < 9.9999999999999999e-232Initial program 63.8%
distribute-lft-neg-in63.8%
+-commutative63.8%
associate-*l/70.7%
associate-/l*70.6%
fma-define70.6%
/-rgt-identity70.6%
remove-double-neg70.6%
fma-neg70.6%
Simplified70.7%
Taylor expanded in x around 0 70.6%
associate-*l/70.7%
*-lft-identity70.7%
+-commutative70.7%
unpow270.7%
fma-undefine70.7%
Simplified70.7%
Taylor expanded in F around -inf 35.1%
Taylor expanded in x around 0 35.1%
Final simplification66.2%
(FPCore (F B x)
:precision binary64
(if (<= F -5.5e+119)
(+ (/ (- -1.0 x) B) (* 0.3333333333333333 (* B x)))
(if (<= F -3.1e-5)
(/ -1.0 (sin B))
(if (<= F 0.0055)
(- (* x (* B 0.3333333333333333)) (/ x B))
(+ (* B 0.16666666666666666) (/ (- 1.0 x) B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.5e+119) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (F <= -3.1e-5) {
tmp = -1.0 / sin(B);
} else if (F <= 0.0055) {
tmp = (x * (B * 0.3333333333333333)) - (x / B);
} else {
tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5.5d+119)) then
tmp = (((-1.0d0) - x) / b) + (0.3333333333333333d0 * (b * x))
else if (f <= (-3.1d-5)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 0.0055d0) then
tmp = (x * (b * 0.3333333333333333d0)) - (x / b)
else
tmp = (b * 0.16666666666666666d0) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.5e+119) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (F <= -3.1e-5) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 0.0055) {
tmp = (x * (B * 0.3333333333333333)) - (x / B);
} else {
tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.5e+119: tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)) elif F <= -3.1e-5: tmp = -1.0 / math.sin(B) elif F <= 0.0055: tmp = (x * (B * 0.3333333333333333)) - (x / B) else: tmp = (B * 0.16666666666666666) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.5e+119) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(0.3333333333333333 * Float64(B * x))); elseif (F <= -3.1e-5) tmp = Float64(-1.0 / sin(B)); elseif (F <= 0.0055) tmp = Float64(Float64(x * Float64(B * 0.3333333333333333)) - Float64(x / B)); else tmp = Float64(Float64(B * 0.16666666666666666) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.5e+119) tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)); elseif (F <= -3.1e-5) tmp = -1.0 / sin(B); elseif (F <= 0.0055) tmp = (x * (B * 0.3333333333333333)) - (x / B); else tmp = (B * 0.16666666666666666) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.5e+119], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.1e-5], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0055], N[(N[(x * N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(B * 0.16666666666666666), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.5 \cdot 10^{+119}:\\
\;\;\;\;\frac{-1 - x}{B} + 0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{elif}\;F \leq -3.1 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 0.0055:\\
\;\;\;\;x \cdot \left(B \cdot 0.3333333333333333\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot 0.16666666666666666 + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.5000000000000003e119Initial program 41.3%
distribute-lft-neg-in41.3%
+-commutative41.3%
associate-*l/63.5%
associate-/l*63.5%
fma-define63.5%
/-rgt-identity63.5%
remove-double-neg63.5%
fma-neg63.5%
Simplified63.6%
Taylor expanded in F around -inf 99.6%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in B around 0 51.0%
if -5.5000000000000003e119 < F < -3.10000000000000014e-5Initial program 87.9%
distribute-lft-neg-in87.9%
+-commutative87.9%
associate-*l/99.5%
associate-/l*99.5%
fma-define99.5%
/-rgt-identity99.5%
remove-double-neg99.5%
fma-neg99.5%
Simplified99.5%
Taylor expanded in x around 0 99.3%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 68.2%
if -3.10000000000000014e-5 < F < 0.0054999999999999997Initial program 99.5%
Taylor expanded in F around -inf 38.3%
Taylor expanded in x around inf 73.9%
mul-1-neg73.9%
distribute-neg-frac273.9%
*-commutative73.9%
Simplified73.9%
distribute-frac-neg273.9%
neg-sub073.9%
clear-num73.7%
add-sqr-sqrt35.7%
sqrt-unprod30.4%
sqr-neg30.4%
sqrt-unprod1.0%
add-sqr-sqrt2.1%
frac-2neg2.1%
metadata-eval2.1%
add-sqr-sqrt1.0%
sqrt-unprod30.4%
sqr-neg30.4%
sqrt-unprod35.7%
add-sqr-sqrt73.7%
distribute-frac-neg73.7%
neg-mul-173.7%
*-commutative73.7%
times-frac73.6%
Applied egg-rr73.7%
neg-sub073.7%
distribute-neg-frac73.7%
metadata-eval73.7%
associate-*l/73.8%
neg-mul-173.8%
Simplified73.8%
Taylor expanded in B around 0 43.6%
+-commutative43.6%
mul-1-neg43.6%
unsub-neg43.6%
*-commutative43.6%
*-commutative43.6%
associate-*l*43.6%
Simplified43.6%
if 0.0054999999999999997 < F Initial program 67.3%
Taylor expanded in B around 0 34.6%
Taylor expanded in F around inf 50.0%
Taylor expanded in B around 0 39.4%
associate--l+39.4%
*-commutative39.4%
div-sub39.4%
Simplified39.4%
Final simplification46.5%
(FPCore (F B x)
:precision binary64
(if (<= F -1.8e-78)
(/ (- -1.0 x) B)
(if (<= F 5.9e-18)
(/ x (- B))
(+ (* B 0.16666666666666666) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-78) {
tmp = (-1.0 - x) / B;
} else if (F <= 5.9e-18) {
tmp = x / -B;
} else {
tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.8d-78)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 5.9d-18) then
tmp = x / -b
else
tmp = (b * 0.16666666666666666d0) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-78) {
tmp = (-1.0 - x) / B;
} else if (F <= 5.9e-18) {
tmp = x / -B;
} else {
tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.8e-78: tmp = (-1.0 - x) / B elif F <= 5.9e-18: tmp = x / -B else: tmp = (B * 0.16666666666666666) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.8e-78) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 5.9e-18) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(B * 0.16666666666666666) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.8e-78) tmp = (-1.0 - x) / B; elseif (F <= 5.9e-18) tmp = x / -B; else tmp = (B * 0.16666666666666666) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.8e-78], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5.9e-18], N[(x / (-B)), $MachinePrecision], N[(N[(B * 0.16666666666666666), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.8 \cdot 10^{-78}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5.9 \cdot 10^{-18}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot 0.16666666666666666 + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.8000000000000001e-78Initial program 60.6%
Taylor expanded in B around 0 30.3%
Taylor expanded in B around 0 37.1%
Taylor expanded in F around -inf 44.5%
if -1.8000000000000001e-78 < F < 5.90000000000000019e-18Initial program 99.5%
Taylor expanded in B around 0 68.9%
Taylor expanded in x around inf 48.7%
associate-*r/48.7%
neg-mul-148.7%
Simplified48.7%
if 5.90000000000000019e-18 < F Initial program 68.8%
Taylor expanded in B around 0 37.6%
Taylor expanded in F around inf 48.2%
Taylor expanded in B around 0 37.7%
associate--l+37.7%
*-commutative37.7%
div-sub37.7%
Simplified37.7%
Final simplification44.5%
(FPCore (F B x)
:precision binary64
(if (<= F -2.6e-77)
(+ (/ (- -1.0 x) B) (* 0.3333333333333333 (* B x)))
(if (<= F 2.3e-20)
(/ x (- B))
(+ (* B 0.16666666666666666) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.6e-77) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (F <= 2.3e-20) {
tmp = x / -B;
} else {
tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.6d-77)) then
tmp = (((-1.0d0) - x) / b) + (0.3333333333333333d0 * (b * x))
else if (f <= 2.3d-20) then
tmp = x / -b
else
tmp = (b * 0.16666666666666666d0) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.6e-77) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (F <= 2.3e-20) {
tmp = x / -B;
} else {
tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.6e-77: tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)) elif F <= 2.3e-20: tmp = x / -B else: tmp = (B * 0.16666666666666666) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.6e-77) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(0.3333333333333333 * Float64(B * x))); elseif (F <= 2.3e-20) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(B * 0.16666666666666666) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.6e-77) tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)); elseif (F <= 2.3e-20) tmp = x / -B; else tmp = (B * 0.16666666666666666) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.6e-77], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e-20], N[(x / (-B)), $MachinePrecision], N[(N[(B * 0.16666666666666666), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.6 \cdot 10^{-77}:\\
\;\;\;\;\frac{-1 - x}{B} + 0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot 0.16666666666666666 + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.6000000000000001e-77Initial program 60.1%
distribute-lft-neg-in60.1%
+-commutative60.1%
associate-*l/76.9%
associate-/l*76.9%
fma-define76.9%
/-rgt-identity76.9%
remove-double-neg76.9%
fma-neg76.9%
Simplified77.0%
Taylor expanded in F around -inf 93.5%
associate-/r*93.6%
Simplified93.6%
Taylor expanded in B around 0 73.8%
*-commutative73.8%
Simplified73.8%
Taylor expanded in B around 0 45.2%
if -2.6000000000000001e-77 < F < 2.2999999999999999e-20Initial program 99.5%
Taylor expanded in B around 0 68.4%
Taylor expanded in x around inf 48.3%
associate-*r/48.3%
neg-mul-148.3%
Simplified48.3%
if 2.2999999999999999e-20 < F Initial program 68.8%
Taylor expanded in B around 0 37.6%
Taylor expanded in F around inf 48.2%
Taylor expanded in B around 0 37.7%
associate--l+37.7%
*-commutative37.7%
div-sub37.7%
Simplified37.7%
Final simplification44.6%
(FPCore (F B x) :precision binary64 (if (<= F -1.25e-81) (/ (- -1.0 x) B) (if (<= F 3.6e-27) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e-81) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.6e-27) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.25d-81)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3.6d-27) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e-81) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.6e-27) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.25e-81: tmp = (-1.0 - x) / B elif F <= 3.6e-27: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.25e-81) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.6e-27) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.25e-81) tmp = (-1.0 - x) / B; elseif (F <= 3.6e-27) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.25e-81], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.6e-27], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.25 \cdot 10^{-81}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-27}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.24999999999999995e-81Initial program 60.6%
Taylor expanded in B around 0 30.3%
Taylor expanded in B around 0 37.1%
Taylor expanded in F around -inf 44.5%
if -1.24999999999999995e-81 < F < 3.5999999999999999e-27Initial program 99.5%
Taylor expanded in B around 0 68.3%
Taylor expanded in x around inf 49.7%
associate-*r/49.7%
neg-mul-149.7%
Simplified49.7%
if 3.5999999999999999e-27 < F Initial program 69.7%
Taylor expanded in B around 0 39.5%
Taylor expanded in B around 0 29.8%
Taylor expanded in F around inf 36.1%
Final simplification44.3%
(FPCore (F B x) :precision binary64 (if (<= F -2.15e-78) (/ (- -1.0 x) B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.15e-78) {
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.15d-78)) 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.15e-78) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.15e-78: tmp = (-1.0 - x) / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.15e-78) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.15e-78) tmp = (-1.0 - x) / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.15e-78], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.15 \cdot 10^{-78}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -2.14999999999999997e-78Initial program 60.6%
Taylor expanded in B around 0 30.3%
Taylor expanded in B around 0 37.1%
Taylor expanded in F around -inf 44.5%
if -2.14999999999999997e-78 < F Initial program 87.5%
Taylor expanded in B around 0 56.7%
Taylor expanded in x around inf 36.1%
associate-*r/36.1%
neg-mul-136.1%
Simplified36.1%
Final simplification39.2%
(FPCore (F B x) :precision binary64 (/ x (- B)))
double code(double F, double B, double x) {
return x / -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 / -b
end function
public static double code(double F, double B, double x) {
return x / -B;
}
def code(F, B, x): return x / -B
function code(F, B, x) return Float64(x / Float64(-B)) end
function tmp = code(F, B, x) tmp = x / -B; end
code[F_, B_, x_] := N[(x / (-B)), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{-B}
\end{array}
Initial program 77.8%
Taylor expanded in B around 0 47.2%
Taylor expanded in x around inf 31.5%
associate-*r/31.5%
neg-mul-131.5%
Simplified31.5%
Final simplification31.5%
herbie shell --seed 2024043
(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))))))