
(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 31 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 -120000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 31.5)
(-
(* F (pow (/ (sin B) (pow (fma 2.0 x (fma F F 2.0)) -0.5)) -1.0))
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 <= -120000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 31.5) {
tmp = (F * pow((sin(B) / pow(fma(2.0, x, fma(F, F, 2.0)), -0.5)), -1.0)) - 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 <= -120000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 31.5) tmp = Float64(Float64(F * (Float64(sin(B) / (fma(2.0, x, fma(F, F, 2.0)) ^ -0.5)) ^ -1.0)) - 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, -120000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 31.5], N[(N[(F * N[Power[N[(N[Sin[B], $MachinePrecision] / N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], -1.0], $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 -120000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 31.5:\\
\;\;\;\;F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.2e8Initial program 59.6%
+-commutative59.6%
unsub-neg59.6%
associate-*l/74.1%
associate-*r/74.0%
*-commutative74.0%
Simplified74.1%
clear-num74.0%
inv-pow74.0%
fma-def74.0%
fma-udef74.0%
*-commutative74.0%
fma-def74.0%
fma-def74.0%
Applied egg-rr74.0%
Taylor expanded in F around -inf 99.9%
if -1.2e8 < F < 31.5Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
clear-num99.6%
inv-pow99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
if 31.5 < F Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/69.3%
associate-*r/69.3%
*-commutative69.3%
Simplified69.4%
clear-num69.5%
inv-pow69.5%
fma-def69.5%
fma-udef69.5%
*-commutative69.5%
fma-def69.5%
fma-def69.5%
Applied egg-rr69.5%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4.4e+28)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 31.5)
(- (/ F (* (sin B) (sqrt (fma F F (fma 2.0 x 2.0))))) 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 <= -4.4e+28) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 31.5) {
tmp = (F / (sin(B) * sqrt(fma(F, F, fma(2.0, x, 2.0))))) - 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 <= -4.4e+28) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 31.5) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(F, F, fma(2.0, x, 2.0))))) - 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, -4.4e+28], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 31.5], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $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 -4.4 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 31.5:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -4.39999999999999973e28Initial program 55.8%
+-commutative55.8%
unsub-neg55.8%
associate-*l/71.6%
associate-*r/71.6%
*-commutative71.6%
Simplified71.7%
clear-num71.6%
inv-pow71.6%
fma-def71.6%
fma-udef71.6%
*-commutative71.6%
fma-def71.6%
fma-def71.6%
Applied egg-rr71.6%
Taylor expanded in F around -inf 99.9%
if -4.39999999999999973e28 < F < 31.5Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.5%
clear-num99.6%
inv-pow99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
expm1-log1p-u83.8%
expm1-udef66.6%
Applied egg-rr66.6%
expm1-def83.8%
expm1-log1p99.6%
associate-*r/99.6%
*-rgt-identity99.6%
*-commutative99.6%
fma-udef99.6%
fma-udef99.6%
unpow299.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
unpow299.6%
fma-def99.6%
+-commutative99.6%
fma-def99.6%
Simplified99.6%
if 31.5 < F Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/69.3%
associate-*r/69.3%
*-commutative69.3%
Simplified69.4%
clear-num69.5%
inv-pow69.5%
fma-def69.5%
fma-udef69.5%
*-commutative69.5%
fma-def69.5%
fma-def69.5%
Applied egg-rr69.5%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -160000.0)
(- (/ F (* (sin B) (- (/ (- -1.0 x) F) F))) t_0)
(if (<= F 31.5)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -160000.0) {
tmp = (F / (sin(B) * (((-1.0 - x) / F) - F))) - t_0;
} else if (F <= 31.5) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -160000.0) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(Float64(-1.0 - x) / F) - F))) - t_0); elseif (F <= 31.5) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -160000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 31.5], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -160000:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1 - x}{F} - F\right)} - t_0\\
\mathbf{elif}\;F \leq 31.5:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.6e5Initial program 60.3%
+-commutative60.3%
unsub-neg60.3%
associate-*l/74.5%
associate-*r/74.5%
*-commutative74.5%
Simplified74.5%
clear-num74.5%
inv-pow74.5%
fma-def74.5%
fma-udef74.5%
*-commutative74.5%
fma-def74.5%
fma-def74.5%
Applied egg-rr74.5%
expm1-log1p-u56.1%
expm1-udef56.1%
Applied egg-rr56.1%
expm1-def56.1%
expm1-log1p74.5%
associate-*r/74.5%
*-rgt-identity74.5%
*-commutative74.5%
fma-udef74.5%
fma-udef74.5%
unpow274.5%
+-commutative74.5%
associate-+r+74.5%
+-commutative74.5%
+-commutative74.5%
unpow274.5%
fma-def74.5%
+-commutative74.5%
fma-def74.5%
Simplified74.5%
Taylor expanded in F around -inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
associate-*r/99.7%
distribute-lft-in99.7%
metadata-eval99.7%
associate-*r*99.7%
metadata-eval99.7%
neg-mul-199.7%
sub-neg99.7%
Simplified99.7%
if -1.6e5 < F < 31.5Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
expm1-log1p-u83.1%
expm1-udef65.1%
fma-def65.1%
sqrt-div65.1%
metadata-eval65.1%
fma-def65.1%
Applied egg-rr65.1%
expm1-def83.0%
expm1-log1p99.6%
associate-*r/99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
if 31.5 < F Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/69.3%
associate-*r/69.3%
*-commutative69.3%
Simplified69.4%
clear-num69.5%
inv-pow69.5%
fma-def69.5%
fma-udef69.5%
*-commutative69.5%
fma-def69.5%
fma-def69.5%
Applied egg-rr69.5%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -125000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 31.5)
(- (* (/ 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 <= -125000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 31.5) {
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 <= (-125000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 31.5d0) 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 <= -125000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 31.5) {
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 <= -125000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 31.5: 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 <= -125000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 31.5) 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 <= -125000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 31.5) 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, -125000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 31.5], 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 -125000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 31.5:\\
\;\;\;\;\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 < -1.25e8Initial program 59.6%
+-commutative59.6%
unsub-neg59.6%
associate-*l/74.1%
associate-*r/74.0%
*-commutative74.0%
Simplified74.1%
clear-num74.0%
inv-pow74.0%
fma-def74.0%
fma-udef74.0%
*-commutative74.0%
fma-def74.0%
fma-def74.0%
Applied egg-rr74.0%
Taylor expanded in F around -inf 99.9%
if -1.25e8 < F < 31.5Initial program 99.4%
div-inv99.5%
expm1-log1p-u72.7%
expm1-udef52.7%
Applied egg-rr52.7%
expm1-def72.7%
expm1-log1p99.5%
Simplified99.5%
if 31.5 < F Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/69.3%
associate-*r/69.3%
*-commutative69.3%
Simplified69.4%
clear-num69.5%
inv-pow69.5%
fma-def69.5%
fma-udef69.5%
*-commutative69.5%
fma-def69.5%
fma-def69.5%
Applied egg-rr69.5%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.92)
(- (/ F (* (sin B) (- (/ (- -1.0 x) F) F))) t_0)
(if (<= F 1.42)
(- (* 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 <= -0.92) {
tmp = (F / (sin(B) * (((-1.0 - x) / F) - F))) - t_0;
} else if (F <= 1.42) {
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 <= (-0.92d0)) then
tmp = (f / (sin(b) * ((((-1.0d0) - x) / f) - f))) - t_0
else if (f <= 1.42d0) 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 <= -0.92) {
tmp = (F / (Math.sin(B) * (((-1.0 - x) / F) - F))) - t_0;
} else if (F <= 1.42) {
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 <= -0.92: tmp = (F / (math.sin(B) * (((-1.0 - x) / F) - F))) - t_0 elif F <= 1.42: 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 <= -0.92) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(Float64(-1.0 - x) / F) - F))) - t_0); elseif (F <= 1.42) 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 <= -0.92) tmp = (F / (sin(B) * (((-1.0 - x) / F) - F))) - t_0; elseif (F <= 1.42) 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, -0.92], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], 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 -0.92:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1 - x}{F} - F\right)} - t_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.92000000000000004Initial program 62.2%
+-commutative62.2%
unsub-neg62.2%
associate-*l/75.8%
associate-*r/75.7%
*-commutative75.7%
Simplified75.8%
clear-num75.7%
inv-pow75.7%
fma-def75.7%
fma-udef75.7%
*-commutative75.7%
fma-def75.7%
fma-def75.7%
Applied egg-rr75.7%
expm1-log1p-u55.0%
expm1-udef55.0%
Applied egg-rr55.0%
expm1-def55.0%
expm1-log1p75.7%
associate-*r/75.8%
*-rgt-identity75.8%
*-commutative75.8%
fma-udef75.8%
fma-udef75.8%
unpow275.8%
+-commutative75.8%
associate-+r+75.8%
+-commutative75.8%
+-commutative75.8%
unpow275.8%
fma-def75.8%
+-commutative75.8%
fma-def75.8%
Simplified75.8%
Taylor expanded in F around -inf 97.9%
mul-1-neg97.9%
unsub-neg97.9%
associate-*r/97.9%
distribute-lft-in97.9%
metadata-eval97.9%
associate-*r*97.9%
metadata-eval97.9%
neg-mul-197.9%
sub-neg97.9%
Simplified97.9%
if -0.92000000000000004 < F < 1.4199999999999999Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.0%
if 1.4199999999999999 < F Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/69.3%
associate-*r/69.3%
*-commutative69.3%
Simplified69.4%
clear-num69.5%
inv-pow69.5%
fma-def69.5%
fma-udef69.5%
*-commutative69.5%
fma-def69.5%
fma-def69.5%
Applied egg-rr69.5%
Taylor expanded in F around inf 99.8%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.92)
(- (/ F (* (sin B) (- (/ (- -1.0 x) F) F))) t_0)
(if (<= F 1.42)
(- (/ (sqrt 0.5) (/ (sin B) F)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.92) {
tmp = (F / (sin(B) * (((-1.0 - x) / F) - F))) - t_0;
} else if (F <= 1.42) {
tmp = (sqrt(0.5) / (sin(B) / F)) - 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 <= (-0.92d0)) then
tmp = (f / (sin(b) * ((((-1.0d0) - x) / f) - f))) - t_0
else if (f <= 1.42d0) then
tmp = (sqrt(0.5d0) / (sin(b) / f)) - 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 <= -0.92) {
tmp = (F / (Math.sin(B) * (((-1.0 - x) / F) - F))) - t_0;
} else if (F <= 1.42) {
tmp = (Math.sqrt(0.5) / (Math.sin(B) / F)) - 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 <= -0.92: tmp = (F / (math.sin(B) * (((-1.0 - x) / F) - F))) - t_0 elif F <= 1.42: tmp = (math.sqrt(0.5) / (math.sin(B) / F)) - 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 <= -0.92) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(Float64(-1.0 - x) / F) - F))) - t_0); elseif (F <= 1.42) tmp = Float64(Float64(sqrt(0.5) / Float64(sin(B) / F)) - 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 <= -0.92) tmp = (F / (sin(B) * (((-1.0 - x) / F) - F))) - t_0; elseif (F <= 1.42) tmp = (sqrt(0.5) / (sin(B) / F)) - 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, -0.92], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.92:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1 - x}{F} - F\right)} - t_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.92000000000000004Initial program 62.2%
+-commutative62.2%
unsub-neg62.2%
associate-*l/75.8%
associate-*r/75.7%
*-commutative75.7%
Simplified75.8%
clear-num75.7%
inv-pow75.7%
fma-def75.7%
fma-udef75.7%
*-commutative75.7%
fma-def75.7%
fma-def75.7%
Applied egg-rr75.7%
expm1-log1p-u55.0%
expm1-udef55.0%
Applied egg-rr55.0%
expm1-def55.0%
expm1-log1p75.7%
associate-*r/75.8%
*-rgt-identity75.8%
*-commutative75.8%
fma-udef75.8%
fma-udef75.8%
unpow275.8%
+-commutative75.8%
associate-+r+75.8%
+-commutative75.8%
+-commutative75.8%
unpow275.8%
fma-def75.8%
+-commutative75.8%
fma-def75.8%
Simplified75.8%
Taylor expanded in F around -inf 97.9%
mul-1-neg97.9%
unsub-neg97.9%
associate-*r/97.9%
distribute-lft-in97.9%
metadata-eval97.9%
associate-*r*97.9%
metadata-eval97.9%
neg-mul-197.9%
sub-neg97.9%
Simplified97.9%
if -0.92000000000000004 < F < 1.4199999999999999Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.1%
associate-/l*99.1%
Simplified99.1%
if 1.4199999999999999 < F Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/69.3%
associate-*r/69.3%
*-commutative69.3%
Simplified69.4%
clear-num69.5%
inv-pow69.5%
fma-def69.5%
fma-udef69.5%
*-commutative69.5%
fma-def69.5%
fma-def69.5%
Applied egg-rr69.5%
Taylor expanded in F around inf 99.8%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.92)
(- (/ F (* (sin B) (- (/ (- -1.0 x) F) F))) t_0)
(if (<= F 1.42)
(- (/ (/ F (sqrt 2.0)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.92) {
tmp = (F / (sin(B) * (((-1.0 - x) / F) - F))) - t_0;
} else if (F <= 1.42) {
tmp = ((F / sqrt(2.0)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.92d0)) then
tmp = (f / (sin(b) * ((((-1.0d0) - x) / f) - f))) - t_0
else if (f <= 1.42d0) then
tmp = ((f / sqrt(2.0d0)) / sin(b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.92) {
tmp = (F / (Math.sin(B) * (((-1.0 - x) / F) - F))) - t_0;
} else if (F <= 1.42) {
tmp = ((F / Math.sqrt(2.0)) / Math.sin(B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.92: tmp = (F / (math.sin(B) * (((-1.0 - x) / F) - F))) - t_0 elif F <= 1.42: tmp = ((F / math.sqrt(2.0)) / math.sin(B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.92) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(Float64(-1.0 - x) / F) - F))) - t_0); elseif (F <= 1.42) tmp = Float64(Float64(Float64(F / sqrt(2.0)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.92) tmp = (F / (sin(B) * (((-1.0 - x) / F) - F))) - t_0; elseif (F <= 1.42) tmp = ((F / sqrt(2.0)) / sin(B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.92], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(N[(F / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.92:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1 - x}{F} - F\right)} - t_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.92000000000000004Initial program 62.2%
+-commutative62.2%
unsub-neg62.2%
associate-*l/75.8%
associate-*r/75.7%
*-commutative75.7%
Simplified75.8%
clear-num75.7%
inv-pow75.7%
fma-def75.7%
fma-udef75.7%
*-commutative75.7%
fma-def75.7%
fma-def75.7%
Applied egg-rr75.7%
expm1-log1p-u55.0%
expm1-udef55.0%
Applied egg-rr55.0%
expm1-def55.0%
expm1-log1p75.7%
associate-*r/75.8%
*-rgt-identity75.8%
*-commutative75.8%
fma-udef75.8%
fma-udef75.8%
unpow275.8%
+-commutative75.8%
associate-+r+75.8%
+-commutative75.8%
+-commutative75.8%
unpow275.8%
fma-def75.8%
+-commutative75.8%
fma-def75.8%
Simplified75.8%
Taylor expanded in F around -inf 97.9%
mul-1-neg97.9%
unsub-neg97.9%
associate-*r/97.9%
distribute-lft-in97.9%
metadata-eval97.9%
associate-*r*97.9%
metadata-eval97.9%
neg-mul-197.9%
sub-neg97.9%
Simplified97.9%
if -0.92000000000000004 < F < 1.4199999999999999Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
expm1-log1p-u85.0%
expm1-udef66.6%
fma-def66.6%
sqrt-div66.6%
metadata-eval66.6%
fma-def66.6%
Applied egg-rr66.6%
expm1-def85.0%
expm1-log1p99.6%
associate-*r/99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 99.1%
if 1.4199999999999999 < F Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/69.3%
associate-*r/69.3%
*-commutative69.3%
Simplified69.4%
clear-num69.5%
inv-pow69.5%
fma-def69.5%
fma-udef69.5%
*-commutative69.5%
fma-def69.5%
fma-def69.5%
Applied egg-rr69.5%
Taylor expanded in F around inf 99.8%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2000000.0)
(- (/ F (* (sin B) (- (/ (- -1.0 x) F) F))) t_0)
(if (<= F -1.25e-169)
(-
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (* F (/ 1.0 (sin B))))
(/ x B))
(if (<= F 0.0023)
(- (/ (sqrt 0.5) (/ B F)) t_0)
(- (/ (/ F (+ 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 <= -2000000.0) {
tmp = (F / (sin(B) * (((-1.0 - x) / F) - F))) - t_0;
} else if (F <= -1.25e-169) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F * (1.0 / sin(B)))) - (x / B);
} else if (F <= 0.0023) {
tmp = (sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (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 <= (-2000000.0d0)) then
tmp = (f / (sin(b) * ((((-1.0d0) - x) / f) - f))) - t_0
else if (f <= (-1.25d-169)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f * (1.0d0 / sin(b)))) - (x / b)
else if (f <= 0.0023d0) then
tmp = (sqrt(0.5d0) / (b / f)) - t_0
else
tmp = ((f / (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 <= -2000000.0) {
tmp = (F / (Math.sin(B) * (((-1.0 - x) / F) - F))) - t_0;
} else if (F <= -1.25e-169) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F * (1.0 / Math.sin(B)))) - (x / B);
} else if (F <= 0.0023) {
tmp = (Math.sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (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 <= -2000000.0: tmp = (F / (math.sin(B) * (((-1.0 - x) / F) - F))) - t_0 elif F <= -1.25e-169: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F * (1.0 / math.sin(B)))) - (x / B) elif F <= 0.0023: tmp = (math.sqrt(0.5) / (B / F)) - t_0 else: tmp = ((F / (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 <= -2000000.0) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(Float64(-1.0 - x) / F) - F))) - t_0); elseif (F <= -1.25e-169) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F * Float64(1.0 / sin(B)))) - Float64(x / B)); elseif (F <= 0.0023) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + 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 <= -2000000.0) tmp = (F / (sin(B) * (((-1.0 - x) / F) - F))) - t_0; elseif (F <= -1.25e-169) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F * (1.0 / sin(B)))) - (x / B); elseif (F <= 0.0023) tmp = (sqrt(0.5) / (B / F)) - t_0; else tmp = ((F / (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, -2000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.25e-169], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F * N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0023], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -2000000:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1 - x}{F} - F\right)} - t_0\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-169}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(F \cdot \frac{1}{\sin B}\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.0023:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2e6Initial program 60.3%
+-commutative60.3%
unsub-neg60.3%
associate-*l/74.5%
associate-*r/74.5%
*-commutative74.5%
Simplified74.5%
clear-num74.5%
inv-pow74.5%
fma-def74.5%
fma-udef74.5%
*-commutative74.5%
fma-def74.5%
fma-def74.5%
Applied egg-rr74.5%
expm1-log1p-u56.1%
expm1-udef56.1%
Applied egg-rr56.1%
expm1-def56.1%
expm1-log1p74.5%
associate-*r/74.5%
*-rgt-identity74.5%
*-commutative74.5%
fma-udef74.5%
fma-udef74.5%
unpow274.5%
+-commutative74.5%
associate-+r+74.5%
+-commutative74.5%
+-commutative74.5%
unpow274.5%
fma-def74.5%
+-commutative74.5%
fma-def74.5%
Simplified74.5%
Taylor expanded in F around -inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
associate-*r/99.7%
distribute-lft-in99.7%
metadata-eval99.7%
associate-*r*99.7%
metadata-eval99.7%
neg-mul-199.7%
sub-neg99.7%
Simplified99.7%
if -2e6 < F < -1.2500000000000001e-169Initial program 99.0%
clear-num99.1%
associate-/r/99.1%
Applied egg-rr99.1%
Taylor expanded in B around 0 81.2%
if -1.2500000000000001e-169 < F < 0.0023Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 90.3%
associate-/l*90.3%
Simplified90.3%
if 0.0023 < F Initial program 55.0%
+-commutative55.0%
unsub-neg55.0%
associate-*l/70.2%
associate-*r/70.2%
*-commutative70.2%
Simplified70.3%
Taylor expanded in x around 0 70.3%
associate-*l/70.3%
*-lft-identity70.3%
unpow270.3%
fma-udef70.3%
Simplified70.3%
expm1-log1p-u40.8%
expm1-udef40.7%
fma-def40.7%
sqrt-div40.7%
metadata-eval40.7%
fma-def40.7%
Applied egg-rr40.7%
expm1-def40.8%
expm1-log1p70.3%
associate-*r/70.3%
associate-*r/70.3%
*-rgt-identity70.3%
Simplified70.3%
Taylor expanded in F around inf 98.6%
Final simplification93.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -500000.0)
(- (/ F (* (sin B) (- (/ (- -1.0 x) F) F))) t_0)
(if (<= F -1.25e-169)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 0.0023)
(- (/ (sqrt 0.5) (/ B F)) t_0)
(- (/ (/ F (+ 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 <= -500000.0) {
tmp = (F / (sin(B) * (((-1.0 - x) / F) - F))) - t_0;
} else if (F <= -1.25e-169) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.0023) {
tmp = (sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (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 <= (-500000.0d0)) then
tmp = (f / (sin(b) * ((((-1.0d0) - x) / f) - f))) - t_0
else if (f <= (-1.25d-169)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 0.0023d0) then
tmp = (sqrt(0.5d0) / (b / f)) - t_0
else
tmp = ((f / (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 <= -500000.0) {
tmp = (F / (Math.sin(B) * (((-1.0 - x) / F) - F))) - t_0;
} else if (F <= -1.25e-169) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.0023) {
tmp = (Math.sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (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 <= -500000.0: tmp = (F / (math.sin(B) * (((-1.0 - x) / F) - F))) - t_0 elif F <= -1.25e-169: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 0.0023: tmp = (math.sqrt(0.5) / (B / F)) - t_0 else: tmp = ((F / (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 <= -500000.0) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(Float64(-1.0 - x) / F) - F))) - t_0); elseif (F <= -1.25e-169) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 0.0023) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + 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 <= -500000.0) tmp = (F / (sin(B) * (((-1.0 - x) / F) - F))) - t_0; elseif (F <= -1.25e-169) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 0.0023) tmp = (sqrt(0.5) / (B / F)) - t_0; else tmp = ((F / (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, -500000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.25e-169], 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] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0023], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -500000:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1 - x}{F} - F\right)} - t_0\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-169}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.0023:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -5e5Initial program 60.3%
+-commutative60.3%
unsub-neg60.3%
associate-*l/74.5%
associate-*r/74.5%
*-commutative74.5%
Simplified74.5%
clear-num74.5%
inv-pow74.5%
fma-def74.5%
fma-udef74.5%
*-commutative74.5%
fma-def74.5%
fma-def74.5%
Applied egg-rr74.5%
expm1-log1p-u56.1%
expm1-udef56.1%
Applied egg-rr56.1%
expm1-def56.1%
expm1-log1p74.5%
associate-*r/74.5%
*-rgt-identity74.5%
*-commutative74.5%
fma-udef74.5%
fma-udef74.5%
unpow274.5%
+-commutative74.5%
associate-+r+74.5%
+-commutative74.5%
+-commutative74.5%
unpow274.5%
fma-def74.5%
+-commutative74.5%
fma-def74.5%
Simplified74.5%
Taylor expanded in F around -inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
associate-*r/99.7%
distribute-lft-in99.7%
metadata-eval99.7%
associate-*r*99.7%
metadata-eval99.7%
neg-mul-199.7%
sub-neg99.7%
Simplified99.7%
if -5e5 < F < -1.2500000000000001e-169Initial program 99.0%
Taylor expanded in B around 0 81.2%
if -1.2500000000000001e-169 < F < 0.0023Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 90.3%
associate-/l*90.3%
Simplified90.3%
if 0.0023 < F Initial program 55.0%
+-commutative55.0%
unsub-neg55.0%
associate-*l/70.2%
associate-*r/70.2%
*-commutative70.2%
Simplified70.3%
Taylor expanded in x around 0 70.3%
associate-*l/70.3%
*-lft-identity70.3%
unpow270.3%
fma-udef70.3%
Simplified70.3%
expm1-log1p-u40.8%
expm1-udef40.7%
fma-def40.7%
sqrt-div40.7%
metadata-eval40.7%
fma-def40.7%
Applied egg-rr40.7%
expm1-def40.8%
expm1-log1p70.3%
associate-*r/70.3%
associate-*r/70.3%
*-rgt-identity70.3%
Simplified70.3%
Taylor expanded in F around inf 98.6%
Final simplification93.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.6e-10)
(- (/ F (* (sin B) (- (/ (- -1.0 x) F) F))) t_0)
(if (<= F -1.25e-169)
(- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 0.00215)
(- (/ (sqrt 0.5) (/ B F)) t_0)
(- (/ (/ F (+ 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 <= -3.6e-10) {
tmp = (F / (sin(B) * (((-1.0 - x) / F) - F))) - t_0;
} else if (F <= -1.25e-169) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 0.00215) {
tmp = (sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (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 <= (-3.6d-10)) then
tmp = (f / (sin(b) * ((((-1.0d0) - x) / f) - f))) - t_0
else if (f <= (-1.25d-169)) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 0.00215d0) then
tmp = (sqrt(0.5d0) / (b / f)) - t_0
else
tmp = ((f / (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 <= -3.6e-10) {
tmp = (F / (Math.sin(B) * (((-1.0 - x) / F) - F))) - t_0;
} else if (F <= -1.25e-169) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 0.00215) {
tmp = (Math.sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (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 <= -3.6e-10: tmp = (F / (math.sin(B) * (((-1.0 - x) / F) - F))) - t_0 elif F <= -1.25e-169: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) elif F <= 0.00215: tmp = (math.sqrt(0.5) / (B / F)) - t_0 else: tmp = ((F / (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 <= -3.6e-10) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(Float64(-1.0 - x) / F) - F))) - t_0); elseif (F <= -1.25e-169) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 0.00215) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + 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 <= -3.6e-10) tmp = (F / (sin(B) * (((-1.0 - x) / F) - F))) - t_0; elseif (F <= -1.25e-169) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); elseif (F <= 0.00215) tmp = (sqrt(0.5) / (B / F)) - t_0; else tmp = ((F / (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, -3.6e-10], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.25e-169], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00215], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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.6 \cdot 10^{-10}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1 - x}{F} - F\right)} - t_0\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-169}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.00215:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -3.6e-10Initial program 62.9%
+-commutative62.9%
unsub-neg62.9%
associate-*l/76.2%
associate-*r/76.1%
*-commutative76.1%
Simplified76.2%
clear-num76.1%
inv-pow76.1%
fma-def76.1%
fma-udef76.1%
*-commutative76.1%
fma-def76.1%
fma-def76.1%
Applied egg-rr76.1%
expm1-log1p-u55.7%
expm1-udef55.7%
Applied egg-rr55.7%
expm1-def55.7%
expm1-log1p76.1%
associate-*r/76.2%
*-rgt-identity76.2%
*-commutative76.2%
fma-udef76.2%
fma-udef76.2%
unpow276.2%
+-commutative76.2%
associate-+r+76.2%
+-commutative76.2%
+-commutative76.2%
unpow276.2%
fma-def76.2%
+-commutative76.2%
fma-def76.2%
Simplified76.2%
Taylor expanded in F around -inf 97.9%
mul-1-neg97.9%
unsub-neg97.9%
associate-*r/97.9%
distribute-lft-in97.9%
metadata-eval97.9%
associate-*r*97.9%
metadata-eval97.9%
neg-mul-197.9%
sub-neg97.9%
Simplified97.9%
if -3.6e-10 < F < -1.2500000000000001e-169Initial program 99.0%
Taylor expanded in B around 0 81.9%
Taylor expanded in F around 0 81.9%
if -1.2500000000000001e-169 < F < 0.00215Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 90.3%
associate-/l*90.3%
Simplified90.3%
if 0.00215 < F Initial program 55.0%
+-commutative55.0%
unsub-neg55.0%
associate-*l/70.2%
associate-*r/70.2%
*-commutative70.2%
Simplified70.3%
Taylor expanded in x around 0 70.3%
associate-*l/70.3%
*-lft-identity70.3%
unpow270.3%
fma-udef70.3%
Simplified70.3%
expm1-log1p-u40.8%
expm1-udef40.7%
fma-def40.7%
sqrt-div40.7%
metadata-eval40.7%
fma-def40.7%
Applied egg-rr40.7%
expm1-def40.8%
expm1-log1p70.3%
associate-*r/70.3%
associate-*r/70.3%
*-rgt-identity70.3%
Simplified70.3%
Taylor expanded in F around inf 98.6%
Final simplification93.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.0)
(- (/ (+ -1.0 (/ 1.0 (* F F))) (sin B)) t_0)
(if (<= F 0.0023)
(- (/ (sqrt 0.5) (/ B F)) t_0)
(- (/ (/ F (+ 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.0) {
tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0;
} else if (F <= 0.0023) {
tmp = (sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (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.0d0)) then
tmp = (((-1.0d0) + (1.0d0 / (f * f))) / sin(b)) - t_0
else if (f <= 0.0023d0) then
tmp = (sqrt(0.5d0) / (b / f)) - t_0
else
tmp = ((f / (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.0) {
tmp = ((-1.0 + (1.0 / (F * F))) / Math.sin(B)) - t_0;
} else if (F <= 0.0023) {
tmp = (Math.sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (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.0: tmp = ((-1.0 + (1.0 / (F * F))) / math.sin(B)) - t_0 elif F <= 0.0023: tmp = (math.sqrt(0.5) / (B / F)) - t_0 else: tmp = ((F / (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.0) tmp = Float64(Float64(Float64(-1.0 + Float64(1.0 / Float64(F * F))) / sin(B)) - t_0); elseif (F <= 0.0023) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + 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.0) tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0; elseif (F <= 0.0023) tmp = (sqrt(0.5) / (B / F)) - t_0; else tmp = ((F / (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.0], N[(N[(N[(-1.0 + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0023], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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:\\
\;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.0023:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1Initial program 62.2%
+-commutative62.2%
unsub-neg62.2%
associate-*l/75.8%
associate-*r/75.7%
*-commutative75.7%
Simplified75.8%
Taylor expanded in x around 0 75.4%
associate-*l/75.4%
*-lft-identity75.4%
unpow275.4%
fma-udef75.4%
Simplified75.4%
expm1-log1p-u51.3%
expm1-udef51.3%
fma-def51.3%
sqrt-div51.3%
metadata-eval51.3%
fma-def51.3%
Applied egg-rr51.3%
expm1-def51.3%
expm1-log1p75.5%
associate-*r/75.5%
associate-*r/75.5%
*-rgt-identity75.5%
Simplified75.5%
Taylor expanded in F around -inf 97.6%
sub-neg97.6%
unpow297.6%
metadata-eval97.6%
Simplified97.6%
if -1 < F < 0.0023Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 84.0%
associate-/l*84.1%
Simplified84.1%
if 0.0023 < F Initial program 55.0%
+-commutative55.0%
unsub-neg55.0%
associate-*l/70.2%
associate-*r/70.2%
*-commutative70.2%
Simplified70.3%
Taylor expanded in x around 0 70.3%
associate-*l/70.3%
*-lft-identity70.3%
unpow270.3%
fma-udef70.3%
Simplified70.3%
expm1-log1p-u40.8%
expm1-udef40.7%
fma-def40.7%
sqrt-div40.7%
metadata-eval40.7%
fma-def40.7%
Applied egg-rr40.7%
expm1-def40.8%
expm1-log1p70.3%
associate-*r/70.3%
associate-*r/70.3%
*-rgt-identity70.3%
Simplified70.3%
Taylor expanded in F around inf 98.6%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.2e-11)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.0023)
(- (/ (sqrt 0.5) (/ B F)) t_0)
(- (/ (/ F (+ 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.2e-11) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.0023) {
tmp = (sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (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 <= (-2.2d-11)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.0023d0) then
tmp = (sqrt(0.5d0) / (b / f)) - t_0
else
tmp = ((f / (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 <= -2.2e-11) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.0023) {
tmp = (Math.sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (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 <= -2.2e-11: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.0023: tmp = (math.sqrt(0.5) / (B / F)) - t_0 else: tmp = ((F / (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 <= -2.2e-11) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.0023) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + 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 <= -2.2e-11) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.0023) tmp = (sqrt(0.5) / (B / F)) - t_0; else tmp = ((F / (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, -2.2e-11], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0023], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.2 \cdot 10^{-11}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.0023:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.2000000000000002e-11Initial program 63.4%
+-commutative63.4%
unsub-neg63.4%
associate-*l/76.5%
associate-*r/76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in x around 0 76.2%
associate-*l/76.1%
*-lft-identity76.1%
unpow276.1%
fma-udef76.1%
Simplified76.1%
expm1-log1p-u52.9%
expm1-udef52.1%
fma-def52.1%
sqrt-div52.1%
metadata-eval52.1%
fma-def52.1%
Applied egg-rr52.1%
expm1-def52.9%
expm1-log1p76.2%
associate-*r/76.3%
associate-*r/76.3%
*-rgt-identity76.3%
Simplified76.3%
Taylor expanded in F around -inf 96.3%
neg-mul-196.3%
Simplified96.3%
if -2.2000000000000002e-11 < F < 0.0023Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 84.5%
associate-/l*84.6%
Simplified84.6%
if 0.0023 < F Initial program 55.0%
+-commutative55.0%
unsub-neg55.0%
associate-*l/70.2%
associate-*r/70.2%
*-commutative70.2%
Simplified70.3%
Taylor expanded in x around 0 70.3%
associate-*l/70.3%
*-lft-identity70.3%
unpow270.3%
fma-udef70.3%
Simplified70.3%
expm1-log1p-u40.8%
expm1-udef40.7%
fma-def40.7%
sqrt-div40.7%
metadata-eval40.7%
fma-def40.7%
Applied egg-rr40.7%
expm1-def40.8%
expm1-log1p70.3%
associate-*r/70.3%
associate-*r/70.3%
*-rgt-identity70.3%
Simplified70.3%
Taylor expanded in F around inf 98.6%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.2e-11)
(- (/ F (* (sin B) (- (/ (- -1.0 x) F) F))) t_0)
(if (<= F 0.002)
(- (/ (sqrt 0.5) (/ B F)) t_0)
(- (/ (/ F (+ 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.2e-11) {
tmp = (F / (sin(B) * (((-1.0 - x) / F) - F))) - t_0;
} else if (F <= 0.002) {
tmp = (sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (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 <= (-2.2d-11)) then
tmp = (f / (sin(b) * ((((-1.0d0) - x) / f) - f))) - t_0
else if (f <= 0.002d0) then
tmp = (sqrt(0.5d0) / (b / f)) - t_0
else
tmp = ((f / (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 <= -2.2e-11) {
tmp = (F / (Math.sin(B) * (((-1.0 - x) / F) - F))) - t_0;
} else if (F <= 0.002) {
tmp = (Math.sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (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 <= -2.2e-11: tmp = (F / (math.sin(B) * (((-1.0 - x) / F) - F))) - t_0 elif F <= 0.002: tmp = (math.sqrt(0.5) / (B / F)) - t_0 else: tmp = ((F / (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 <= -2.2e-11) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(Float64(-1.0 - x) / F) - F))) - t_0); elseif (F <= 0.002) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + 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 <= -2.2e-11) tmp = (F / (sin(B) * (((-1.0 - x) / F) - F))) - t_0; elseif (F <= 0.002) tmp = (sqrt(0.5) / (B / F)) - t_0; else tmp = ((F / (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, -2.2e-11], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.002], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.2 \cdot 10^{-11}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1 - x}{F} - F\right)} - t_0\\
\mathbf{elif}\;F \leq 0.002:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.2000000000000002e-11Initial program 63.4%
+-commutative63.4%
unsub-neg63.4%
associate-*l/76.5%
associate-*r/76.5%
*-commutative76.5%
Simplified76.5%
clear-num76.5%
inv-pow76.5%
fma-def76.5%
fma-udef76.5%
*-commutative76.5%
fma-def76.5%
fma-def76.5%
Applied egg-rr76.5%
expm1-log1p-u56.4%
expm1-udef55.6%
Applied egg-rr55.6%
expm1-def56.4%
expm1-log1p76.5%
associate-*r/76.6%
*-rgt-identity76.6%
*-commutative76.6%
fma-udef76.6%
fma-udef76.6%
unpow276.6%
+-commutative76.6%
associate-+r+76.6%
+-commutative76.6%
+-commutative76.6%
unpow276.6%
fma-def76.6%
+-commutative76.6%
fma-def76.6%
Simplified76.6%
Taylor expanded in F around -inf 96.5%
mul-1-neg96.5%
unsub-neg96.5%
associate-*r/96.5%
distribute-lft-in96.5%
metadata-eval96.5%
associate-*r*96.5%
metadata-eval96.5%
neg-mul-196.5%
sub-neg96.5%
Simplified96.5%
if -2.2000000000000002e-11 < F < 2e-3Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 84.5%
associate-/l*84.6%
Simplified84.6%
if 2e-3 < F Initial program 55.0%
+-commutative55.0%
unsub-neg55.0%
associate-*l/70.2%
associate-*r/70.2%
*-commutative70.2%
Simplified70.3%
Taylor expanded in x around 0 70.3%
associate-*l/70.3%
*-lft-identity70.3%
unpow270.3%
fma-udef70.3%
Simplified70.3%
expm1-log1p-u40.8%
expm1-udef40.7%
fma-def40.7%
sqrt-div40.7%
metadata-eval40.7%
fma-def40.7%
Applied egg-rr40.7%
expm1-def40.8%
expm1-log1p70.3%
associate-*r/70.3%
associate-*r/70.3%
*-rgt-identity70.3%
Simplified70.3%
Taylor expanded in F around inf 98.6%
Final simplification91.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.0)
(- (/ (+ -1.0 (/ 1.0 (* F F))) (sin B)) t_0)
(if (<= F 0.002)
(- (/ (sqrt 0.5) (/ B F)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.0) {
tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0;
} else if (F <= 0.002) {
tmp = (sqrt(0.5) / (B / F)) - 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.0d0)) then
tmp = (((-1.0d0) + (1.0d0 / (f * f))) / sin(b)) - t_0
else if (f <= 0.002d0) then
tmp = (sqrt(0.5d0) / (b / f)) - 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.0) {
tmp = ((-1.0 + (1.0 / (F * F))) / Math.sin(B)) - t_0;
} else if (F <= 0.002) {
tmp = (Math.sqrt(0.5) / (B / F)) - 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.0: tmp = ((-1.0 + (1.0 / (F * F))) / math.sin(B)) - t_0 elif F <= 0.002: tmp = (math.sqrt(0.5) / (B / F)) - 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.0) tmp = Float64(Float64(Float64(-1.0 + Float64(1.0 / Float64(F * F))) / sin(B)) - t_0); elseif (F <= 0.002) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - 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.0) tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0; elseif (F <= 0.002) tmp = (sqrt(0.5) / (B / F)) - 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.0], N[(N[(N[(-1.0 + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.002], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1:\\
\;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.002:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1Initial program 62.2%
+-commutative62.2%
unsub-neg62.2%
associate-*l/75.8%
associate-*r/75.7%
*-commutative75.7%
Simplified75.8%
Taylor expanded in x around 0 75.4%
associate-*l/75.4%
*-lft-identity75.4%
unpow275.4%
fma-udef75.4%
Simplified75.4%
expm1-log1p-u51.3%
expm1-udef51.3%
fma-def51.3%
sqrt-div51.3%
metadata-eval51.3%
fma-def51.3%
Applied egg-rr51.3%
expm1-def51.3%
expm1-log1p75.5%
associate-*r/75.5%
associate-*r/75.5%
*-rgt-identity75.5%
Simplified75.5%
Taylor expanded in F around -inf 97.6%
sub-neg97.6%
unpow297.6%
metadata-eval97.6%
Simplified97.6%
if -1 < F < 2e-3Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 84.0%
associate-/l*84.1%
Simplified84.1%
if 2e-3 < F Initial program 55.0%
+-commutative55.0%
unsub-neg55.0%
associate-*l/70.2%
associate-*r/70.2%
*-commutative70.2%
Simplified70.3%
clear-num70.3%
inv-pow70.3%
fma-def70.3%
fma-udef70.3%
*-commutative70.3%
fma-def70.3%
fma-def70.3%
Applied egg-rr70.3%
Taylor expanded in F around inf 98.6%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -1.9e+254)
t_1
(if (<= F -1.55e+119)
(- (/ -1.0 B) t_0)
(if (<= F -2.35e-6)
t_1
(if (<= F 3e-155)
(- (/ (cos B) (/ (sin B) x)))
(if (<= F 7e-66)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 3.5e+220)
(- (/ 1.0 B) t_0)
(- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -1.9e+254) {
tmp = t_1;
} else if (F <= -1.55e+119) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -2.35e-6) {
tmp = t_1;
} else if (F <= 3e-155) {
tmp = -(cos(B) / (sin(B) / x));
} else if (F <= 7e-66) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 3.5e+220) {
tmp = (1.0 / B) - t_0;
} 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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-1.9d+254)) then
tmp = t_1
else if (f <= (-1.55d+119)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-2.35d-6)) then
tmp = t_1
else if (f <= 3d-155) then
tmp = -(cos(b) / (sin(b) / x))
else if (f <= 7d-66) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 3.5d+220) then
tmp = (1.0d0 / b) - t_0
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 t_0 = x / Math.tan(B);
double t_1 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -1.9e+254) {
tmp = t_1;
} else if (F <= -1.55e+119) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -2.35e-6) {
tmp = t_1;
} else if (F <= 3e-155) {
tmp = -(Math.cos(B) / (Math.sin(B) / x));
} else if (F <= 7e-66) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 3.5e+220) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -1.9e+254: tmp = t_1 elif F <= -1.55e+119: tmp = (-1.0 / B) - t_0 elif F <= -2.35e-6: tmp = t_1 elif F <= 3e-155: tmp = -(math.cos(B) / (math.sin(B) / x)) elif F <= 7e-66: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 3.5e+220: tmp = (1.0 / B) - t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -1.9e+254) tmp = t_1; elseif (F <= -1.55e+119) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -2.35e-6) tmp = t_1; elseif (F <= 3e-155) tmp = Float64(-Float64(cos(B) / Float64(sin(B) / x))); elseif (F <= 7e-66) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 3.5e+220) tmp = Float64(Float64(1.0 / B) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -1.9e+254) tmp = t_1; elseif (F <= -1.55e+119) tmp = (-1.0 / B) - t_0; elseif (F <= -2.35e-6) tmp = t_1; elseif (F <= 3e-155) tmp = -(cos(B) / (sin(B) / x)); elseif (F <= 7e-66) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 3.5e+220) tmp = (1.0 / B) - t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.9e+254], t$95$1, If[LessEqual[F, -1.55e+119], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.35e-6], t$95$1, If[LessEqual[F, 3e-155], (-N[(N[Cos[B], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 7e-66], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.5e+220], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -1.9 \cdot 10^{+254}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{+119}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -2.35 \cdot 10^{-6}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-155}:\\
\;\;\;\;-\frac{\cos B}{\frac{\sin B}{x}}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-66}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{+220}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.90000000000000001e254 or -1.54999999999999998e119 < F < -2.34999999999999995e-6Initial program 60.3%
Taylor expanded in F around -inf 96.0%
Taylor expanded in B around 0 91.7%
if -1.90000000000000001e254 < F < -1.54999999999999998e119Initial program 66.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 94.3%
+-commutative94.3%
div-inv94.4%
unsub-neg94.4%
Applied egg-rr94.4%
if -2.34999999999999995e-6 < F < 2.99999999999999984e-155Initial program 99.3%
Taylor expanded in F around -inf 42.8%
Taylor expanded in x around inf 75.3%
mul-1-neg75.3%
associate-/l*75.2%
Simplified75.2%
if 2.99999999999999984e-155 < F < 7.0000000000000001e-66Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.6%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in x around 0 99.7%
associate-*l/99.8%
*-lft-identity99.8%
unpow299.8%
fma-udef99.8%
Simplified99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 80.5%
if 7.0000000000000001e-66 < F < 3.49999999999999986e220Initial program 72.8%
+-commutative72.8%
unsub-neg72.8%
associate-*l/86.8%
associate-*r/86.8%
*-commutative86.8%
Simplified86.9%
clear-num86.9%
inv-pow86.9%
fma-def86.9%
fma-udef86.9%
*-commutative86.9%
fma-def86.9%
fma-def86.9%
Applied egg-rr86.9%
Taylor expanded in F around inf 90.6%
Taylor expanded in B around 0 77.5%
if 3.49999999999999986e220 < F Initial program 8.7%
Taylor expanded in B around 0 1.2%
Taylor expanded in F around inf 93.7%
Final simplification81.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -1.45e+252)
t_1
(if (<= F -6.6e+120)
(- (/ -1.0 B) t_0)
(if (<= F -1.15)
t_1
(if (<= F 4.3e-157)
(/ (* (cos B) (- x)) (sin B))
(if (<= F 1.7e-66)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 1.7e+217)
(- (/ 1.0 B) t_0)
(- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -1.45e+252) {
tmp = t_1;
} else if (F <= -6.6e+120) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -1.15) {
tmp = t_1;
} else if (F <= 4.3e-157) {
tmp = (cos(B) * -x) / sin(B);
} else if (F <= 1.7e-66) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 1.7e+217) {
tmp = (1.0 / B) - t_0;
} 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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-1.45d+252)) then
tmp = t_1
else if (f <= (-6.6d+120)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-1.15d0)) then
tmp = t_1
else if (f <= 4.3d-157) then
tmp = (cos(b) * -x) / sin(b)
else if (f <= 1.7d-66) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 1.7d+217) then
tmp = (1.0d0 / b) - t_0
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 t_0 = x / Math.tan(B);
double t_1 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -1.45e+252) {
tmp = t_1;
} else if (F <= -6.6e+120) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -1.15) {
tmp = t_1;
} else if (F <= 4.3e-157) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else if (F <= 1.7e-66) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 1.7e+217) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -1.45e+252: tmp = t_1 elif F <= -6.6e+120: tmp = (-1.0 / B) - t_0 elif F <= -1.15: tmp = t_1 elif F <= 4.3e-157: tmp = (math.cos(B) * -x) / math.sin(B) elif F <= 1.7e-66: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 1.7e+217: tmp = (1.0 / B) - t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -1.45e+252) tmp = t_1; elseif (F <= -6.6e+120) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -1.15) tmp = t_1; elseif (F <= 4.3e-157) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); elseif (F <= 1.7e-66) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 1.7e+217) tmp = Float64(Float64(1.0 / B) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -1.45e+252) tmp = t_1; elseif (F <= -6.6e+120) tmp = (-1.0 / B) - t_0; elseif (F <= -1.15) tmp = t_1; elseif (F <= 4.3e-157) tmp = (cos(B) * -x) / sin(B); elseif (F <= 1.7e-66) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 1.7e+217) tmp = (1.0 / B) - t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45e+252], t$95$1, If[LessEqual[F, -6.6e+120], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.15], t$95$1, If[LessEqual[F, 4.3e-157], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-66], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.7e+217], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -1.45 \cdot 10^{+252}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -6.6 \cdot 10^{+120}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -1.15:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{-157}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-66}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{+217}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.44999999999999998e252 or -6.59999999999999981e120 < F < -1.1499999999999999Initial program 60.3%
Taylor expanded in F around -inf 96.0%
Taylor expanded in B around 0 91.7%
if -1.44999999999999998e252 < F < -6.59999999999999981e120Initial program 66.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 94.3%
+-commutative94.3%
div-inv94.4%
unsub-neg94.4%
Applied egg-rr94.4%
if -1.1499999999999999 < F < 4.2999999999999998e-157Initial program 99.3%
Taylor expanded in F around -inf 42.8%
Taylor expanded in x around inf 75.3%
associate-*r/75.3%
mul-1-neg75.3%
*-commutative75.3%
Simplified75.3%
if 4.2999999999999998e-157 < F < 1.69999999999999999e-66Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.6%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in x around 0 99.7%
associate-*l/99.8%
*-lft-identity99.8%
unpow299.8%
fma-udef99.8%
Simplified99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 80.5%
if 1.69999999999999999e-66 < F < 1.6999999999999999e217Initial program 72.8%
+-commutative72.8%
unsub-neg72.8%
associate-*l/86.8%
associate-*r/86.8%
*-commutative86.8%
Simplified86.9%
clear-num86.9%
inv-pow86.9%
fma-def86.9%
fma-udef86.9%
*-commutative86.9%
fma-def86.9%
fma-def86.9%
Applied egg-rr86.9%
Taylor expanded in F around inf 90.6%
Taylor expanded in B around 0 77.5%
if 1.6999999999999999e217 < F Initial program 8.7%
Taylor expanded in B around 0 1.2%
Taylor expanded in F around inf 93.7%
Final simplification81.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.32e-47)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.9e-155)
(/ (* (cos B) (- x)) (sin B))
(if (<= F 1.85e-65)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.32e-47) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.9e-155) {
tmp = (cos(B) * -x) / sin(B);
} else if (F <= 1.85e-65) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.32d-47)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.9d-155) then
tmp = (cos(b) * -x) / sin(b)
else if (f <= 1.85d-65) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.32e-47) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.9e-155) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else if (F <= 1.85e-65) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.32e-47: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.9e-155: tmp = (math.cos(B) * -x) / math.sin(B) elif F <= 1.85e-65: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.32e-47) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.9e-155) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); elseif (F <= 1.85e-65) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - 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 <= -1.32e-47) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.9e-155) tmp = (cos(B) * -x) / sin(B); elseif (F <= 1.85e-65) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.32e-47], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.9e-155], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.85e-65], N[(N[(N[(F * N[Sqrt[0.5], $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 -1.32 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-155}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{-65}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.32e-47Initial program 65.6%
+-commutative65.6%
unsub-neg65.6%
associate-*l/77.9%
associate-*r/77.8%
*-commutative77.8%
Simplified77.9%
clear-num77.9%
inv-pow77.9%
fma-def77.9%
fma-udef77.9%
*-commutative77.9%
fma-def77.9%
fma-def77.9%
Applied egg-rr77.9%
Taylor expanded in F around -inf 90.6%
if -1.32e-47 < F < 2.9000000000000001e-155Initial program 99.4%
Taylor expanded in F around -inf 44.0%
Taylor expanded in x around inf 79.2%
associate-*r/79.2%
mul-1-neg79.2%
*-commutative79.2%
Simplified79.2%
if 2.9000000000000001e-155 < F < 1.85e-65Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.6%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in x around 0 99.7%
associate-*l/99.8%
*-lft-identity99.8%
unpow299.8%
fma-udef99.8%
Simplified99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 80.5%
if 1.85e-65 < F Initial program 61.3%
+-commutative61.3%
unsub-neg61.3%
associate-*l/74.4%
associate-*r/74.3%
*-commutative74.3%
Simplified74.5%
clear-num74.5%
inv-pow74.5%
fma-def74.5%
fma-udef74.5%
*-commutative74.5%
fma-def74.5%
fma-def74.5%
Applied egg-rr74.5%
Taylor expanded in F around inf 92.2%
Final simplification86.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.2e-11)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.00092)
(- (* 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 <= -2.2e-11) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.00092) {
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 <= (-2.2d-11)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.00092d0) 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 <= -2.2e-11) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.00092) {
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 <= -2.2e-11: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.00092: 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 <= -2.2e-11) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.00092) 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 <= -2.2e-11) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.00092) 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, -2.2e-11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.00092], 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 -2.2 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.00092:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.2000000000000002e-11Initial program 63.4%
+-commutative63.4%
unsub-neg63.4%
associate-*l/76.5%
associate-*r/76.5%
*-commutative76.5%
Simplified76.5%
clear-num76.5%
inv-pow76.5%
fma-def76.5%
fma-udef76.5%
*-commutative76.5%
fma-def76.5%
fma-def76.5%
Applied egg-rr76.5%
Taylor expanded in F around -inf 95.8%
if -2.2000000000000002e-11 < F < 9.2000000000000003e-4Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 84.5%
if 9.2000000000000003e-4 < F Initial program 55.0%
+-commutative55.0%
unsub-neg55.0%
associate-*l/70.2%
associate-*r/70.2%
*-commutative70.2%
Simplified70.3%
clear-num70.3%
inv-pow70.3%
fma-def70.3%
fma-udef70.3%
*-commutative70.3%
fma-def70.3%
fma-def70.3%
Applied egg-rr70.3%
Taylor expanded in F around inf 98.6%
Final simplification91.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.2e-11)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.0023)
(- (/ (sqrt 0.5) (/ B F)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.2e-11) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.0023) {
tmp = (sqrt(0.5) / (B / F)) - 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 <= (-2.2d-11)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.0023d0) then
tmp = (sqrt(0.5d0) / (b / f)) - 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 <= -2.2e-11) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.0023) {
tmp = (Math.sqrt(0.5) / (B / F)) - 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 <= -2.2e-11: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.0023: tmp = (math.sqrt(0.5) / (B / F)) - 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 <= -2.2e-11) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.0023) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - 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 <= -2.2e-11) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.0023) tmp = (sqrt(0.5) / (B / F)) - 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, -2.2e-11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0023], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.2 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.0023:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.2000000000000002e-11Initial program 63.4%
+-commutative63.4%
unsub-neg63.4%
associate-*l/76.5%
associate-*r/76.5%
*-commutative76.5%
Simplified76.5%
clear-num76.5%
inv-pow76.5%
fma-def76.5%
fma-udef76.5%
*-commutative76.5%
fma-def76.5%
fma-def76.5%
Applied egg-rr76.5%
Taylor expanded in F around -inf 95.8%
if -2.2000000000000002e-11 < F < 0.0023Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 84.5%
associate-/l*84.6%
Simplified84.6%
if 0.0023 < F Initial program 55.0%
+-commutative55.0%
unsub-neg55.0%
associate-*l/70.2%
associate-*r/70.2%
*-commutative70.2%
Simplified70.3%
clear-num70.3%
inv-pow70.3%
fma-def70.3%
fma-udef70.3%
*-commutative70.3%
fma-def70.3%
fma-def70.3%
Applied egg-rr70.3%
Taylor expanded in F around inf 98.6%
Final simplification91.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.15e-47)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.2e-155)
(/ (* (cos B) (- x)) (sin B))
(if (<= F 3.7e-66)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 7.2e+216)
(- (/ 1.0 B) t_0)
(- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.15e-47) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.2e-155) {
tmp = (cos(B) * -x) / sin(B);
} else if (F <= 3.7e-66) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 7.2e+216) {
tmp = (1.0 / B) - t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.15d-47)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.2d-155) then
tmp = (cos(b) * -x) / sin(b)
else if (f <= 3.7d-66) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 7.2d+216) then
tmp = (1.0d0 / b) - t_0
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 t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.15e-47) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.2e-155) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else if (F <= 3.7e-66) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 7.2e+216) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.15e-47: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.2e-155: tmp = (math.cos(B) * -x) / math.sin(B) elif F <= 3.7e-66: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 7.2e+216: tmp = (1.0 / B) - t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.15e-47) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.2e-155) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); elseif (F <= 3.7e-66) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 7.2e+216) tmp = Float64(Float64(1.0 / B) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.15e-47) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.2e-155) tmp = (cos(B) * -x) / sin(B); elseif (F <= 3.7e-66) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 7.2e+216) tmp = (1.0 / B) - t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.15e-47], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.2e-155], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.7e-66], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.2e+216], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.15 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-155}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{-66}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{+216}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.14999999999999991e-47Initial program 65.6%
+-commutative65.6%
unsub-neg65.6%
associate-*l/77.9%
associate-*r/77.8%
*-commutative77.8%
Simplified77.9%
clear-num77.9%
inv-pow77.9%
fma-def77.9%
fma-udef77.9%
*-commutative77.9%
fma-def77.9%
fma-def77.9%
Applied egg-rr77.9%
Taylor expanded in F around -inf 90.6%
if -1.14999999999999991e-47 < F < 1.2e-155Initial program 99.4%
Taylor expanded in F around -inf 44.0%
Taylor expanded in x around inf 79.2%
associate-*r/79.2%
mul-1-neg79.2%
*-commutative79.2%
Simplified79.2%
if 1.2e-155 < F < 3.7000000000000002e-66Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.6%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in x around 0 99.7%
associate-*l/99.8%
*-lft-identity99.8%
unpow299.8%
fma-udef99.8%
Simplified99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 80.5%
if 3.7000000000000002e-66 < F < 7.2000000000000004e216Initial program 72.8%
+-commutative72.8%
unsub-neg72.8%
associate-*l/86.8%
associate-*r/86.8%
*-commutative86.8%
Simplified86.9%
clear-num86.9%
inv-pow86.9%
fma-def86.9%
fma-udef86.9%
*-commutative86.9%
fma-def86.9%
fma-def86.9%
Applied egg-rr86.9%
Taylor expanded in F around inf 90.6%
Taylor expanded in B around 0 77.5%
if 7.2000000000000004e216 < F Initial program 8.7%
Taylor expanded in B around 0 1.2%
Taylor expanded in F around inf 93.7%
Final simplification82.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -4.2e+254)
t_1
(if (<= F -1.4e+119)
(- (/ -1.0 B) t_0)
(if (<= F -0.00375)
t_1
(if (<= F 7.5e-156)
(+ (* x (/ -1.0 (tan B))) (* (/ 1.0 F) (/ F B)))
(if (<= F 2.1e-65)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 7.2e+215)
(- (/ 1.0 B) t_0)
(- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -4.2e+254) {
tmp = t_1;
} else if (F <= -1.4e+119) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -0.00375) {
tmp = t_1;
} else if (F <= 7.5e-156) {
tmp = (x * (-1.0 / tan(B))) + ((1.0 / F) * (F / B));
} else if (F <= 2.1e-65) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 7.2e+215) {
tmp = (1.0 / B) - t_0;
} 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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-4.2d+254)) then
tmp = t_1
else if (f <= (-1.4d+119)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-0.00375d0)) then
tmp = t_1
else if (f <= 7.5d-156) then
tmp = (x * ((-1.0d0) / tan(b))) + ((1.0d0 / f) * (f / b))
else if (f <= 2.1d-65) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 7.2d+215) then
tmp = (1.0d0 / b) - t_0
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 t_0 = x / Math.tan(B);
double t_1 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -4.2e+254) {
tmp = t_1;
} else if (F <= -1.4e+119) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -0.00375) {
tmp = t_1;
} else if (F <= 7.5e-156) {
tmp = (x * (-1.0 / Math.tan(B))) + ((1.0 / F) * (F / B));
} else if (F <= 2.1e-65) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 7.2e+215) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -4.2e+254: tmp = t_1 elif F <= -1.4e+119: tmp = (-1.0 / B) - t_0 elif F <= -0.00375: tmp = t_1 elif F <= 7.5e-156: tmp = (x * (-1.0 / math.tan(B))) + ((1.0 / F) * (F / B)) elif F <= 2.1e-65: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 7.2e+215: tmp = (1.0 / B) - t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -4.2e+254) tmp = t_1; elseif (F <= -1.4e+119) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -0.00375) tmp = t_1; elseif (F <= 7.5e-156) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(1.0 / F) * Float64(F / B))); elseif (F <= 2.1e-65) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 7.2e+215) tmp = Float64(Float64(1.0 / B) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -4.2e+254) tmp = t_1; elseif (F <= -1.4e+119) tmp = (-1.0 / B) - t_0; elseif (F <= -0.00375) tmp = t_1; elseif (F <= 7.5e-156) tmp = (x * (-1.0 / tan(B))) + ((1.0 / F) * (F / B)); elseif (F <= 2.1e-65) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 7.2e+215) tmp = (1.0 / B) - t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.2e+254], t$95$1, If[LessEqual[F, -1.4e+119], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -0.00375], t$95$1, If[LessEqual[F, 7.5e-156], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / F), $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.1e-65], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.2e+215], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -4.2 \cdot 10^{+254}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -1.4 \cdot 10^{+119}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -0.00375:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-156}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{F} \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-65}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{+215}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.2e254 or -1.40000000000000007e119 < F < -0.0037499999999999999Initial program 60.3%
Taylor expanded in F around -inf 96.0%
Taylor expanded in B around 0 91.7%
if -4.2e254 < F < -1.40000000000000007e119Initial program 66.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 94.3%
+-commutative94.3%
div-inv94.4%
unsub-neg94.4%
Applied egg-rr94.4%
if -0.0037499999999999999 < F < 7.49999999999999959e-156Initial program 99.3%
Taylor expanded in F around inf 41.8%
Taylor expanded in B around 0 57.3%
if 7.49999999999999959e-156 < F < 2.10000000000000003e-65Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.6%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in x around 0 99.7%
associate-*l/99.8%
*-lft-identity99.8%
unpow299.8%
fma-udef99.8%
Simplified99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 80.5%
if 2.10000000000000003e-65 < F < 7.19999999999999948e215Initial program 72.8%
+-commutative72.8%
unsub-neg72.8%
associate-*l/86.8%
associate-*r/86.8%
*-commutative86.8%
Simplified86.9%
clear-num86.9%
inv-pow86.9%
fma-def86.9%
fma-udef86.9%
*-commutative86.9%
fma-def86.9%
fma-def86.9%
Applied egg-rr86.9%
Taylor expanded in F around inf 90.6%
Taylor expanded in B around 0 77.5%
if 7.19999999999999948e215 < F Initial program 8.7%
Taylor expanded in B around 0 1.2%
Taylor expanded in F around inf 93.7%
Final simplification74.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B)))
(t_1 (- (/ -1.0 B) t_0))
(t_2 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -1.2e+252)
t_2
(if (<= F -2.1e+120)
t_1
(if (<= F -76000000.0)
t_2
(if (<= F 8.8e-158)
t_1
(if (<= F 1.5e-65)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 6e+223)
(- (/ 1.0 B) t_0)
(- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (-1.0 / B) - t_0;
double t_2 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -1.2e+252) {
tmp = t_2;
} else if (F <= -2.1e+120) {
tmp = t_1;
} else if (F <= -76000000.0) {
tmp = t_2;
} else if (F <= 8.8e-158) {
tmp = t_1;
} else if (F <= 1.5e-65) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 6e+223) {
tmp = (1.0 / B) - t_0;
} 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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((-1.0d0) / b) - t_0
t_2 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-1.2d+252)) then
tmp = t_2
else if (f <= (-2.1d+120)) then
tmp = t_1
else if (f <= (-76000000.0d0)) then
tmp = t_2
else if (f <= 8.8d-158) then
tmp = t_1
else if (f <= 1.5d-65) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 6d+223) then
tmp = (1.0d0 / b) - t_0
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 t_0 = x / Math.tan(B);
double t_1 = (-1.0 / B) - t_0;
double t_2 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -1.2e+252) {
tmp = t_2;
} else if (F <= -2.1e+120) {
tmp = t_1;
} else if (F <= -76000000.0) {
tmp = t_2;
} else if (F <= 8.8e-158) {
tmp = t_1;
} else if (F <= 1.5e-65) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 6e+223) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (-1.0 / B) - t_0 t_2 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -1.2e+252: tmp = t_2 elif F <= -2.1e+120: tmp = t_1 elif F <= -76000000.0: tmp = t_2 elif F <= 8.8e-158: tmp = t_1 elif F <= 1.5e-65: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 6e+223: tmp = (1.0 / B) - t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(-1.0 / B) - t_0) t_2 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -1.2e+252) tmp = t_2; elseif (F <= -2.1e+120) tmp = t_1; elseif (F <= -76000000.0) tmp = t_2; elseif (F <= 8.8e-158) tmp = t_1; elseif (F <= 1.5e-65) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 6e+223) tmp = Float64(Float64(1.0 / B) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (-1.0 / B) - t_0; t_2 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -1.2e+252) tmp = t_2; elseif (F <= -2.1e+120) tmp = t_1; elseif (F <= -76000000.0) tmp = t_2; elseif (F <= 8.8e-158) tmp = t_1; elseif (F <= 1.5e-65) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 6e+223) tmp = (1.0 / B) - t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.2e+252], t$95$2, If[LessEqual[F, -2.1e+120], t$95$1, If[LessEqual[F, -76000000.0], t$95$2, If[LessEqual[F, 8.8e-158], t$95$1, If[LessEqual[F, 1.5e-65], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 6e+223], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{B} - t_0\\
t_2 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -1.2 \cdot 10^{+252}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{+120}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -76000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 8.8 \cdot 10^{-158}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-65}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{+223}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.2e252 or -2.1e120 < F < -7.6e7Initial program 56.3%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 96.8%
if -1.2e252 < F < -2.1e120 or -7.6e7 < F < 8.8000000000000004e-158Initial program 94.2%
Taylor expanded in F around -inf 52.3%
Taylor expanded in B around 0 59.6%
+-commutative59.6%
div-inv59.7%
unsub-neg59.7%
Applied egg-rr59.7%
if 8.8000000000000004e-158 < F < 1.49999999999999999e-65Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.6%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in x around 0 99.7%
associate-*l/99.8%
*-lft-identity99.8%
unpow299.8%
fma-udef99.8%
Simplified99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 80.5%
if 1.49999999999999999e-65 < F < 6.00000000000000002e223Initial program 72.8%
+-commutative72.8%
unsub-neg72.8%
associate-*l/86.8%
associate-*r/86.8%
*-commutative86.8%
Simplified86.9%
clear-num86.9%
inv-pow86.9%
fma-def86.9%
fma-udef86.9%
*-commutative86.9%
fma-def86.9%
fma-def86.9%
Applied egg-rr86.9%
Taylor expanded in F around inf 90.6%
Taylor expanded in B around 0 77.5%
if 6.00000000000000002e223 < F Initial program 8.7%
Taylor expanded in B around 0 1.2%
Taylor expanded in F around inf 93.7%
Final simplification73.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F 1.3e-157)
(- (/ -1.0 B) t_0)
(if (<= F 2.1e-65)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 1.9e+220) (- (/ 1.0 B) t_0) (- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= 1.3e-157) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 2.1e-65) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 1.9e+220) {
tmp = (1.0 / B) - t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= 1.3d-157) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 2.1d-65) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 1.9d+220) then
tmp = (1.0d0 / b) - t_0
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 t_0 = x / Math.tan(B);
double tmp;
if (F <= 1.3e-157) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 2.1e-65) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 1.9e+220) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= 1.3e-157: tmp = (-1.0 / B) - t_0 elif F <= 2.1e-65: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 1.9e+220: tmp = (1.0 / B) - t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= 1.3e-157) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 2.1e-65) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 1.9e+220) tmp = Float64(Float64(1.0 / B) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= 1.3e-157) tmp = (-1.0 / B) - t_0; elseif (F <= 2.1e-65) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 1.9e+220) tmp = (1.0 / B) - t_0; else tmp = (1.0 / sin(B)) - (x / B); 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-157], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.1e-65], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.9e+220], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq 1.3 \cdot 10^{-157}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-65}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 1.9 \cdot 10^{+220}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < 1.29999999999999994e-157Initial program 84.7%
Taylor expanded in F around -inf 64.2%
Taylor expanded in B around 0 60.2%
+-commutative60.2%
div-inv60.3%
unsub-neg60.3%
Applied egg-rr60.3%
if 1.29999999999999994e-157 < F < 2.10000000000000003e-65Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.6%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in x around 0 99.7%
associate-*l/99.8%
*-lft-identity99.8%
unpow299.8%
fma-udef99.8%
Simplified99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 80.5%
if 2.10000000000000003e-65 < F < 1.89999999999999992e220Initial program 72.8%
+-commutative72.8%
unsub-neg72.8%
associate-*l/86.8%
associate-*r/86.8%
*-commutative86.8%
Simplified86.9%
clear-num86.9%
inv-pow86.9%
fma-def86.9%
fma-udef86.9%
*-commutative86.9%
fma-def86.9%
fma-def86.9%
Applied egg-rr86.9%
Taylor expanded in F around inf 90.6%
Taylor expanded in B around 0 77.5%
if 1.89999999999999992e220 < F Initial program 8.7%
Taylor expanded in B around 0 1.2%
Taylor expanded in F around inf 93.7%
Final simplification68.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.8e-105)
(- (/ -1.0 B) t_0)
(if (<= F 5.3e+216) (- (/ 1.0 B) t_0) (- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.8e-105) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 5.3e+216) {
tmp = (1.0 / B) - t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.8d-105)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 5.3d+216) then
tmp = (1.0d0 / b) - t_0
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 t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.8e-105) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 5.3e+216) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.8e-105: tmp = (-1.0 / B) - t_0 elif F <= 5.3e+216: tmp = (1.0 / B) - t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.8e-105) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 5.3e+216) tmp = Float64(Float64(1.0 / B) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.8e-105) tmp = (-1.0 / B) - t_0; elseif (F <= 5.3e+216) tmp = (1.0 / B) - t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.8e-105], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.3e+216], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.8 \cdot 10^{-105}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 5.3 \cdot 10^{+216}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.79999999999999982e-105Initial program 71.0%
Taylor expanded in F around -inf 81.4%
Taylor expanded in B around 0 62.4%
+-commutative62.4%
div-inv62.4%
unsub-neg62.4%
Applied egg-rr62.4%
if -1.79999999999999982e-105 < F < 5.30000000000000002e216Initial program 88.1%
+-commutative88.1%
unsub-neg88.1%
associate-*l/94.1%
associate-*r/94.1%
*-commutative94.1%
Simplified94.3%
clear-num94.3%
inv-pow94.3%
fma-def94.3%
fma-udef94.3%
*-commutative94.3%
fma-def94.3%
fma-def94.3%
Applied egg-rr94.3%
Taylor expanded in F around inf 62.1%
Taylor expanded in B around 0 62.8%
if 5.30000000000000002e216 < F Initial program 8.7%
Taylor expanded in B around 0 1.2%
Taylor expanded in F around inf 93.7%
Final simplification64.5%
(FPCore (F B x) :precision binary64 (if (<= F 5.2e+99) (- (/ -1.0 B) (/ x (tan B))) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 5.2e+99) {
tmp = (-1.0 / B) - (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 <= 5.2d+99) then
tmp = ((-1.0d0) / b) - (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 <= 5.2e+99) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 5.2e+99: tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 5.2e+99) tmp = Float64(Float64(-1.0 / B) - 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 <= 5.2e+99) tmp = (-1.0 / B) - (x / tan(B)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 5.2e+99], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 5.2 \cdot 10^{+99}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 5.1999999999999999e99Initial program 88.5%
Taylor expanded in F around -inf 58.2%
Taylor expanded in B around 0 55.7%
+-commutative55.7%
div-inv55.8%
unsub-neg55.8%
Applied egg-rr55.8%
if 5.1999999999999999e99 < F Initial program 37.8%
+-commutative37.8%
unsub-neg37.8%
associate-*l/58.8%
associate-*r/58.8%
*-commutative58.8%
Simplified59.0%
clear-num59.0%
inv-pow59.0%
fma-def59.0%
fma-udef59.0%
*-commutative59.0%
fma-def59.0%
fma-def59.0%
Applied egg-rr59.0%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 59.1%
Final simplification56.5%
(FPCore (F B x) :precision binary64 (let* ((t_0 (/ x (tan B)))) (if (<= F -2.2e-105) (- (/ -1.0 B) t_0) (- (/ 1.0 B) t_0))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.2e-105) {
tmp = (-1.0 / B) - t_0;
} else {
tmp = (1.0 / 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 <= (-2.2d-105)) then
tmp = ((-1.0d0) / b) - t_0
else
tmp = (1.0d0 / 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 <= -2.2e-105) {
tmp = (-1.0 / B) - t_0;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.2e-105: tmp = (-1.0 / B) - t_0 else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.2e-105) tmp = Float64(Float64(-1.0 / B) - t_0); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.2e-105) tmp = (-1.0 / B) - t_0; else tmp = (1.0 / 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, -2.2e-105], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.2 \cdot 10^{-105}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -2.20000000000000004e-105Initial program 71.0%
Taylor expanded in F around -inf 81.4%
Taylor expanded in B around 0 62.4%
+-commutative62.4%
div-inv62.4%
unsub-neg62.4%
Applied egg-rr62.4%
if -2.20000000000000004e-105 < F Initial program 81.4%
+-commutative81.4%
unsub-neg81.4%
associate-*l/87.6%
associate-*r/87.6%
*-commutative87.6%
Simplified87.7%
clear-num87.7%
inv-pow87.7%
fma-def87.7%
fma-udef87.7%
*-commutative87.7%
fma-def87.7%
fma-def87.7%
Applied egg-rr87.7%
Taylor expanded in F around inf 65.3%
Taylor expanded in B around 0 62.7%
Final simplification62.6%
(FPCore (F B x) :precision binary64 (if (<= F -5.2e-44) (+ (* B (* x 0.3333333333333333)) (/ (- -1.0 x) B)) (if (<= F 5.3e-92) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.2e-44) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 5.3e-92) {
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 <= (-5.2d-44)) then
tmp = (b * (x * 0.3333333333333333d0)) + (((-1.0d0) - x) / b)
else if (f <= 5.3d-92) 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 <= -5.2e-44) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 5.3e-92) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.2e-44: tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B) elif F <= 5.3e-92: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.2e-44) tmp = Float64(Float64(B * Float64(x * 0.3333333333333333)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 5.3e-92) 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 <= -5.2e-44) tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B); elseif (F <= 5.3e-92) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.2e-44], N[(N[(B * N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.3e-92], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.2 \cdot 10^{-44}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5.3 \cdot 10^{-92}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.1999999999999996e-44Initial program 65.1%
Taylor expanded in F around -inf 91.8%
Taylor expanded in B around 0 67.2%
Taylor expanded in B around 0 52.8%
+-commutative52.8%
mul-1-neg52.8%
unsub-neg52.8%
*-commutative52.8%
associate-*l*52.8%
Simplified52.8%
if -5.1999999999999996e-44 < F < 5.30000000000000029e-92Initial program 99.4%
Taylor expanded in F around -inf 40.8%
Taylor expanded in B around 0 25.1%
associate-*r/25.1%
distribute-lft-in25.1%
metadata-eval25.1%
neg-mul-125.1%
Simplified25.1%
Taylor expanded in x around inf 38.1%
mul-1-neg38.1%
distribute-frac-neg38.1%
Simplified38.1%
if 5.30000000000000029e-92 < F Initial program 63.8%
+-commutative63.8%
unsub-neg63.8%
associate-*l/76.0%
associate-*r/76.0%
*-commutative76.0%
Simplified76.1%
clear-num76.1%
inv-pow76.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 87.5%
Taylor expanded in B around 0 46.6%
Final simplification44.8%
(FPCore (F B x) :precision binary64 (if (<= F -8.2e-45) (/ (- -1.0 x) B) (if (<= F 4.9e-92) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.2e-45) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.9e-92) {
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 <= (-8.2d-45)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.9d-92) 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 <= -8.2e-45) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.9e-92) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.2e-45: tmp = (-1.0 - x) / B elif F <= 4.9e-92: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.2e-45) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.9e-92) 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 <= -8.2e-45) tmp = (-1.0 - x) / B; elseif (F <= 4.9e-92) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.2e-45], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.9e-92], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.2 \cdot 10^{-45}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.9 \cdot 10^{-92}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -8.1999999999999998e-45Initial program 65.1%
Taylor expanded in F around -inf 91.8%
Taylor expanded in B around 0 52.8%
associate-*r/52.8%
distribute-lft-in52.8%
metadata-eval52.8%
neg-mul-152.8%
Simplified52.8%
Taylor expanded in B around 0 52.8%
associate-*r/52.8%
distribute-lft-in52.8%
metadata-eval52.8%
neg-mul-152.8%
sub-neg52.8%
Simplified52.8%
if -8.1999999999999998e-45 < F < 4.9e-92Initial program 99.4%
Taylor expanded in F around -inf 40.8%
Taylor expanded in B around 0 25.1%
associate-*r/25.1%
distribute-lft-in25.1%
metadata-eval25.1%
neg-mul-125.1%
Simplified25.1%
Taylor expanded in x around inf 38.1%
mul-1-neg38.1%
distribute-frac-neg38.1%
Simplified38.1%
if 4.9e-92 < F Initial program 63.8%
+-commutative63.8%
unsub-neg63.8%
associate-*l/76.0%
associate-*r/76.0%
*-commutative76.0%
Simplified76.1%
clear-num76.1%
inv-pow76.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 87.5%
Taylor expanded in B around 0 46.6%
Final simplification44.8%
(FPCore (F B x) :precision binary64 (if (<= F -4.5e-46) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.5e-46) {
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 <= (-4.5d-46)) 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 <= -4.5e-46) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.5e-46: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.5e-46) 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 <= -4.5e-46) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.5e-46], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.5 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -4.50000000000000001e-46Initial program 65.1%
Taylor expanded in F around -inf 91.8%
Taylor expanded in B around 0 52.8%
associate-*r/52.8%
distribute-lft-in52.8%
metadata-eval52.8%
neg-mul-152.8%
Simplified52.8%
Taylor expanded in B around 0 52.8%
associate-*r/52.8%
distribute-lft-in52.8%
metadata-eval52.8%
neg-mul-152.8%
sub-neg52.8%
Simplified52.8%
if -4.50000000000000001e-46 < F Initial program 82.6%
Taylor expanded in F around -inf 41.9%
Taylor expanded in B around 0 22.3%
associate-*r/22.3%
distribute-lft-in22.3%
metadata-eval22.3%
neg-mul-122.3%
Simplified22.3%
Taylor expanded in x around inf 29.6%
mul-1-neg29.6%
distribute-frac-neg29.6%
Simplified29.6%
Final simplification35.5%
(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(Float64(-x) / 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 78.2%
Taylor expanded in F around -inf 54.6%
Taylor expanded in B around 0 30.1%
associate-*r/30.1%
distribute-lft-in30.1%
metadata-eval30.1%
neg-mul-130.1%
Simplified30.1%
Taylor expanded in x around inf 29.4%
mul-1-neg29.4%
distribute-frac-neg29.4%
Simplified29.4%
Final simplification29.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 78.2%
Taylor expanded in F around -inf 54.6%
Taylor expanded in B around 0 30.1%
associate-*r/30.1%
distribute-lft-in30.1%
metadata-eval30.1%
neg-mul-130.1%
Simplified30.1%
Taylor expanded in x around 0 9.4%
Final simplification9.4%
herbie shell --seed 2023187
(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))))))