
(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 20 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 -29500000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 580000000.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 <= -29500000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 580000000.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 <= -29500000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 580000000.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, -29500000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 580000000.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 -29500000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 580000000:\\
\;\;\;\;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 < -2.95e13Initial program 56.1%
distribute-lft-neg-in56.1%
+-commutative56.1%
cancel-sign-sub-inv56.1%
Simplified74.6%
Taylor expanded in x around 0 74.6%
associate-*l/74.6%
*-lft-identity74.6%
unpow274.6%
fma-udef74.6%
Simplified74.6%
Taylor expanded in F around -inf 99.8%
if -2.95e13 < F < 5.8e8Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
if 5.8e8 < F Initial program 56.4%
distribute-lft-neg-in56.4%
+-commutative56.4%
cancel-sign-sub-inv56.4%
Simplified74.1%
Taylor expanded in x around 0 74.1%
associate-*l/74.1%
*-lft-identity74.1%
unpow274.1%
fma-udef74.1%
Simplified74.1%
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 -5.5e+30)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 200000000.0)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5.5e+30) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 200000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-5.5d+30)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 200000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -5.5e+30) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 200000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5.5e+30: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 200000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.5e+30) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 200000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -5.5e+30) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 200000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.5e+30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 200000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - 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 -5.5 \cdot 10^{+30}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -5.50000000000000025e30Initial program 52.6%
distribute-lft-neg-in52.6%
+-commutative52.6%
cancel-sign-sub-inv52.6%
Simplified72.6%
Taylor expanded in x around 0 72.7%
associate-*l/72.6%
*-lft-identity72.6%
unpow272.6%
fma-udef72.6%
Simplified72.6%
Taylor expanded in F around -inf 99.8%
if -5.50000000000000025e30 < F < 2e8Initial program 99.5%
div-inv99.7%
expm1-log1p-u73.1%
expm1-udef54.5%
Applied egg-rr54.5%
expm1-def73.1%
expm1-log1p99.7%
Simplified99.7%
if 2e8 < F Initial program 56.4%
distribute-lft-neg-in56.4%
+-commutative56.4%
cancel-sign-sub-inv56.4%
Simplified74.1%
Taylor expanded in x around 0 74.1%
associate-*l/74.1%
*-lft-identity74.1%
unpow274.1%
fma-udef74.1%
Simplified74.1%
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 -1.4)
(- (/ -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 <= -1.4) {
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 <= (-1.4d0)) 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 <= -1.4) {
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 <= -1.4: 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 <= -1.4) 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 <= -1.4) 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, -1.4], 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 -1.4:\\
\;\;\;\;\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 < -1.3999999999999999Initial program 58.4%
distribute-lft-neg-in58.4%
+-commutative58.4%
cancel-sign-sub-inv58.4%
Simplified75.9%
Taylor expanded in x around 0 76.0%
associate-*l/76.0%
*-lft-identity76.0%
unpow276.0%
fma-udef76.0%
Simplified76.0%
Taylor expanded in F around -inf 99.7%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
Taylor expanded in x around 0 99.4%
associate-*l/99.5%
*-lft-identity99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in F around 0 99.1%
if 1.3999999999999999 < F Initial program 56.4%
distribute-lft-neg-in56.4%
+-commutative56.4%
cancel-sign-sub-inv56.4%
Simplified74.1%
Taylor expanded in x around 0 74.1%
associate-*l/74.1%
*-lft-identity74.1%
unpow274.1%
fma-udef74.1%
Simplified74.1%
Taylor expanded in F around inf 99.8%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.3e-33)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 8.8e-82)
(* (/ x (sin B)) (- (cos B)))
(if (<= F 7e-9)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.3e-33) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 8.8e-82) {
tmp = (x / sin(B)) * -cos(B);
} else if (F <= 7e-9) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.3d-33)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 8.8d-82) then
tmp = (x / sin(b)) * -cos(b)
else if (f <= 7d-9) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.3e-33) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 8.8e-82) {
tmp = (x / Math.sin(B)) * -Math.cos(B);
} else if (F <= 7e-9) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.3e-33: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 8.8e-82: tmp = (x / math.sin(B)) * -math.cos(B) elif F <= 7e-9: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.3e-33) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 8.8e-82) tmp = Float64(Float64(x / sin(B)) * Float64(-cos(B))); elseif (F <= 7e-9) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.3e-33) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 8.8e-82) tmp = (x / sin(B)) * -cos(B); elseif (F <= 7e-9) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.3e-33], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.8e-82], N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * (-N[Cos[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 7e-9], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $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 -3.3 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 8.8 \cdot 10^{-82}:\\
\;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-9}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -3.3000000000000003e-33Initial program 62.9%
distribute-lft-neg-in62.9%
+-commutative62.9%
cancel-sign-sub-inv62.9%
Simplified78.5%
Taylor expanded in x around 0 78.4%
associate-*l/78.4%
*-lft-identity78.4%
unpow278.4%
fma-udef78.4%
Simplified78.4%
Taylor expanded in F around -inf 94.2%
if -3.3000000000000003e-33 < F < 8.79999999999999943e-82Initial program 99.5%
Taylor expanded in F around -inf 33.6%
Taylor expanded in x around inf 76.0%
mul-1-neg76.0%
associate-/l*75.8%
Simplified75.8%
clear-num75.8%
associate-/r/75.7%
clear-num76.1%
Applied egg-rr76.1%
if 8.79999999999999943e-82 < F < 6.9999999999999998e-9Initial program 99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 68.9%
if 6.9999999999999998e-9 < F Initial program 57.4%
distribute-lft-neg-in57.4%
+-commutative57.4%
cancel-sign-sub-inv57.4%
Simplified74.7%
Taylor expanded in x around 0 74.7%
associate-*l/74.7%
*-lft-identity74.7%
unpow274.7%
fma-udef74.7%
Simplified74.7%
Taylor expanded in F around inf 97.7%
Final simplification88.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45e-27)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 7e-9) (- (* F (/ (sqrt 0.5) 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.45e-27) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 7e-9) {
tmp = (F * (sqrt(0.5) / 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.45d-27)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 7d-9) then
tmp = (f * (sqrt(0.5d0) / 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.45e-27) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 7e-9) {
tmp = (F * (Math.sqrt(0.5) / 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.45e-27: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 7e-9: tmp = (F * (math.sqrt(0.5) / 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.45e-27) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 7e-9) tmp = Float64(Float64(F * Float64(sqrt(0.5) / 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.45e-27) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 7e-9) tmp = (F * (sqrt(0.5) / 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.45e-27], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7e-9], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / 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.45 \cdot 10^{-27}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-9}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.45000000000000002e-27Initial program 62.0%
distribute-lft-neg-in62.0%
+-commutative62.0%
cancel-sign-sub-inv62.0%
Simplified78.0%
Taylor expanded in x around 0 77.9%
associate-*l/77.9%
*-lft-identity77.9%
unpow277.9%
fma-udef77.9%
Simplified77.9%
Taylor expanded in F around -inf 95.2%
if -1.45000000000000002e-27 < F < 6.9999999999999998e-9Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in B around 0 87.3%
associate-*r/87.4%
*-rgt-identity87.4%
unpow287.4%
fma-udef87.4%
Simplified87.4%
Taylor expanded in F around 0 87.4%
if 6.9999999999999998e-9 < F Initial program 57.4%
distribute-lft-neg-in57.4%
+-commutative57.4%
cancel-sign-sub-inv57.4%
Simplified74.7%
Taylor expanded in x around 0 74.7%
associate-*l/74.7%
*-lft-identity74.7%
unpow274.7%
fma-udef74.7%
Simplified74.7%
Taylor expanded in F around inf 97.7%
Final simplification93.1%
(FPCore (F B x)
:precision binary64
(if (<= F -0.75)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 9e-77)
(* (/ x (sin B)) (- (cos B)))
(if (<= F 7e-9)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(- (/ F (* F (sin B))) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.75) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 9e-77) {
tmp = (x / sin(B)) * -cos(B);
} else if (F <= 7e-9) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (F / (F * 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 <= (-0.75d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 9d-77) then
tmp = (x / sin(b)) * -cos(b)
else if (f <= 7d-9) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.75) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 9e-77) {
tmp = (x / Math.sin(B)) * -Math.cos(B);
} else if (F <= 7e-9) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.75: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 9e-77: tmp = (x / math.sin(B)) * -math.cos(B) elif F <= 7e-9: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.75) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 9e-77) tmp = Float64(Float64(x / sin(B)) * Float64(-cos(B))); elseif (F <= 7e-9) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.75) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 9e-77) tmp = (x / sin(B)) * -cos(B); elseif (F <= 7e-9) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.75], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9e-77], N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * (-N[Cos[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 7e-9], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.75:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-77}:\\
\;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-9}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.75Initial program 58.4%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 85.1%
if -0.75 < F < 9.0000000000000001e-77Initial program 99.5%
Taylor expanded in F around -inf 35.2%
Taylor expanded in x around inf 73.2%
mul-1-neg73.2%
associate-/l*73.0%
Simplified73.0%
clear-num73.0%
associate-/r/73.0%
clear-num73.3%
Applied egg-rr73.3%
if 9.0000000000000001e-77 < F < 6.9999999999999998e-9Initial program 99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 68.9%
if 6.9999999999999998e-9 < F Initial program 57.4%
associate-*l/74.7%
+-commutative74.7%
*-commutative74.7%
fma-udef74.7%
fma-def74.7%
metadata-eval74.7%
metadata-eval74.7%
associate-/l*74.6%
fma-def74.6%
fma-udef74.6%
*-commutative74.6%
fma-def74.6%
fma-def74.6%
Applied egg-rr74.6%
Taylor expanded in F around inf 97.5%
Taylor expanded in B around 0 80.8%
Final simplification78.8%
(FPCore (F B x)
:precision binary64
(if (<= F -1.36e-33)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 2.06e-78)
(* (/ x (sin B)) (- (cos B)))
(if (<= F 7e-9)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(- (/ F (* F (sin B))) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.36e-33) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 2.06e-78) {
tmp = (x / sin(B)) * -cos(B);
} else if (F <= 7e-9) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (F / (F * 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.36d-33)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 2.06d-78) then
tmp = (x / sin(b)) * -cos(b)
else if (f <= 7d-9) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else
tmp = (f / (f * 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.36e-33) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 2.06e-78) {
tmp = (x / Math.sin(B)) * -Math.cos(B);
} else if (F <= 7e-9) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.36e-33: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 2.06e-78: tmp = (x / math.sin(B)) * -math.cos(B) elif F <= 7e-9: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.36e-33) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 2.06e-78) tmp = Float64(Float64(x / sin(B)) * Float64(-cos(B))); elseif (F <= 7e-9) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.36e-33) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 2.06e-78) tmp = (x / sin(B)) * -cos(B); elseif (F <= 7e-9) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.36e-33], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.06e-78], N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * (-N[Cos[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 7e-9], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.36 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.06 \cdot 10^{-78}:\\
\;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-9}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.36e-33Initial program 62.9%
distribute-lft-neg-in62.9%
+-commutative62.9%
cancel-sign-sub-inv62.9%
Simplified78.5%
Taylor expanded in x around 0 78.4%
associate-*l/78.4%
*-lft-identity78.4%
unpow278.4%
fma-udef78.4%
Simplified78.4%
Taylor expanded in F around -inf 94.2%
if -1.36e-33 < F < 2.06000000000000008e-78Initial program 99.5%
Taylor expanded in F around -inf 33.6%
Taylor expanded in x around inf 76.0%
mul-1-neg76.0%
associate-/l*75.8%
Simplified75.8%
clear-num75.8%
associate-/r/75.7%
clear-num76.1%
Applied egg-rr76.1%
if 2.06000000000000008e-78 < F < 6.9999999999999998e-9Initial program 99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 68.9%
if 6.9999999999999998e-9 < F Initial program 57.4%
associate-*l/74.7%
+-commutative74.7%
*-commutative74.7%
fma-udef74.7%
fma-def74.7%
metadata-eval74.7%
metadata-eval74.7%
associate-/l*74.6%
fma-def74.6%
fma-udef74.6%
*-commutative74.6%
fma-def74.6%
fma-def74.6%
Applied egg-rr74.6%
Taylor expanded in F around inf 97.5%
Taylor expanded in B around 0 80.8%
Final simplification83.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)))
(if (<= F -6.8e-33)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.95e-214)
t_0
(if (<= F 2.85e-297)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F 7e-9) t_0 (- (/ F (* F (sin B))) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -6.8e-33) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.95e-214) {
tmp = t_0;
} else if (F <= 2.85e-297) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= 7e-9) {
tmp = t_0;
} else {
tmp = (F / (F * sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
if (f <= (-6.8d-33)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.95d-214)) then
tmp = t_0
else if (f <= 2.85d-297) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= 7d-9) then
tmp = t_0
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -6.8e-33) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.95e-214) {
tmp = t_0;
} else if (F <= 2.85e-297) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= 7e-9) {
tmp = t_0;
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B tmp = 0 if F <= -6.8e-33: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.95e-214: tmp = t_0 elif F <= 2.85e-297: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= 7e-9: tmp = t_0 else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) tmp = 0.0 if (F <= -6.8e-33) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.95e-214) tmp = t_0; elseif (F <= 2.85e-297) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 7e-9) tmp = t_0; else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; tmp = 0.0; if (F <= -6.8e-33) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.95e-214) tmp = t_0; elseif (F <= 2.85e-297) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= 7e-9) tmp = t_0; else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -6.8e-33], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.95e-214], t$95$0, If[LessEqual[F, 2.85e-297], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7e-9], t$95$0, N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{if}\;F \leq -6.8 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.95 \cdot 10^{-214}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.85 \cdot 10^{-297}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-9}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6.8000000000000001e-33Initial program 62.5%
Taylor expanded in F around -inf 95.2%
Taylor expanded in B around 0 79.8%
if -6.8000000000000001e-33 < F < -1.95000000000000019e-214 or 2.8499999999999999e-297 < F < 6.9999999999999998e-9Initial program 99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 63.4%
if -1.95000000000000019e-214 < F < 2.8499999999999999e-297Initial program 99.5%
Taylor expanded in F around -inf 27.7%
Taylor expanded in B around 0 72.8%
if 6.9999999999999998e-9 < F Initial program 57.4%
associate-*l/74.7%
+-commutative74.7%
*-commutative74.7%
fma-udef74.7%
fma-def74.7%
metadata-eval74.7%
metadata-eval74.7%
associate-/l*74.6%
fma-def74.6%
fma-udef74.6%
*-commutative74.6%
fma-def74.6%
fma-def74.6%
Applied egg-rr74.6%
Taylor expanded in F around inf 97.5%
Taylor expanded in B around 0 80.8%
Final simplification74.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)))
(if (<= F -6.8e-33)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -5.4e-217)
t_0
(if (<= F 6.5e-291)
(+ (* x (/ -1.0 (tan B))) (* (/ F B) (/ -1.0 F)))
(if (<= F 7e-9) t_0 (- (/ F (* F (sin B))) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -6.8e-33) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -5.4e-217) {
tmp = t_0;
} else if (F <= 6.5e-291) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) * (-1.0 / F));
} else if (F <= 7e-9) {
tmp = t_0;
} else {
tmp = (F / (F * sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
if (f <= (-6.8d-33)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-5.4d-217)) then
tmp = t_0
else if (f <= 6.5d-291) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) * ((-1.0d0) / f))
else if (f <= 7d-9) then
tmp = t_0
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -6.8e-33) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -5.4e-217) {
tmp = t_0;
} else if (F <= 6.5e-291) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) * (-1.0 / F));
} else if (F <= 7e-9) {
tmp = t_0;
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B tmp = 0 if F <= -6.8e-33: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -5.4e-217: tmp = t_0 elif F <= 6.5e-291: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) * (-1.0 / F)) elif F <= 7e-9: tmp = t_0 else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) tmp = 0.0 if (F <= -6.8e-33) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -5.4e-217) tmp = t_0; elseif (F <= 6.5e-291) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif (F <= 7e-9) tmp = t_0; else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; tmp = 0.0; if (F <= -6.8e-33) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -5.4e-217) tmp = t_0; elseif (F <= 6.5e-291) tmp = (x * (-1.0 / tan(B))) + ((F / B) * (-1.0 / F)); elseif (F <= 7e-9) tmp = t_0; else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -6.8e-33], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.4e-217], t$95$0, If[LessEqual[F, 6.5e-291], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7e-9], t$95$0, N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{if}\;F \leq -6.8 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.4 \cdot 10^{-217}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-291}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-9}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6.8000000000000001e-33Initial program 62.5%
Taylor expanded in F around -inf 95.2%
Taylor expanded in B around 0 79.8%
if -6.8000000000000001e-33 < F < -5.40000000000000032e-217 or 6.50000000000000002e-291 < F < 6.9999999999999998e-9Initial program 99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 63.4%
if -5.40000000000000032e-217 < F < 6.50000000000000002e-291Initial program 99.5%
Taylor expanded in F around -inf 27.7%
Taylor expanded in B around 0 88.5%
if 6.9999999999999998e-9 < F Initial program 57.4%
associate-*l/74.7%
+-commutative74.7%
*-commutative74.7%
fma-udef74.7%
fma-def74.7%
metadata-eval74.7%
metadata-eval74.7%
associate-/l*74.6%
fma-def74.6%
fma-udef74.6%
*-commutative74.6%
fma-def74.6%
fma-def74.6%
Applied egg-rr74.6%
Taylor expanded in F around inf 97.5%
Taylor expanded in B around 0 80.8%
Final simplification75.3%
(FPCore (F B x)
:precision binary64
(if (<= F -2.9e+112)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.95e-297)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F 1.18e-182)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(if (<= F 6.6e-44)
(+ (/ -1.0 B) (/ -1.0 (/ (tan B) x)))
(- (/ F (* F (sin B))) (/ x B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.9e+112) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.95e-297) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= 1.18e-182) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else if (F <= 6.6e-44) {
tmp = (-1.0 / B) + (-1.0 / (tan(B) / x));
} else {
tmp = (F / (F * 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.9d+112)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.95d-297) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= 1.18d-182) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
else if (f <= 6.6d-44) then
tmp = ((-1.0d0) / b) + ((-1.0d0) / (tan(b) / x))
else
tmp = (f / (f * 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.9e+112) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.95e-297) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= 1.18e-182) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else if (F <= 6.6e-44) {
tmp = (-1.0 / B) + (-1.0 / (Math.tan(B) / x));
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.9e+112: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.95e-297: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= 1.18e-182: tmp = (-x / B) - (B * (x * -0.3333333333333333)) elif F <= 6.6e-44: tmp = (-1.0 / B) + (-1.0 / (math.tan(B) / x)) else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.9e+112) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.95e-297) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 1.18e-182) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); elseif (F <= 6.6e-44) tmp = Float64(Float64(-1.0 / B) + Float64(-1.0 / Float64(tan(B) / x))); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.9e+112) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.95e-297) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= 1.18e-182) tmp = (-x / B) - (B * (x * -0.3333333333333333)); elseif (F <= 6.6e-44) tmp = (-1.0 / B) + (-1.0 / (tan(B) / x)); else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.9e+112], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.95e-297], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.18e-182], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.6e-44], N[(N[(-1.0 / B), $MachinePrecision] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.9 \cdot 10^{+112}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.95 \cdot 10^{-297}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 1.18 \cdot 10^{-182}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 6.6 \cdot 10^{-44}:\\
\;\;\;\;\frac{-1}{B} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.9000000000000002e112Initial program 41.2%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 87.5%
if -2.9000000000000002e112 < F < 1.9500000000000001e-297Initial program 96.5%
Taylor expanded in F around -inf 53.1%
Taylor expanded in B around 0 59.7%
if 1.9500000000000001e-297 < F < 1.17999999999999997e-182Initial program 99.5%
Taylor expanded in F around -inf 28.8%
Taylor expanded in x around inf 94.9%
mul-1-neg94.9%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in B around 0 69.8%
*-commutative69.8%
distribute-rgt-out--69.8%
metadata-eval69.8%
Simplified69.8%
if 1.17999999999999997e-182 < F < 6.60000000000000011e-44Initial program 99.7%
Taylor expanded in F around -inf 51.5%
Taylor expanded in B around 0 64.2%
div-inv64.1%
clear-num64.3%
Applied egg-rr64.3%
if 6.60000000000000011e-44 < F Initial program 59.9%
associate-*l/76.1%
+-commutative76.1%
*-commutative76.1%
fma-udef76.1%
fma-def76.1%
metadata-eval76.1%
metadata-eval76.1%
associate-/l*76.1%
fma-def76.1%
fma-udef76.1%
*-commutative76.1%
fma-def76.1%
fma-def76.1%
Applied egg-rr76.1%
Taylor expanded in F around inf 92.4%
Taylor expanded in B around 0 76.6%
Final simplification71.5%
(FPCore (F B x)
:precision binary64
(if (<= F -850.0)
(+ (/ (- -1.0 x) B) (* 0.3333333333333333 (* B x)))
(if (or (<= F 2.2e-283) (not (<= F 9.4e-189)))
(- (/ 1.0 B) (/ x (tan B)))
(/ (- x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -850.0) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if ((F <= 2.2e-283) || !(F <= 9.4e-189)) {
tmp = (1.0 / B) - (x / tan(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 <= (-850.0d0)) then
tmp = (((-1.0d0) - x) / b) + (0.3333333333333333d0 * (b * x))
else if ((f <= 2.2d-283) .or. (.not. (f <= 9.4d-189))) then
tmp = (1.0d0 / b) - (x / tan(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 <= -850.0) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if ((F <= 2.2e-283) || !(F <= 9.4e-189)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -850.0: tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)) elif (F <= 2.2e-283) or not (F <= 9.4e-189): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -850.0) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(0.3333333333333333 * Float64(B * x))); elseif ((F <= 2.2e-283) || !(F <= 9.4e-189)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -850.0) tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)); elseif ((F <= 2.2e-283) || ~((F <= 9.4e-189))) tmp = (1.0 / B) - (x / tan(B)); else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -850.0], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 2.2e-283], N[Not[LessEqual[F, 9.4e-189]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-x) / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -850:\\
\;\;\;\;\frac{-1 - x}{B} + 0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-283} \lor \neg \left(F \leq 9.4 \cdot 10^{-189}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -850Initial program 58.4%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 73.6%
Taylor expanded in B around 0 59.2%
if -850 < F < 2.1999999999999998e-283 or 9.3999999999999993e-189 < F Initial program 78.8%
distribute-lft-neg-in78.8%
+-commutative78.8%
cancel-sign-sub-inv78.8%
Simplified87.4%
Taylor expanded in F around inf 61.6%
*-commutative61.6%
associate-/r*61.6%
Simplified61.6%
Taylor expanded in B around 0 60.4%
if 2.1999999999999998e-283 < F < 9.3999999999999993e-189Initial program 99.5%
Taylor expanded in F around -inf 30.3%
Taylor expanded in B around 0 19.6%
associate-*r/19.6%
distribute-lft-in19.6%
metadata-eval19.6%
neg-mul-119.6%
Simplified19.6%
Taylor expanded in x around inf 73.4%
mul-1-neg73.4%
Simplified73.4%
Final simplification61.0%
(FPCore (F B x)
:precision binary64
(if (<= F -0.98)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F 6e-283) (not (<= F 8.6e-185)))
(- (/ 1.0 B) (/ x (tan B)))
(/ (- x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.98) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= 6e-283) || !(F <= 8.6e-185)) {
tmp = (1.0 / B) - (x / tan(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 <= (-0.98d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= 6d-283) .or. (.not. (f <= 8.6d-185))) then
tmp = (1.0d0 / b) - (x / tan(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 <= -0.98) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= 6e-283) || !(F <= 8.6e-185)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.98: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= 6e-283) or not (F <= 8.6e-185): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.98) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= 6e-283) || !(F <= 8.6e-185)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.98) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= 6e-283) || ~((F <= 8.6e-185))) tmp = (1.0 / B) - (x / tan(B)); else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.98], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 6e-283], N[Not[LessEqual[F, 8.6e-185]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-x) / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.98:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-283} \lor \neg \left(F \leq 8.6 \cdot 10^{-185}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -0.97999999999999998Initial program 58.4%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 85.1%
if -0.97999999999999998 < F < 5.99999999999999992e-283 or 8.6000000000000001e-185 < F Initial program 78.8%
distribute-lft-neg-in78.8%
+-commutative78.8%
cancel-sign-sub-inv78.8%
Simplified87.4%
Taylor expanded in F around inf 61.6%
*-commutative61.6%
associate-/r*61.6%
Simplified61.6%
Taylor expanded in B around 0 60.4%
if 5.99999999999999992e-283 < F < 8.6000000000000001e-185Initial program 99.5%
Taylor expanded in F around -inf 30.3%
Taylor expanded in B around 0 19.6%
associate-*r/19.6%
distribute-lft-in19.6%
metadata-eval19.6%
neg-mul-119.6%
Simplified19.6%
Taylor expanded in x around inf 73.4%
mul-1-neg73.4%
Simplified73.4%
Final simplification68.4%
(FPCore (F B x)
:precision binary64
(if (<= F -1.25e+111)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4e-297)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F 1.16e-190)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e+111) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4e-297) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= 1.16e-190) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.25d+111)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4d-297) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= 1.16d-190) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e+111) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4e-297) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= 1.16e-190) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.25e+111: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4e-297: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= 1.16e-190: tmp = (-x / B) - (B * (x * -0.3333333333333333)) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.25e+111) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4e-297) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 1.16e-190) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.25e+111) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4e-297) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= 1.16e-190) tmp = (-x / B) - (B * (x * -0.3333333333333333)); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.25e+111], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4e-297], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.16e-190], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.25 \cdot 10^{+111}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4 \cdot 10^{-297}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 1.16 \cdot 10^{-190}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.2499999999999999e111Initial program 41.2%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 87.5%
if -1.2499999999999999e111 < F < 4.00000000000000016e-297Initial program 96.5%
Taylor expanded in F around -inf 53.1%
Taylor expanded in B around 0 59.7%
if 4.00000000000000016e-297 < F < 1.16e-190Initial program 99.5%
Taylor expanded in F around -inf 28.8%
Taylor expanded in x around inf 94.9%
mul-1-neg94.9%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in B around 0 69.8%
*-commutative69.8%
distribute-rgt-out--69.8%
metadata-eval69.8%
Simplified69.8%
if 1.16e-190 < F Initial program 66.1%
distribute-lft-neg-in66.1%
+-commutative66.1%
cancel-sign-sub-inv66.1%
Simplified79.8%
Taylor expanded in F around inf 83.3%
*-commutative83.3%
associate-/r*83.2%
Simplified83.2%
Taylor expanded in B around 0 67.9%
Final simplification68.8%
(FPCore (F B x)
:precision binary64
(if (<= F -3.6e-37)
(+ (/ (- -1.0 x) B) (* 0.3333333333333333 (* B x)))
(if (<= F 2.5e-47)
(/ (- x) B)
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-37) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (F <= 2.5e-47) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.6d-37)) then
tmp = (((-1.0d0) - x) / b) + (0.3333333333333333d0 * (b * x))
else if (f <= 2.5d-47) then
tmp = -x / b
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-37) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (F <= 2.5e-47) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.6e-37: tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)) elif F <= 2.5e-47: tmp = -x / B else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.6e-37) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(0.3333333333333333 * Float64(B * x))); elseif (F <= 2.5e-47) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.6e-37) tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)); elseif (F <= 2.5e-47) tmp = -x / B; else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.6e-37], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.5e-47], N[((-x) / B), $MachinePrecision], N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.6 \cdot 10^{-37}:\\
\;\;\;\;\frac{-1 - x}{B} + 0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-47}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.60000000000000007e-37Initial program 62.9%
Taylor expanded in F around -inf 94.1%
Taylor expanded in B around 0 70.8%
Taylor expanded in B around 0 55.5%
if -3.60000000000000007e-37 < F < 2.50000000000000006e-47Initial program 99.5%
Taylor expanded in F around -inf 34.2%
Taylor expanded in B around 0 24.1%
associate-*r/24.1%
distribute-lft-in24.1%
metadata-eval24.1%
neg-mul-124.1%
Simplified24.1%
Taylor expanded in x around inf 42.9%
mul-1-neg42.9%
Simplified42.9%
if 2.50000000000000006e-47 < F Initial program 59.9%
distribute-lft-neg-in59.9%
+-commutative59.9%
cancel-sign-sub-inv59.9%
Simplified76.1%
Taylor expanded in F around inf 92.5%
*-commutative92.5%
associate-/r*92.5%
Simplified92.5%
Taylor expanded in B around 0 54.3%
associate--l+54.3%
*-commutative54.3%
*-commutative54.3%
div-sub54.3%
Simplified54.3%
Final simplification50.8%
(FPCore (F B x) :precision binary64 (if (<= F -3.9e-40) (+ (/ (- -1.0 x) B) (* 0.3333333333333333 (* B x))) (if (<= F 4.2e-47) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.9e-40) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (F <= 4.2e-47) {
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 <= (-3.9d-40)) then
tmp = (((-1.0d0) - x) / b) + (0.3333333333333333d0 * (b * x))
else if (f <= 4.2d-47) 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 <= -3.9e-40) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (F <= 4.2e-47) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.9e-40: tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)) elif F <= 4.2e-47: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.9e-40) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(0.3333333333333333 * Float64(B * x))); elseif (F <= 4.2e-47) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.9e-40) tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)); elseif (F <= 4.2e-47) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.9e-40], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.2e-47], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.9 \cdot 10^{-40}:\\
\;\;\;\;\frac{-1 - x}{B} + 0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-47}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.89999999999999981e-40Initial program 62.9%
Taylor expanded in F around -inf 94.1%
Taylor expanded in B around 0 70.8%
Taylor expanded in B around 0 55.5%
if -3.89999999999999981e-40 < F < 4.2000000000000001e-47Initial program 99.5%
Taylor expanded in F around -inf 34.2%
Taylor expanded in B around 0 24.1%
associate-*r/24.1%
distribute-lft-in24.1%
metadata-eval24.1%
neg-mul-124.1%
Simplified24.1%
Taylor expanded in x around inf 42.9%
mul-1-neg42.9%
Simplified42.9%
if 4.2000000000000001e-47 < F Initial program 59.9%
distribute-lft-neg-in59.9%
+-commutative59.9%
cancel-sign-sub-inv59.9%
Simplified76.1%
Taylor expanded in F around inf 92.5%
*-commutative92.5%
associate-/r*92.5%
Simplified92.5%
Taylor expanded in B around 0 54.0%
Final simplification50.7%
(FPCore (F B x) :precision binary64 (if (or (<= x -5.4e-41) (not (<= x 4e-108))) (/ (- x) B) (/ (+ -1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -5.4e-41) || !(x <= 4e-108)) {
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 ((x <= (-5.4d-41)) .or. (.not. (x <= 4d-108))) 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 ((x <= -5.4e-41) || !(x <= 4e-108)) {
tmp = -x / B;
} else {
tmp = (-1.0 + x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -5.4e-41) or not (x <= 4e-108): tmp = -x / B else: tmp = (-1.0 + x) / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -5.4e-41) || !(x <= 4e-108)) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(-1.0 + x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -5.4e-41) || ~((x <= 4e-108))) tmp = -x / B; else tmp = (-1.0 + x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -5.4e-41], N[Not[LessEqual[x, 4e-108]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(N[(-1.0 + x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{-41} \lor \neg \left(x \leq 4 \cdot 10^{-108}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1 + x}{B}\\
\end{array}
\end{array}
if x < -5.4e-41 or 4.00000000000000016e-108 < x Initial program 77.6%
Taylor expanded in F around -inf 75.0%
Taylor expanded in B around 0 47.8%
associate-*r/47.8%
distribute-lft-in47.8%
metadata-eval47.8%
neg-mul-147.8%
Simplified47.8%
Taylor expanded in x around inf 52.0%
mul-1-neg52.0%
Simplified52.0%
if -5.4e-41 < x < 4.00000000000000016e-108Initial program 70.5%
Taylor expanded in F around -inf 30.0%
Taylor expanded in B around 0 18.0%
associate-*r/18.0%
distribute-lft-in18.0%
metadata-eval18.0%
neg-mul-118.0%
Simplified18.0%
expm1-log1p-u8.2%
expm1-udef7.7%
add-sqr-sqrt5.0%
sqrt-unprod7.7%
sqr-neg7.7%
sqrt-unprod2.8%
add-sqr-sqrt7.7%
Applied egg-rr7.7%
expm1-def8.2%
expm1-log1p18.0%
Simplified18.0%
Final simplification37.0%
(FPCore (F B x) :precision binary64 (if (<= F -1.3e-33) (/ (- -1.0 x) B) (if (<= F 1.35e-46) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-33) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.35e-46) {
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.3d-33)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.35d-46) 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.3e-33) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.35e-46) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.3e-33: tmp = (-1.0 - x) / B elif F <= 1.35e-46: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.3e-33) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.35e-46) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.3e-33) tmp = (-1.0 - x) / B; elseif (F <= 1.35e-46) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.3e-33], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.35e-46], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.3 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-46}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.29999999999999997e-33Initial program 62.9%
Taylor expanded in F around -inf 94.1%
Taylor expanded in B around 0 70.8%
Taylor expanded in B around 0 55.2%
associate-*r/55.2%
distribute-lft-in55.2%
metadata-eval55.2%
neg-mul-155.2%
sub-neg55.2%
Simplified55.2%
if -1.29999999999999997e-33 < F < 1.35e-46Initial program 99.5%
Taylor expanded in F around -inf 34.2%
Taylor expanded in B around 0 24.1%
associate-*r/24.1%
distribute-lft-in24.1%
metadata-eval24.1%
neg-mul-124.1%
Simplified24.1%
Taylor expanded in x around inf 42.9%
mul-1-neg42.9%
Simplified42.9%
if 1.35e-46 < F Initial program 59.9%
distribute-lft-neg-in59.9%
+-commutative59.9%
cancel-sign-sub-inv59.9%
Simplified76.1%
Taylor expanded in F around inf 92.5%
*-commutative92.5%
associate-/r*92.5%
Simplified92.5%
Taylor expanded in B around 0 54.0%
Final simplification50.6%
(FPCore (F B x) :precision binary64 (if (or (<= x -1.85e-37) (not (<= x 2e-110))) (/ (- x) B) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -1.85e-37) || !(x <= 2e-110)) {
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 <= (-1.85d-37)) .or. (.not. (x <= 2d-110))) 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 <= -1.85e-37) || !(x <= 2e-110)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -1.85e-37) or not (x <= 2e-110): tmp = -x / B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -1.85e-37) || !(x <= 2e-110)) tmp = Float64(Float64(-x) / B); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -1.85e-37) || ~((x <= 2e-110))) tmp = -x / B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -1.85e-37], N[Not[LessEqual[x, 2e-110]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{-37} \lor \neg \left(x \leq 2 \cdot 10^{-110}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -1.85e-37 or 2.0000000000000001e-110 < x Initial program 77.6%
Taylor expanded in F around -inf 75.0%
Taylor expanded in B around 0 47.8%
associate-*r/47.8%
distribute-lft-in47.8%
metadata-eval47.8%
neg-mul-147.8%
Simplified47.8%
Taylor expanded in x around inf 52.0%
mul-1-neg52.0%
Simplified52.0%
if -1.85e-37 < x < 2.0000000000000001e-110Initial program 70.5%
Taylor expanded in F around -inf 30.0%
Taylor expanded in B around 0 18.0%
associate-*r/18.0%
distribute-lft-in18.0%
metadata-eval18.0%
neg-mul-118.0%
Simplified18.0%
Taylor expanded in x around 0 18.0%
Final simplification37.0%
(FPCore (F B x) :precision binary64 (if (<= F -1.45e-42) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.45e-42) {
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 <= (-1.45d-42)) 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 <= -1.45e-42) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.45e-42: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.45e-42) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.45e-42) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.45e-42], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.45 \cdot 10^{-42}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -1.4500000000000001e-42Initial program 62.9%
Taylor expanded in F around -inf 94.1%
Taylor expanded in B around 0 70.8%
Taylor expanded in B around 0 55.2%
associate-*r/55.2%
distribute-lft-in55.2%
metadata-eval55.2%
neg-mul-155.2%
sub-neg55.2%
Simplified55.2%
if -1.4500000000000001e-42 < F Initial program 79.9%
Taylor expanded in F around -inf 36.8%
Taylor expanded in B around 0 25.0%
associate-*r/25.0%
distribute-lft-in25.0%
metadata-eval25.0%
neg-mul-125.0%
Simplified25.0%
Taylor expanded in x around inf 34.8%
mul-1-neg34.8%
Simplified34.8%
Final simplification41.4%
(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 74.5%
Taylor expanded in F around -inf 55.1%
Taylor expanded in B around 0 34.7%
associate-*r/34.7%
distribute-lft-in34.7%
metadata-eval34.7%
neg-mul-134.7%
Simplified34.7%
Taylor expanded in x around 0 11.6%
Final simplification11.6%
herbie shell --seed 2023275
(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))))))