
(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 -2.95e+102)
(- (/ -1.0 (sin B)) (* x (/ (cos B) (sin B))))
(if (<= F 100000000.0)
(- (/ (/ F (sin B)) (sqrt (fma F F 2.0))) t_0)
(- (* F (/ (/ 1.0 F) (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.95e+102) {
tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B)));
} else if (F <= 100000000.0) {
tmp = ((F / sin(B)) / sqrt(fma(F, F, 2.0))) - t_0;
} else {
tmp = (F * ((1.0 / F) / sin(B))) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.95e+102) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(cos(B) / sin(B)))); elseif (F <= 100000000.0) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(fma(F, F, 2.0))) - t_0); else tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / 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, -2.95e+102], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.95 \cdot 10^{+102}:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.95000000000000003e102Initial program 33.8%
Taylor expanded in F around -inf 99.6%
Taylor expanded in x around 0 99.7%
sub-neg99.7%
mul-1-neg99.7%
distribute-neg-in99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
unsub-neg99.7%
associate-/l*99.7%
Simplified99.7%
if -2.95000000000000003e102 < F < 1e8Initial program 76.1%
Simplified76.2%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
associate-*r/99.5%
sqrt-div99.5%
metadata-eval99.5%
un-div-inv99.5%
Applied egg-rr99.5%
associate-/l/99.5%
div-inv99.5%
*-commutative99.5%
Applied egg-rr99.5%
associate-*r/99.5%
times-frac99.5%
*-commutative99.5%
associate-*r/99.6%
associate-*l/99.6%
*-lft-identity99.6%
Simplified99.6%
if 1e8 < F Initial program 44.8%
Simplified66.4%
Taylor expanded in x around 0 79.7%
associate-*l/79.7%
*-lft-identity79.7%
+-commutative79.7%
unpow279.7%
fma-undefine79.7%
Simplified79.7%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e+148)
(- (/ -1.0 (sin B)) (* x (/ (cos B) (sin B))))
(if (<= F 100000000.0)
(- (/ F (* (sin B) (sqrt (fma F F 2.0)))) t_0)
(- (* F (/ (/ 1.0 F) (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e+148) {
tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B)));
} else if (F <= 100000000.0) {
tmp = (F / (sin(B) * sqrt(fma(F, F, 2.0)))) - t_0;
} else {
tmp = (F * ((1.0 / F) / sin(B))) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e+148) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(cos(B) / sin(B)))); elseif (F <= 100000000.0) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(F, F, 2.0)))) - t_0); else tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / 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, -1e+148], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+148}:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1e148Initial program 30.5%
Taylor expanded in F around -inf 99.5%
Taylor expanded in x around 0 99.6%
sub-neg99.6%
mul-1-neg99.6%
distribute-neg-in99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
unsub-neg99.6%
associate-/l*99.7%
Simplified99.7%
if -1e148 < F < 1e8Initial program 75.2%
Simplified76.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
associate-*r/99.6%
clear-num99.6%
sqrt-div99.5%
metadata-eval99.5%
un-div-inv99.5%
Applied egg-rr99.5%
associate-/r/99.6%
times-frac99.6%
*-lft-identity99.6%
Simplified99.6%
if 1e8 < F Initial program 44.8%
Simplified66.4%
Taylor expanded in x around 0 79.7%
associate-*l/79.7%
*-lft-identity79.7%
+-commutative79.7%
unpow279.7%
fma-undefine79.7%
Simplified79.7%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.88)
(- (/ (/ F (- (- F) (/ F (pow F 2.0)))) (sin B)) t_0)
(if (<= F 7.2e-6)
(- (/ (/ F (sin B)) (sqrt 2.0)) t_0)
(- (* F (/ (/ 1.0 F) (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.88) {
tmp = ((F / (-F - (F / pow(F, 2.0)))) / sin(B)) - t_0;
} else if (F <= 7.2e-6) {
tmp = ((F / sin(B)) / sqrt(2.0)) - t_0;
} else {
tmp = (F * ((1.0 / F) / 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 <= (-0.88d0)) then
tmp = ((f / (-f - (f / (f ** 2.0d0)))) / sin(b)) - t_0
else if (f <= 7.2d-6) then
tmp = ((f / sin(b)) / sqrt(2.0d0)) - t_0
else
tmp = (f * ((1.0d0 / f) / 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 <= -0.88) {
tmp = ((F / (-F - (F / Math.pow(F, 2.0)))) / Math.sin(B)) - t_0;
} else if (F <= 7.2e-6) {
tmp = ((F / Math.sin(B)) / Math.sqrt(2.0)) - t_0;
} else {
tmp = (F * ((1.0 / F) / Math.sin(B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.88: tmp = ((F / (-F - (F / math.pow(F, 2.0)))) / math.sin(B)) - t_0 elif F <= 7.2e-6: tmp = ((F / math.sin(B)) / math.sqrt(2.0)) - t_0 else: tmp = (F * ((1.0 / F) / math.sin(B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.88) tmp = Float64(Float64(Float64(F / Float64(Float64(-F) - Float64(F / (F ^ 2.0)))) / sin(B)) - t_0); elseif (F <= 7.2e-6) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(2.0)) - t_0); else tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / 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 <= -0.88) tmp = ((F / (-F - (F / (F ^ 2.0)))) / sin(B)) - t_0; elseif (F <= 7.2e-6) tmp = ((F / sin(B)) / sqrt(2.0)) - t_0; else tmp = (F * ((1.0 / F) / 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, -0.88], N[(N[(N[(F / N[((-F) - N[(F / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7.2e-6], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.88:\\
\;\;\;\;\frac{\frac{F}{\left(-F\right) - \frac{F}{{F}^{2}}}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.880000000000000004Initial program 47.6%
Simplified59.7%
Taylor expanded in x around 0 68.0%
associate-*l/67.9%
*-lft-identity67.9%
+-commutative67.9%
unpow267.9%
fma-undefine67.9%
Simplified67.9%
associate-*r/68.0%
sqrt-div68.0%
metadata-eval68.0%
un-div-inv68.0%
Applied egg-rr68.0%
Taylor expanded in F around -inf 98.7%
mul-1-neg98.7%
distribute-lft-in98.7%
*-rgt-identity98.7%
associate-*r/98.7%
*-rgt-identity98.7%
Simplified98.7%
if -0.880000000000000004 < F < 7.19999999999999967e-6Initial program 76.1%
Simplified76.3%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
associate-*r/99.7%
sqrt-div99.7%
metadata-eval99.7%
un-div-inv99.7%
Applied egg-rr99.7%
associate-/l/99.8%
div-inv99.8%
*-commutative99.8%
Applied egg-rr99.8%
associate-*r/99.8%
times-frac99.7%
*-commutative99.7%
associate-*r/99.8%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in F around 0 99.7%
if 7.19999999999999967e-6 < F Initial program 45.7%
Simplified66.4%
Taylor expanded in x around 0 80.5%
associate-*l/80.6%
*-lft-identity80.6%
+-commutative80.6%
unpow280.6%
fma-undefine80.6%
Simplified80.6%
Taylor expanded in F around inf 98.6%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.55)
(- (/ -1.0 (sin B)) (* x (/ (cos B) (sin B))))
(if (<= F 7.2e-6)
(- (/ (* F (sqrt 0.5)) (sin B)) t_0)
(- (* F (/ (/ 1.0 F) (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.55) {
tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B)));
} else if (F <= 7.2e-6) {
tmp = ((F * sqrt(0.5)) / sin(B)) - t_0;
} else {
tmp = (F * ((1.0 / F) / 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.55d0)) then
tmp = ((-1.0d0) / sin(b)) - (x * (cos(b) / sin(b)))
else if (f <= 7.2d-6) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - t_0
else
tmp = (f * ((1.0d0 / f) / 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.55) {
tmp = (-1.0 / Math.sin(B)) - (x * (Math.cos(B) / Math.sin(B)));
} else if (F <= 7.2e-6) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - t_0;
} else {
tmp = (F * ((1.0 / F) / Math.sin(B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.55: tmp = (-1.0 / math.sin(B)) - (x * (math.cos(B) / math.sin(B))) elif F <= 7.2e-6: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - t_0 else: tmp = (F * ((1.0 / F) / math.sin(B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.55) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(cos(B) / sin(B)))); elseif (F <= 7.2e-6) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / 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.55) tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B))); elseif (F <= 7.2e-6) tmp = ((F * sqrt(0.5)) / sin(B)) - t_0; else tmp = (F * ((1.0 / F) / 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.55], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.2e-6], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.55:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.55000000000000004Initial program 47.6%
Taylor expanded in F around -inf 97.8%
Taylor expanded in x around 0 97.9%
sub-neg97.9%
mul-1-neg97.9%
distribute-neg-in97.9%
+-commutative97.9%
distribute-neg-in97.9%
distribute-neg-frac97.9%
metadata-eval97.9%
unsub-neg97.9%
associate-/l*97.9%
Simplified97.9%
if -1.55000000000000004 < F < 7.19999999999999967e-6Initial program 76.1%
Simplified76.3%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
Simplified99.7%
if 7.19999999999999967e-6 < F Initial program 45.7%
Simplified66.4%
Taylor expanded in x around 0 80.5%
associate-*l/80.6%
*-lft-identity80.6%
+-commutative80.6%
unpow280.6%
fma-undefine80.6%
Simplified80.6%
Taylor expanded in F around inf 98.6%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) (* x (/ (cos B) (sin B))))
(if (<= F 7.2e-6)
(- (/ (/ F (sin B)) (sqrt 2.0)) t_0)
(- (* F (/ (/ 1.0 F) (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)) - (x * (cos(B) / sin(B)));
} else if (F <= 7.2e-6) {
tmp = ((F / sin(B)) / sqrt(2.0)) - t_0;
} else {
tmp = (F * ((1.0 / F) / 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)) - (x * (cos(b) / sin(b)))
else if (f <= 7.2d-6) then
tmp = ((f / sin(b)) / sqrt(2.0d0)) - t_0
else
tmp = (f * ((1.0d0 / f) / 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)) - (x * (Math.cos(B) / Math.sin(B)));
} else if (F <= 7.2e-6) {
tmp = ((F / Math.sin(B)) / Math.sqrt(2.0)) - t_0;
} else {
tmp = (F * ((1.0 / F) / 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)) - (x * (math.cos(B) / math.sin(B))) elif F <= 7.2e-6: tmp = ((F / math.sin(B)) / math.sqrt(2.0)) - t_0 else: tmp = (F * ((1.0 / F) / 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)) - Float64(x * Float64(cos(B) / sin(B)))); elseif (F <= 7.2e-6) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(2.0)) - t_0); else tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / 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)) - (x * (cos(B) / sin(B))); elseif (F <= 7.2e-6) tmp = ((F / sin(B)) / sqrt(2.0)) - t_0; else tmp = (F * ((1.0 / F) / 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] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.2e-6], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $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} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 47.6%
Taylor expanded in F around -inf 97.8%
Taylor expanded in x around 0 97.9%
sub-neg97.9%
mul-1-neg97.9%
distribute-neg-in97.9%
+-commutative97.9%
distribute-neg-in97.9%
distribute-neg-frac97.9%
metadata-eval97.9%
unsub-neg97.9%
associate-/l*97.9%
Simplified97.9%
if -1.3999999999999999 < F < 7.19999999999999967e-6Initial program 76.1%
Simplified76.3%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
associate-*r/99.7%
sqrt-div99.7%
metadata-eval99.7%
un-div-inv99.7%
Applied egg-rr99.7%
associate-/l/99.8%
div-inv99.8%
*-commutative99.8%
Applied egg-rr99.8%
associate-*r/99.8%
times-frac99.7%
*-commutative99.7%
associate-*r/99.8%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in F around 0 99.7%
if 7.19999999999999967e-6 < F Initial program 45.7%
Simplified66.4%
Taylor expanded in x around 0 80.5%
associate-*l/80.6%
*-lft-identity80.6%
+-commutative80.6%
unpow280.6%
fma-undefine80.6%
Simplified80.6%
Taylor expanded in F around inf 98.6%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.35)
(- (/ (+ -1.0 (/ 1.0 (pow F 2.0))) (sin B)) t_0)
(if (<= F 7.2e-6)
(- (/ (/ F (sin B)) (sqrt 2.0)) t_0)
(- (* F (/ (/ 1.0 F) (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.35) {
tmp = ((-1.0 + (1.0 / pow(F, 2.0))) / sin(B)) - t_0;
} else if (F <= 7.2e-6) {
tmp = ((F / sin(B)) / sqrt(2.0)) - t_0;
} else {
tmp = (F * ((1.0 / F) / 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.35d0)) then
tmp = (((-1.0d0) + (1.0d0 / (f ** 2.0d0))) / sin(b)) - t_0
else if (f <= 7.2d-6) then
tmp = ((f / sin(b)) / sqrt(2.0d0)) - t_0
else
tmp = (f * ((1.0d0 / f) / 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.35) {
tmp = ((-1.0 + (1.0 / Math.pow(F, 2.0))) / Math.sin(B)) - t_0;
} else if (F <= 7.2e-6) {
tmp = ((F / Math.sin(B)) / Math.sqrt(2.0)) - t_0;
} else {
tmp = (F * ((1.0 / F) / Math.sin(B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.35: tmp = ((-1.0 + (1.0 / math.pow(F, 2.0))) / math.sin(B)) - t_0 elif F <= 7.2e-6: tmp = ((F / math.sin(B)) / math.sqrt(2.0)) - t_0 else: tmp = (F * ((1.0 / F) / math.sin(B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.35) tmp = Float64(Float64(Float64(-1.0 + Float64(1.0 / (F ^ 2.0))) / sin(B)) - t_0); elseif (F <= 7.2e-6) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(2.0)) - t_0); else tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / 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.35) tmp = ((-1.0 + (1.0 / (F ^ 2.0))) / sin(B)) - t_0; elseif (F <= 7.2e-6) tmp = ((F / sin(B)) / sqrt(2.0)) - t_0; else tmp = (F * ((1.0 / F) / 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.35], N[(N[(N[(-1.0 + N[(1.0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7.2e-6], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.35:\\
\;\;\;\;\frac{-1 + \frac{1}{{F}^{2}}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3500000000000001Initial program 47.6%
Simplified59.7%
Taylor expanded in x around 0 68.0%
associate-*l/67.9%
*-lft-identity67.9%
+-commutative67.9%
unpow267.9%
fma-undefine67.9%
Simplified67.9%
associate-*r/68.0%
sqrt-div68.0%
metadata-eval68.0%
un-div-inv68.0%
Applied egg-rr68.0%
Taylor expanded in F around -inf 98.7%
if -1.3500000000000001 < F < 7.19999999999999967e-6Initial program 76.1%
Simplified76.3%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
associate-*r/99.7%
sqrt-div99.7%
metadata-eval99.7%
un-div-inv99.7%
Applied egg-rr99.7%
associate-/l/99.8%
div-inv99.8%
*-commutative99.8%
Applied egg-rr99.8%
associate-*r/99.8%
times-frac99.7%
*-commutative99.7%
associate-*r/99.8%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in F around 0 99.7%
if 7.19999999999999967e-6 < F Initial program 45.7%
Simplified66.4%
Taylor expanded in x around 0 80.5%
associate-*l/80.6%
*-lft-identity80.6%
+-commutative80.6%
unpow280.6%
fma-undefine80.6%
Simplified80.6%
Taylor expanded in F around inf 98.6%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(if (<= F -0.0009)
(- (/ -1.0 (sin B)) (* x (/ (cos B) (sin B))))
(if (<= F -4.2e-60)
(- (* (/ F (sin B)) (sqrt 0.5)) (/ x B))
(if (<= F 2.8e-47)
(/ (- x) (tan B))
(- (* F (/ (/ 1.0 F) (sin B))) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.0009) {
tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B)));
} else if (F <= -4.2e-60) {
tmp = ((F / sin(B)) * sqrt(0.5)) - (x / B);
} else if (F <= 2.8e-47) {
tmp = -x / tan(B);
} else {
tmp = (F * ((1.0 / F) / sin(B))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.0009d0)) then
tmp = ((-1.0d0) / sin(b)) - (x * (cos(b) / sin(b)))
else if (f <= (-4.2d-60)) then
tmp = ((f / sin(b)) * sqrt(0.5d0)) - (x / b)
else if (f <= 2.8d-47) then
tmp = -x / tan(b)
else
tmp = (f * ((1.0d0 / f) / sin(b))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.0009) {
tmp = (-1.0 / Math.sin(B)) - (x * (Math.cos(B) / Math.sin(B)));
} else if (F <= -4.2e-60) {
tmp = ((F / Math.sin(B)) * Math.sqrt(0.5)) - (x / B);
} else if (F <= 2.8e-47) {
tmp = -x / Math.tan(B);
} else {
tmp = (F * ((1.0 / F) / Math.sin(B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.0009: tmp = (-1.0 / math.sin(B)) - (x * (math.cos(B) / math.sin(B))) elif F <= -4.2e-60: tmp = ((F / math.sin(B)) * math.sqrt(0.5)) - (x / B) elif F <= 2.8e-47: tmp = -x / math.tan(B) else: tmp = (F * ((1.0 / F) / math.sin(B))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.0009) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(cos(B) / sin(B)))); elseif (F <= -4.2e-60) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(0.5)) - Float64(x / B)); elseif (F <= 2.8e-47) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / sin(B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.0009) tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B))); elseif (F <= -4.2e-60) tmp = ((F / sin(B)) * sqrt(0.5)) - (x / B); elseif (F <= 2.8e-47) tmp = -x / tan(B); else tmp = (F * ((1.0 / F) / sin(B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.0009], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.2e-60], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.8e-47], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.0009:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq -4.2 \cdot 10^{-60}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-47}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -8.9999999999999998e-4Initial program 47.6%
Taylor expanded in F around -inf 97.8%
Taylor expanded in x around 0 97.9%
sub-neg97.9%
mul-1-neg97.9%
distribute-neg-in97.9%
+-commutative97.9%
distribute-neg-in97.9%
distribute-neg-frac97.9%
metadata-eval97.9%
unsub-neg97.9%
associate-/l*97.9%
Simplified97.9%
if -8.9999999999999998e-4 < F < -4.19999999999999982e-60Initial program 66.1%
Taylor expanded in F around 0 66.1%
Taylor expanded in B around 0 60.7%
Taylor expanded in x around 0 88.5%
if -4.19999999999999982e-60 < F < 2.79999999999999993e-47Initial program 77.2%
Taylor expanded in F around -inf 57.4%
Taylor expanded in x around inf 85.5%
associate-/l*85.2%
clear-num85.2%
tan-quot85.2%
add-sqr-sqrt35.9%
sqrt-unprod23.4%
sqr-neg23.4%
sqrt-unprod0.9%
add-sqr-sqrt1.7%
neg-sub01.7%
sub-neg1.7%
add-sqr-sqrt0.9%
sqrt-unprod23.4%
sqr-neg23.4%
sqrt-unprod35.9%
add-sqr-sqrt85.2%
un-div-inv85.5%
Applied egg-rr85.5%
+-lft-identity85.5%
Simplified85.5%
if 2.79999999999999993e-47 < F Initial program 49.3%
Simplified68.1%
Taylor expanded in x around 0 82.3%
associate-*l/82.3%
*-lft-identity82.3%
+-commutative82.3%
unpow282.3%
fma-undefine82.3%
Simplified82.3%
Taylor expanded in F around inf 95.2%
Final simplification91.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.0146)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -2.25e-61)
(- (* (/ F (sin B)) (sqrt 0.5)) (/ x B))
(if (<= F 1.8e-47)
(/ (- x) (tan B))
(- (* F (/ (/ 1.0 F) (sin B))) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.0146) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -2.25e-61) {
tmp = ((F / sin(B)) * sqrt(0.5)) - (x / B);
} else if (F <= 1.8e-47) {
tmp = -x / tan(B);
} else {
tmp = (F * ((1.0 / F) / 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 <= (-0.0146d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-2.25d-61)) then
tmp = ((f / sin(b)) * sqrt(0.5d0)) - (x / b)
else if (f <= 1.8d-47) then
tmp = -x / tan(b)
else
tmp = (f * ((1.0d0 / f) / 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 <= -0.0146) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -2.25e-61) {
tmp = ((F / Math.sin(B)) * Math.sqrt(0.5)) - (x / B);
} else if (F <= 1.8e-47) {
tmp = -x / Math.tan(B);
} else {
tmp = (F * ((1.0 / F) / Math.sin(B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.0146: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -2.25e-61: tmp = ((F / math.sin(B)) * math.sqrt(0.5)) - (x / B) elif F <= 1.8e-47: tmp = -x / math.tan(B) else: tmp = (F * ((1.0 / F) / math.sin(B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0146) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -2.25e-61) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(0.5)) - Float64(x / B)); elseif (F <= 1.8e-47) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / 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 <= -0.0146) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -2.25e-61) tmp = ((F / sin(B)) * sqrt(0.5)) - (x / B); elseif (F <= 1.8e-47) tmp = -x / tan(B); else tmp = (F * ((1.0 / F) / 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, -0.0146], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.25e-61], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.8e-47], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0146:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -2.25 \cdot 10^{-61}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-47}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.0146000000000000001Initial program 47.6%
Simplified59.7%
Taylor expanded in x around 0 68.0%
associate-*l/67.9%
*-lft-identity67.9%
+-commutative67.9%
unpow267.9%
fma-undefine67.9%
Simplified67.9%
Taylor expanded in F around -inf 97.9%
if -0.0146000000000000001 < F < -2.25e-61Initial program 66.1%
Taylor expanded in F around 0 66.1%
Taylor expanded in B around 0 60.7%
Taylor expanded in x around 0 88.5%
if -2.25e-61 < F < 1.79999999999999995e-47Initial program 77.2%
Taylor expanded in F around -inf 57.4%
Taylor expanded in x around inf 85.5%
associate-/l*85.2%
clear-num85.2%
tan-quot85.2%
add-sqr-sqrt35.9%
sqrt-unprod23.4%
sqr-neg23.4%
sqrt-unprod0.9%
add-sqr-sqrt1.7%
neg-sub01.7%
sub-neg1.7%
add-sqr-sqrt0.9%
sqrt-unprod23.4%
sqr-neg23.4%
sqrt-unprod35.9%
add-sqr-sqrt85.2%
un-div-inv85.5%
Applied egg-rr85.5%
+-lft-identity85.5%
Simplified85.5%
if 1.79999999999999995e-47 < F Initial program 49.3%
Simplified68.1%
Taylor expanded in x around 0 82.3%
associate-*l/82.3%
*-lft-identity82.3%
+-commutative82.3%
unpow282.3%
fma-undefine82.3%
Simplified82.3%
Taylor expanded in F around inf 95.2%
Final simplification91.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.00032)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -8.4e-60)
(- (* (/ F (sin B)) (sqrt 0.5)) (/ x B))
(if (<= F 2.8e-47) (/ (- 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 <= -0.00032) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -8.4e-60) {
tmp = ((F / sin(B)) * sqrt(0.5)) - (x / B);
} else if (F <= 2.8e-47) {
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 <= (-0.00032d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-8.4d-60)) then
tmp = ((f / sin(b)) * sqrt(0.5d0)) - (x / b)
else if (f <= 2.8d-47) 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 <= -0.00032) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -8.4e-60) {
tmp = ((F / Math.sin(B)) * Math.sqrt(0.5)) - (x / B);
} else if (F <= 2.8e-47) {
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 <= -0.00032: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -8.4e-60: tmp = ((F / math.sin(B)) * math.sqrt(0.5)) - (x / B) elif F <= 2.8e-47: 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 <= -0.00032) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -8.4e-60) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(0.5)) - Float64(x / B)); elseif (F <= 2.8e-47) tmp = Float64(Float64(-x) / 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 <= -0.00032) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -8.4e-60) tmp = ((F / sin(B)) * sqrt(0.5)) - (x / B); elseif (F <= 2.8e-47) 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, -0.00032], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -8.4e-60], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.8e-47], 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 -0.00032:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -8.4 \cdot 10^{-60}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-47}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.20000000000000026e-4Initial program 47.6%
Simplified59.7%
Taylor expanded in x around 0 68.0%
associate-*l/67.9%
*-lft-identity67.9%
+-commutative67.9%
unpow267.9%
fma-undefine67.9%
Simplified67.9%
Taylor expanded in F around -inf 97.9%
if -3.20000000000000026e-4 < F < -8.39999999999999964e-60Initial program 66.1%
Taylor expanded in F around 0 66.1%
Taylor expanded in B around 0 60.7%
Taylor expanded in x around 0 88.5%
if -8.39999999999999964e-60 < F < 2.79999999999999993e-47Initial program 77.2%
Taylor expanded in F around -inf 57.4%
Taylor expanded in x around inf 85.5%
associate-/l*85.2%
clear-num85.2%
tan-quot85.2%
add-sqr-sqrt35.9%
sqrt-unprod23.4%
sqr-neg23.4%
sqrt-unprod0.9%
add-sqr-sqrt1.7%
neg-sub01.7%
sub-neg1.7%
add-sqr-sqrt0.9%
sqrt-unprod23.4%
sqr-neg23.4%
sqrt-unprod35.9%
add-sqr-sqrt85.2%
un-div-inv85.5%
Applied egg-rr85.5%
+-lft-identity85.5%
Simplified85.5%
if 2.79999999999999993e-47 < F Initial program 49.3%
Simplified68.1%
Taylor expanded in x around 0 82.3%
associate-*l/82.3%
*-lft-identity82.3%
+-commutative82.3%
unpow282.3%
fma-undefine82.3%
Simplified82.3%
Taylor expanded in F around inf 95.2%
Final simplification91.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.3e-81)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.25e-47)
(/ (* x (cos B)) (- (sin B)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.3e-81) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.25e-47) {
tmp = (x * cos(B)) / -sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.3d-81)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.25d-47) then
tmp = (x * cos(b)) / -sin(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.3e-81) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.25e-47) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.3e-81: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.25e-47: tmp = (x * math.cos(B)) / -math.sin(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.3e-81) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.25e-47) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.3e-81) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.25e-47) tmp = (x * cos(B)) / -sin(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.3e-81], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.25e-47], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[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.3 \cdot 10^{-81}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.25 \cdot 10^{-47}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.2999999999999999e-81Initial program 52.6%
Simplified61.5%
Taylor expanded in x around 0 76.5%
associate-*l/76.5%
*-lft-identity76.5%
+-commutative76.5%
unpow276.5%
fma-undefine76.5%
Simplified76.5%
Taylor expanded in F around -inf 89.1%
if -1.2999999999999999e-81 < F < 2.25e-47Initial program 77.6%
Taylor expanded in F around -inf 57.1%
Taylor expanded in x around inf 86.0%
if 2.25e-47 < F Initial program 49.3%
Simplified68.1%
Taylor expanded in x around 0 82.3%
associate-*l/82.3%
*-lft-identity82.3%
+-commutative82.3%
unpow282.3%
fma-undefine82.3%
Simplified82.3%
Taylor expanded in F around inf 95.2%
Final simplification89.8%
(FPCore (F B x) :precision binary64 (if (<= F -1.3e-81) (- (/ -1.0 (sin B)) (/ x (tan B))) (if (<= F 2.05e+44) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-81) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 2.05e+44) {
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.3d-81)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 2.05d+44) 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.3e-81) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 2.05e+44) {
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.3e-81: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 2.05e+44: 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.3e-81) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 2.05e+44) tmp = Float64(Float64(-x) / 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.3e-81) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 2.05e+44) 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.3e-81], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.05e+44], 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.3 \cdot 10^{-81}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{+44}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.2999999999999999e-81Initial program 52.6%
Simplified61.5%
Taylor expanded in x around 0 76.5%
associate-*l/76.5%
*-lft-identity76.5%
+-commutative76.5%
unpow276.5%
fma-undefine76.5%
Simplified76.5%
Taylor expanded in F around -inf 89.1%
if -1.2999999999999999e-81 < F < 2.04999999999999982e44Initial program 76.7%
Taylor expanded in F around -inf 59.1%
Taylor expanded in x around inf 82.9%
associate-/l*82.7%
clear-num82.7%
tan-quot82.7%
add-sqr-sqrt35.2%
sqrt-unprod22.6%
sqr-neg22.6%
sqrt-unprod0.9%
add-sqr-sqrt1.6%
neg-sub01.6%
sub-neg1.6%
add-sqr-sqrt0.9%
sqrt-unprod22.6%
sqr-neg22.6%
sqrt-unprod35.2%
add-sqr-sqrt82.7%
un-div-inv82.9%
Applied egg-rr82.9%
+-lft-identity82.9%
Simplified82.9%
if 2.04999999999999982e44 < F Initial program 40.2%
Taylor expanded in F around inf 74.4%
Taylor expanded in B around 0 63.8%
Taylor expanded in x around 0 87.2%
mul-1-neg87.2%
+-commutative87.2%
sub-neg87.2%
Simplified87.2%
Final simplification85.7%
(FPCore (F B x) :precision binary64 (if (<= F -1.18e+73) (/ (- -1.0 x) B) (if (<= F 2.05e+44) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.18e+73) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.05e+44) {
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.18d+73)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.05d+44) 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.18e+73) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.05e+44) {
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.18e+73: tmp = (-1.0 - x) / B elif F <= 2.05e+44: 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.18e+73) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.05e+44) tmp = Float64(Float64(-x) / 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.18e+73) tmp = (-1.0 - x) / B; elseif (F <= 2.05e+44) 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.18e+73], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.05e+44], 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.18 \cdot 10^{+73}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{+44}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.18000000000000004e73Initial program 42.9%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 61.0%
mul-1-neg61.0%
distribute-neg-frac261.0%
Simplified61.0%
if -1.18000000000000004e73 < F < 2.04999999999999982e44Initial program 74.7%
Taylor expanded in F around -inf 61.9%
Taylor expanded in x around inf 78.1%
associate-/l*77.9%
clear-num77.9%
tan-quot77.9%
add-sqr-sqrt33.5%
sqrt-unprod21.8%
sqr-neg21.8%
sqrt-unprod0.9%
add-sqr-sqrt1.7%
neg-sub01.7%
sub-neg1.7%
add-sqr-sqrt0.9%
sqrt-unprod21.8%
sqr-neg21.8%
sqrt-unprod33.5%
add-sqr-sqrt77.9%
un-div-inv78.1%
Applied egg-rr78.1%
+-lft-identity78.1%
Simplified78.1%
if 2.04999999999999982e44 < F Initial program 40.2%
Taylor expanded in F around inf 74.4%
Taylor expanded in B around 0 63.8%
Taylor expanded in x around 0 87.2%
mul-1-neg87.2%
+-commutative87.2%
sub-neg87.2%
Simplified87.2%
Final simplification77.0%
(FPCore (F B x) :precision binary64 (if (<= F -1.8e-19) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 2.05e+44) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-19) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.05e+44) {
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.8d-19)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.05d+44) 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.8e-19) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.05e+44) {
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.8e-19: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.05e+44: 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.8e-19) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.05e+44) tmp = Float64(Float64(-x) / 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.8e-19) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.05e+44) 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.8e-19], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.05e+44], 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.8 \cdot 10^{-19}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{+44}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.8000000000000001e-19Initial program 50.9%
Taylor expanded in F around -inf 92.3%
Taylor expanded in B around 0 75.6%
if -1.8000000000000001e-19 < F < 2.04999999999999982e44Initial program 74.8%
Taylor expanded in F around -inf 60.9%
Taylor expanded in x around inf 81.9%
associate-/l*81.7%
clear-num81.7%
tan-quot81.8%
add-sqr-sqrt35.8%
sqrt-unprod23.2%
sqr-neg23.2%
sqrt-unprod0.9%
add-sqr-sqrt1.6%
neg-sub01.6%
sub-neg1.6%
add-sqr-sqrt0.9%
sqrt-unprod23.2%
sqr-neg23.2%
sqrt-unprod35.8%
add-sqr-sqrt81.8%
un-div-inv81.9%
Applied egg-rr81.9%
+-lft-identity81.9%
Simplified81.9%
if 2.04999999999999982e44 < F Initial program 40.2%
Taylor expanded in F around inf 74.4%
Taylor expanded in B around 0 63.8%
Taylor expanded in x around 0 87.2%
mul-1-neg87.2%
+-commutative87.2%
sub-neg87.2%
Simplified87.2%
Final simplification81.5%
(FPCore (F B x) :precision binary64 (if (<= F -1.75e-20) (/ (- -1.0 x) B) (if (<= F 5.5e-8) (/ (- x) (sin B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.75e-20) {
tmp = (-1.0 - x) / B;
} else if (F <= 5.5e-8) {
tmp = -x / sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.75d-20)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 5.5d-8) then
tmp = -x / sin(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.75e-20) {
tmp = (-1.0 - x) / B;
} else if (F <= 5.5e-8) {
tmp = -x / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.75e-20: tmp = (-1.0 - x) / B elif F <= 5.5e-8: tmp = -x / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.75e-20) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 5.5e-8) tmp = Float64(Float64(-x) / sin(B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.75e-20) tmp = (-1.0 - x) / B; elseif (F <= 5.5e-8) tmp = -x / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.75e-20], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5.5e-8], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.75 \cdot 10^{-20}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.75000000000000002e-20Initial program 50.9%
Taylor expanded in F around -inf 92.3%
Taylor expanded in B around 0 55.8%
mul-1-neg55.8%
distribute-neg-frac255.8%
Simplified55.8%
if -1.75000000000000002e-20 < F < 5.5000000000000003e-8Initial program 75.6%
Taylor expanded in F around -inf 59.8%
Taylor expanded in x around inf 83.6%
Taylor expanded in B around 0 50.8%
if 5.5000000000000003e-8 < F Initial program 46.5%
Taylor expanded in F around inf 77.7%
Taylor expanded in B around 0 61.6%
Taylor expanded in B around 0 57.7%
Final simplification54.0%
(FPCore (F B x) :precision binary64 (if (<= F -3.6e+75) (/ (- -1.0 x) B) (if (<= F 7.5e+120) (/ (- x) (tan B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e+75) {
tmp = (-1.0 - x) / B;
} else if (F <= 7.5e+120) {
tmp = -x / tan(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.6d+75)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 7.5d+120) then
tmp = -x / tan(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.6e+75) {
tmp = (-1.0 - x) / B;
} else if (F <= 7.5e+120) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.6e+75: tmp = (-1.0 - x) / B elif F <= 7.5e+120: tmp = -x / math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.6e+75) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 7.5e+120) tmp = Float64(Float64(-x) / tan(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.6e+75) tmp = (-1.0 - x) / B; elseif (F <= 7.5e+120) tmp = -x / tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.6e+75], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.5e+120], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.6 \cdot 10^{+75}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{+120}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.6e75Initial program 42.9%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 61.0%
mul-1-neg61.0%
distribute-neg-frac261.0%
Simplified61.0%
if -3.6e75 < F < 7.5000000000000006e120Initial program 74.6%
Taylor expanded in F around -inf 61.8%
Taylor expanded in x around inf 76.6%
associate-/l*76.5%
clear-num76.4%
tan-quot76.5%
add-sqr-sqrt34.8%
sqrt-unprod23.0%
sqr-neg23.0%
sqrt-unprod0.8%
add-sqr-sqrt1.6%
neg-sub01.6%
sub-neg1.6%
add-sqr-sqrt0.8%
sqrt-unprod23.0%
sqr-neg23.0%
sqrt-unprod34.8%
add-sqr-sqrt76.5%
un-div-inv76.6%
Applied egg-rr76.6%
+-lft-identity76.6%
Simplified76.6%
if 7.5000000000000006e120 < F Initial program 28.4%
Taylor expanded in F around inf 65.3%
Taylor expanded in B around 0 58.4%
Taylor expanded in B around 0 64.8%
Final simplification71.9%
(FPCore (F B x) :precision binary64 (if (or (<= x -7.2e-192) (not (<= x 4.8e-177))) (/ x (- B)) (/ (+ x 1.0) B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -7.2e-192) || !(x <= 4.8e-177)) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-7.2d-192)) .or. (.not. (x <= 4.8d-177))) then
tmp = x / -b
else
tmp = (x + 1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -7.2e-192) || !(x <= 4.8e-177)) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -7.2e-192) or not (x <= 4.8e-177): tmp = x / -B else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -7.2e-192) || !(x <= 4.8e-177)) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -7.2e-192) || ~((x <= 4.8e-177))) tmp = x / -B; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -7.2e-192], N[Not[LessEqual[x, 4.8e-177]], $MachinePrecision]], N[(x / (-B)), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{-192} \lor \neg \left(x \leq 4.8 \cdot 10^{-177}\right):\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if x < -7.1999999999999998e-192 or 4.7999999999999998e-177 < x Initial program 59.9%
Taylor expanded in F around -inf 77.1%
Taylor expanded in B around 0 49.4%
mul-1-neg49.4%
distribute-neg-frac249.4%
Simplified49.4%
Taylor expanded in x around inf 50.4%
mul-1-neg50.4%
distribute-neg-frac250.4%
Simplified50.4%
if -7.1999999999999998e-192 < x < 4.7999999999999998e-177Initial program 67.5%
Taylor expanded in F around -inf 20.9%
Taylor expanded in B around 0 9.5%
mul-1-neg9.5%
distribute-neg-frac29.5%
Simplified9.5%
add-sqr-sqrt4.3%
sqrt-unprod8.2%
sqr-neg8.2%
sqrt-unprod9.9%
add-sqr-sqrt21.4%
*-un-lft-identity21.4%
Applied egg-rr21.4%
*-lft-identity21.4%
Simplified21.4%
Final simplification44.8%
(FPCore (F B x) :precision binary64 (if (<= F -2.8e-84) (/ (- -1.0 x) B) (if (<= F 3.2e-26) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.8e-84) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.2e-26) {
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 <= (-2.8d-84)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3.2d-26) 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 <= -2.8e-84) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.2e-26) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.8e-84: tmp = (-1.0 - x) / B elif F <= 3.2e-26: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.8e-84) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.2e-26) 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 <= -2.8e-84) tmp = (-1.0 - x) / B; elseif (F <= 3.2e-26) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.8e-84], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.2e-26], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.8 \cdot 10^{-84}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-26}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.79999999999999982e-84Initial program 52.6%
Taylor expanded in F around -inf 89.0%
Taylor expanded in B around 0 55.7%
mul-1-neg55.7%
distribute-neg-frac255.7%
Simplified55.7%
if -2.79999999999999982e-84 < F < 3.2000000000000001e-26Initial program 77.3%
Taylor expanded in F around -inf 57.4%
Taylor expanded in B around 0 34.0%
mul-1-neg34.0%
distribute-neg-frac234.0%
Simplified34.0%
Taylor expanded in x around inf 47.3%
mul-1-neg47.3%
distribute-neg-frac247.3%
Simplified47.3%
if 3.2000000000000001e-26 < F Initial program 48.6%
Taylor expanded in F around inf 77.4%
Taylor expanded in B around 0 60.6%
Taylor expanded in B around 0 56.9%
Final simplification52.7%
(FPCore (F B x) :precision binary64 (if (<= F 1.95e-26) (/ x (- B)) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.95e-26) {
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.95d-26) 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.95e-26) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.95e-26: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.95e-26) 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.95e-26) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.95e-26], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.95 \cdot 10^{-26}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 1.94999999999999993e-26Initial program 66.6%
Taylor expanded in F around -inf 71.0%
Taylor expanded in B around 0 43.3%
mul-1-neg43.3%
distribute-neg-frac243.3%
Simplified43.3%
Taylor expanded in x around inf 42.8%
mul-1-neg42.8%
distribute-neg-frac242.8%
Simplified42.8%
if 1.94999999999999993e-26 < F Initial program 48.6%
Taylor expanded in F around inf 77.4%
Taylor expanded in B around 0 60.6%
Taylor expanded in B around 0 56.9%
Final simplification46.9%
(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 61.4%
Taylor expanded in F around -inf 66.3%
Taylor expanded in B around 0 41.8%
mul-1-neg41.8%
distribute-neg-frac241.8%
Simplified41.8%
Taylor expanded in x around inf 41.4%
mul-1-neg41.4%
distribute-neg-frac241.4%
Simplified41.4%
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 61.4%
Taylor expanded in F around -inf 66.3%
Taylor expanded in B around 0 41.8%
mul-1-neg41.8%
distribute-neg-frac241.8%
Simplified41.8%
Taylor expanded in x around 0 8.1%
Final simplification8.1%
herbie shell --seed 2024059
(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))))))