
(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 23 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 -1e+56)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 132000000.0)
(fma
(/ F (sin B))
(pow (fma x 2.0 (fma F F 2.0)) -0.5)
(/ (- x) (tan B)))
(- (/ F (* F (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e+56) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 132000000.0) {
tmp = fma((F / sin(B)), pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5), (-x / tan(B)));
} else {
tmp = (F / (F * sin(B))) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e+56) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 132000000.0) tmp = fma(Float64(F / sin(B)), (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5), Float64(Float64(-x) / tan(B))); else tmp = Float64(Float64(F / Float64(F * sin(B))) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+56], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 132000000.0], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+56}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 132000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - t_0\\
\end{array}
\end{array}
if F < -1.00000000000000009e56Initial program 49.5%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u41.5%
expm1-udef41.4%
+-commutative41.4%
un-div-inv41.4%
Applied egg-rr41.4%
expm1-def41.5%
expm1-log1p99.7%
unsub-neg99.7%
Simplified99.7%
if -1.00000000000000009e56 < F < 1.32e8Initial program 99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
distribute-lft-neg-in99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
if 1.32e8 < F Initial program 64.0%
+-commutative64.0%
unsub-neg64.0%
associate-*l/78.5%
associate-*r/78.3%
*-commutative78.3%
Simplified78.4%
Taylor expanded in F around inf 99.6%
un-div-inv99.8%
*-commutative99.8%
Applied egg-rr99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.1e+25)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 86000000.0)
(+
(* x (/ -1.0 (tan B)))
(* (/ 1.0 (/ (sin B) F)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ F (* F (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.1e+25) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 86000000.0) {
tmp = (x * (-1.0 / tan(B))) + ((1.0 / (sin(B) / F)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (F / (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.1d+25)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 86000000.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((1.0d0 / (sin(b) / f)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (f / (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.1e+25) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 86000000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + ((1.0 / (Math.sin(B) / F)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (F / (F * Math.sin(B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.1e+25: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 86000000.0: tmp = (x * (-1.0 / math.tan(B))) + ((1.0 / (math.sin(B) / F)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (F / (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.1e+25) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 86000000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(1.0 / Float64(sin(B) / F)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(F / Float64(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.1e+25) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 86000000.0) tmp = (x * (-1.0 / tan(B))) + ((1.0 / (sin(B) / F)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (F / (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.1e+25], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 86000000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.1 \cdot 10^{+25}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 86000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - t_0\\
\end{array}
\end{array}
if F < -2.0999999999999999e25Initial program 52.3%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u40.4%
expm1-udef40.3%
+-commutative40.3%
un-div-inv40.3%
Applied egg-rr40.3%
expm1-def40.4%
expm1-log1p99.7%
unsub-neg99.7%
Simplified99.7%
if -2.0999999999999999e25 < F < 8.6e7Initial program 99.5%
clear-num99.6%
inv-pow99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
if 8.6e7 < F Initial program 64.0%
+-commutative64.0%
unsub-neg64.0%
associate-*l/78.5%
associate-*r/78.3%
*-commutative78.3%
Simplified78.4%
Taylor expanded in F around inf 99.6%
un-div-inv99.8%
*-commutative99.8%
Applied egg-rr99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.7e+25)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 200000000.0)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ F (* F (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.7e+25) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 200000000.0) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (F / (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.7d+25)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 200000000.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (f / (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.7e+25) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 200000000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (F / (F * Math.sin(B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.7e+25: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 200000000.0: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (F / (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.7e+25) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 200000000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(F / Float64(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.7e+25) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 200000000.0) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (F / (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.7e+25], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 200000000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.7 \cdot 10^{+25}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - t_0\\
\end{array}
\end{array}
if F < -2.7e25Initial program 52.3%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u40.4%
expm1-udef40.3%
+-commutative40.3%
un-div-inv40.3%
Applied egg-rr40.3%
expm1-def40.4%
expm1-log1p99.7%
unsub-neg99.7%
Simplified99.7%
if -2.7e25 < F < 2e8Initial program 99.5%
if 2e8 < F Initial program 64.0%
+-commutative64.0%
unsub-neg64.0%
associate-*l/78.5%
associate-*r/78.3%
*-commutative78.3%
Simplified78.4%
Taylor expanded in F around inf 99.6%
un-div-inv99.8%
*-commutative99.8%
Applied egg-rr99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.6)
(+ (* x (/ -1.0 (tan B))) (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))))
(- (/ F (* F (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.6) {
tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * sqrt((2.0 + (x * 2.0)))));
} else {
tmp = (F / (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.45d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.6d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0)))))
else
tmp = (f / (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.45) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.6) {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0)))));
} else {
tmp = (F / (F * Math.sin(B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.45: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.6: tmp = (x * (-1.0 / math.tan(B))) + (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) else: tmp = (F / (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.45) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.6) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(Float64(F / Float64(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.45) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.6) tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * sqrt((2.0 + (x * 2.0))))); else tmp = (F / (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.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.6], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.6:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - t_0\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 53.6%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u40.6%
expm1-udef40.6%
+-commutative40.6%
un-div-inv40.6%
Applied egg-rr40.6%
expm1-def40.6%
expm1-log1p99.7%
unsub-neg99.7%
Simplified99.7%
if -1.44999999999999996 < F < 1.6000000000000001Initial program 99.5%
associate-*l/99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-/l*99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.0%
if 1.6000000000000001 < F Initial program 65.5%
+-commutative65.5%
unsub-neg65.5%
associate-*l/79.4%
associate-*r/79.2%
*-commutative79.2%
Simplified79.3%
Taylor expanded in F around inf 98.5%
un-div-inv98.6%
*-commutative98.6%
Applied egg-rr98.6%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.42)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ F (* F (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (F / (F * sin(B))) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.42d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (f / (f * sin(b))) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (F / (F * Math.sin(B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.42: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (F / (F * math.sin(B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.42) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(F / Float64(F * sin(B))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.42) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (F / (F * sin(B))) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - 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[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - t_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 53.6%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u40.6%
expm1-udef40.6%
+-commutative40.6%
un-div-inv40.6%
Applied egg-rr40.6%
expm1-def40.6%
expm1-log1p99.7%
unsub-neg99.7%
Simplified99.7%
if -1.3999999999999999 < F < 1.4199999999999999Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 98.9%
Taylor expanded in x around 0 98.9%
if 1.4199999999999999 < F Initial program 65.5%
+-commutative65.5%
unsub-neg65.5%
associate-*l/79.4%
associate-*r/79.2%
*-commutative79.2%
Simplified79.3%
Taylor expanded in F around inf 98.5%
un-div-inv98.6%
*-commutative98.6%
Applied egg-rr98.6%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (t_1 (/ x (tan B))))
(if (<= F -0.21)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 2.05e-113)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) t_1)
(if (<= F 4.9e-78)
(- (* (/ F (sin B)) t_0) (/ x B))
(if (<= F 44.0)
(+ (* x (/ -1.0 (tan B))) (* t_0 (/ F B)))
(- (/ F (* F (sin B))) t_1)))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.21) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 2.05e-113) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_1;
} else if (F <= 4.9e-78) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else if (F <= 44.0) {
tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B));
} else {
tmp = (F / (F * sin(B))) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = x / tan(b)
if (f <= (-0.21d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 2.05d-113) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - t_1
else if (f <= 4.9d-78) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else if (f <= 44.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (t_0 * (f / b))
else
tmp = (f / (f * sin(b))) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.21) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 2.05e-113) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_1;
} else if (F <= 4.9e-78) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else if (F <= 44.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (t_0 * (F / B));
} else {
tmp = (F / (F * Math.sin(B))) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -0.21: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 2.05e-113: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_1 elif F <= 4.9e-78: tmp = ((F / math.sin(B)) * t_0) - (x / B) elif F <= 44.0: tmp = (x * (-1.0 / math.tan(B))) + (t_0 * (F / B)) else: tmp = (F / (F * math.sin(B))) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.21) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 2.05e-113) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - t_1); elseif (F <= 4.9e-78) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); elseif (F <= 44.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * Float64(F / B))); else tmp = Float64(Float64(F / Float64(F * sin(B))) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = x / tan(B); tmp = 0.0; if (F <= -0.21) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 2.05e-113) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_1; elseif (F <= 4.9e-78) tmp = ((F / sin(B)) * t_0) - (x / B); elseif (F <= 44.0) tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B)); else tmp = (F / (F * sin(B))) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 2.05e-113], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 4.9e-78], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 44.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.21:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{-113}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_1\\
\mathbf{elif}\;F \leq 4.9 \cdot 10^{-78}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 44:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t_0 \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - t_1\\
\end{array}
\end{array}
if F < -0.209999999999999992Initial program 53.6%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u40.6%
expm1-udef40.6%
+-commutative40.6%
un-div-inv40.6%
Applied egg-rr40.6%
expm1-def40.6%
expm1-log1p99.7%
unsub-neg99.7%
Simplified99.7%
if -0.209999999999999992 < F < 2.05e-113Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 88.1%
if 2.05e-113 < F < 4.90000000000000029e-78Initial program 99.3%
Taylor expanded in B around 0 97.5%
if 4.90000000000000029e-78 < F < 44Initial program 99.8%
Taylor expanded in B around 0 80.3%
if 44 < F Initial program 65.5%
+-commutative65.5%
unsub-neg65.5%
associate-*l/79.4%
associate-*r/79.2%
*-commutative79.2%
Simplified79.3%
Taylor expanded in F around inf 98.5%
un-div-inv98.6%
*-commutative98.6%
Applied egg-rr98.6%
Final simplification94.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B)))
(t_1 (- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) t_0)))
(if (<= F -0.35)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.05e-113)
t_1
(if (<= F 1.15e-77)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 8.8e-42) t_1 (- (/ F (* F (sin B))) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
double tmp;
if (F <= -0.35) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.05e-113) {
tmp = t_1;
} else if (F <= 1.15e-77) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 8.8e-42) {
tmp = t_1;
} else {
tmp = (F / (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) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - t_0
if (f <= (-0.35d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.05d-113) then
tmp = t_1
else if (f <= 1.15d-77) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 8.8d-42) then
tmp = t_1
else
tmp = (f / (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 t_1 = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
double tmp;
if (F <= -0.35) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.05e-113) {
tmp = t_1;
} else if (F <= 1.15e-77) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 8.8e-42) {
tmp = t_1;
} else {
tmp = (F / (F * Math.sin(B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0 tmp = 0 if F <= -0.35: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.05e-113: tmp = t_1 elif F <= 1.15e-77: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 8.8e-42: tmp = t_1 else: tmp = (F / (F * math.sin(B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - t_0) tmp = 0.0 if (F <= -0.35) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.05e-113) tmp = t_1; elseif (F <= 1.15e-77) 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 <= 8.8e-42) tmp = t_1; else tmp = Float64(Float64(F / Float64(F * sin(B))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0; tmp = 0.0; if (F <= -0.35) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.05e-113) tmp = t_1; elseif (F <= 1.15e-77) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 8.8e-42) tmp = t_1; else tmp = (F / (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]}, Block[{t$95$1 = N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -0.35], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.05e-113], t$95$1, If[LessEqual[F, 1.15e-77], 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, 8.8e-42], t$95$1, N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_0\\
\mathbf{if}\;F \leq -0.35:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-77}:\\
\;\;\;\;\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 8.8 \cdot 10^{-42}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - t_0\\
\end{array}
\end{array}
if F < -0.34999999999999998Initial program 53.6%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u40.6%
expm1-udef40.6%
+-commutative40.6%
un-div-inv40.6%
Applied egg-rr40.6%
expm1-def40.6%
expm1-log1p99.7%
unsub-neg99.7%
Simplified99.7%
if -0.34999999999999998 < F < 1.05e-113 or 1.14999999999999999e-77 < F < 8.8000000000000002e-42Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 89.1%
if 1.05e-113 < F < 1.14999999999999999e-77Initial program 99.3%
Taylor expanded in B around 0 97.5%
if 8.8000000000000002e-42 < F Initial program 68.6%
+-commutative68.6%
unsub-neg68.6%
associate-*l/81.1%
associate-*r/81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in F around inf 94.1%
un-div-inv94.2%
*-commutative94.2%
Applied egg-rr94.2%
Final simplification94.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (sqrt 0.5) (/ (sin B) F))) (t_1 (/ x (tan B))))
(if (<= F -0.0021)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -6.5e-53)
t_0
(if (<= F 3.55e-113)
(/ (* x (- (cos B))) (sin B))
(if (<= F 1.75e-73)
t_0
(if (<= F 1.15e-59)
(- (/ 1.0 B) t_1)
(- (/ F (* F (sin B))) t_1))))))))
double code(double F, double B, double x) {
double t_0 = sqrt(0.5) / (sin(B) / F);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.0021) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -6.5e-53) {
tmp = t_0;
} else if (F <= 3.55e-113) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 1.75e-73) {
tmp = t_0;
} else if (F <= 1.15e-59) {
tmp = (1.0 / B) - t_1;
} else {
tmp = (F / (F * sin(B))) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = sqrt(0.5d0) / (sin(b) / f)
t_1 = x / tan(b)
if (f <= (-0.0021d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-6.5d-53)) then
tmp = t_0
else if (f <= 3.55d-113) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 1.75d-73) then
tmp = t_0
else if (f <= 1.15d-59) then
tmp = (1.0d0 / b) - t_1
else
tmp = (f / (f * sin(b))) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt(0.5) / (Math.sin(B) / F);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.0021) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -6.5e-53) {
tmp = t_0;
} else if (F <= 3.55e-113) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 1.75e-73) {
tmp = t_0;
} else if (F <= 1.15e-59) {
tmp = (1.0 / B) - t_1;
} else {
tmp = (F / (F * Math.sin(B))) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt(0.5) / (math.sin(B) / F) t_1 = x / math.tan(B) tmp = 0 if F <= -0.0021: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -6.5e-53: tmp = t_0 elif F <= 3.55e-113: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 1.75e-73: tmp = t_0 elif F <= 1.15e-59: tmp = (1.0 / B) - t_1 else: tmp = (F / (F * math.sin(B))) - t_1 return tmp
function code(F, B, x) t_0 = Float64(sqrt(0.5) / Float64(sin(B) / F)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0021) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -6.5e-53) tmp = t_0; elseif (F <= 3.55e-113) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 1.75e-73) tmp = t_0; elseif (F <= 1.15e-59) tmp = Float64(Float64(1.0 / B) - t_1); else tmp = Float64(Float64(F / Float64(F * sin(B))) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt(0.5) / (sin(B) / F); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.0021) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -6.5e-53) tmp = t_0; elseif (F <= 3.55e-113) tmp = (x * -cos(B)) / sin(B); elseif (F <= 1.75e-73) tmp = t_0; elseif (F <= 1.15e-59) tmp = (1.0 / B) - t_1; else tmp = (F / (F * sin(B))) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0021], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -6.5e-53], t$95$0, If[LessEqual[F, 3.55e-113], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.75e-73], t$95$0, If[LessEqual[F, 1.15e-59], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0021:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -6.5 \cdot 10^{-53}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 3.55 \cdot 10^{-113}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-73}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-59}:\\
\;\;\;\;\frac{1}{B} - t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - t_1\\
\end{array}
\end{array}
if F < -0.00209999999999999987Initial program 53.6%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u40.6%
expm1-udef40.6%
+-commutative40.6%
un-div-inv40.6%
Applied egg-rr40.6%
expm1-def40.6%
expm1-log1p99.7%
unsub-neg99.7%
Simplified99.7%
if -0.00209999999999999987 < F < -6.4999999999999997e-53 or 3.55e-113 < F < 1.7499999999999999e-73Initial program 99.0%
+-commutative99.0%
unsub-neg99.0%
associate-*l/99.1%
associate-*r/99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in F around 0 99.1%
Taylor expanded in x around 0 79.1%
associate-/l*79.1%
Simplified79.1%
if -6.4999999999999997e-53 < F < 3.55e-113Initial program 99.6%
+-commutative99.6%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 77.6%
mul-1-neg77.6%
*-commutative77.6%
associate-*l/77.6%
distribute-rgt-neg-in77.6%
Simplified77.6%
associate-*l/77.6%
Applied egg-rr77.6%
if 1.7499999999999999e-73 < F < 1.1499999999999999e-59Initial program 100.0%
+-commutative100.0%
unsub-neg100.0%
associate-*l/100.0%
associate-*r/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in F around inf 67.2%
Taylor expanded in B around 0 100.0%
if 1.1499999999999999e-59 < F Initial program 70.4%
+-commutative70.4%
unsub-neg70.4%
associate-*l/82.2%
associate-*r/82.2%
*-commutative82.2%
Simplified82.3%
Taylor expanded in F around inf 92.2%
un-div-inv92.4%
*-commutative92.4%
Applied egg-rr92.4%
Final simplification89.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.6e-5)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -1.5e-53)
(/ (sqrt 0.5) (/ (sin B) F))
(if (<= F 6e-113)
(/ (* x (- (cos B))) (sin B))
(if (<= F 7.7e-81)
(* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))
(if (<= F 1.15e-59)
(- (/ 1.0 B) t_0)
(- (/ F (* F (sin B))) t_0))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5.6e-5) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -1.5e-53) {
tmp = sqrt(0.5) / (sin(B) / F);
} else if (F <= 6e-113) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 7.7e-81) {
tmp = (F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))));
} else if (F <= 1.15e-59) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (F / (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 <= (-5.6d-5)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-1.5d-53)) then
tmp = sqrt(0.5d0) / (sin(b) / f)
else if (f <= 6d-113) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 7.7d-81) then
tmp = (f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
else if (f <= 1.15d-59) then
tmp = (1.0d0 / b) - t_0
else
tmp = (f / (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 <= -5.6e-5) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -1.5e-53) {
tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
} else if (F <= 6e-113) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 7.7e-81) {
tmp = (F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))));
} else if (F <= 1.15e-59) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (F / (F * Math.sin(B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5.6e-5: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -1.5e-53: tmp = math.sqrt(0.5) / (math.sin(B) / F) elif F <= 6e-113: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 7.7e-81: tmp = (F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0)))) elif F <= 1.15e-59: tmp = (1.0 / B) - t_0 else: tmp = (F / (F * math.sin(B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.6e-5) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -1.5e-53) tmp = Float64(sqrt(0.5) / Float64(sin(B) / F)); elseif (F <= 6e-113) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 7.7e-81) tmp = Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))); elseif (F <= 1.15e-59) tmp = Float64(Float64(1.0 / B) - t_0); else tmp = Float64(Float64(F / Float64(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 <= -5.6e-5) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -1.5e-53) tmp = sqrt(0.5) / (sin(B) / F); elseif (F <= 6e-113) tmp = (x * -cos(B)) / sin(B); elseif (F <= 7.7e-81) tmp = (F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0)))); elseif (F <= 1.15e-59) tmp = (1.0 / B) - t_0; else tmp = (F / (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, -5.6e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.5e-53], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e-113], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.7e-81], 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], If[LessEqual[F, 1.15e-59], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.6 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -1.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-113}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 7.7 \cdot 10^{-81}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-59}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - t_0\\
\end{array}
\end{array}
if F < -5.59999999999999992e-5Initial program 53.6%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u40.6%
expm1-udef40.6%
+-commutative40.6%
un-div-inv40.6%
Applied egg-rr40.6%
expm1-def40.6%
expm1-log1p99.7%
unsub-neg99.7%
Simplified99.7%
if -5.59999999999999992e-5 < F < -1.5000000000000001e-53Initial program 98.7%
+-commutative98.7%
unsub-neg98.7%
associate-*l/99.0%
associate-*r/99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in F around 0 99.1%
Taylor expanded in x around 0 80.7%
associate-/l*80.7%
Simplified80.7%
if -1.5000000000000001e-53 < F < 6.0000000000000002e-113Initial program 99.6%
+-commutative99.6%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 77.6%
mul-1-neg77.6%
*-commutative77.6%
associate-*l/77.6%
distribute-rgt-neg-in77.6%
Simplified77.6%
associate-*l/77.6%
Applied egg-rr77.6%
if 6.0000000000000002e-113 < F < 7.7000000000000002e-81Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.2%
associate-*r/99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in F around 0 99.2%
Taylor expanded in F around inf 77.2%
if 7.7000000000000002e-81 < F < 1.1499999999999999e-59Initial program 100.0%
+-commutative100.0%
unsub-neg100.0%
associate-*l/100.0%
associate-*r/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in F around inf 67.2%
Taylor expanded in B around 0 100.0%
if 1.1499999999999999e-59 < F Initial program 70.4%
+-commutative70.4%
unsub-neg70.4%
associate-*l/82.2%
associate-*r/82.2%
*-commutative82.2%
Simplified82.3%
Taylor expanded in F around inf 92.2%
un-div-inv92.4%
*-commutative92.4%
Applied egg-rr92.4%
Final simplification89.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.35)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 8.8e-42)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) t_0)
(- (/ F (* F (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.35) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 8.8e-42) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (F / (F * sin(B))) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.35d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 8.8d-42) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (f / (f * sin(b))) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.35) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 8.8e-42) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (F / (F * Math.sin(B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.35: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 8.8e-42: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0 else: tmp = (F / (F * math.sin(B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.35) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 8.8e-42) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(F / Float64(F * sin(B))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.35) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 8.8e-42) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0; else tmp = (F / (F * sin(B))) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.35], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.8e-42], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.35:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 8.8 \cdot 10^{-42}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - t_0\\
\end{array}
\end{array}
if F < -0.34999999999999998Initial program 53.6%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u40.6%
expm1-udef40.6%
+-commutative40.6%
un-div-inv40.6%
Applied egg-rr40.6%
expm1-def40.6%
expm1-log1p99.7%
unsub-neg99.7%
Simplified99.7%
if -0.34999999999999998 < F < 8.8000000000000002e-42Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 84.4%
if 8.8000000000000002e-42 < F Initial program 68.6%
+-commutative68.6%
unsub-neg68.6%
associate-*l/81.1%
associate-*r/81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in F around inf 94.1%
un-div-inv94.2%
*-commutative94.2%
Applied egg-rr94.2%
Final simplification91.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (sqrt 0.5) (/ (sin B) F))))
(if (<= F -0.19)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3e-51)
t_0
(if (<= F 1.48e-114)
(* (- (cos B)) (/ x (sin B)))
(if (<= F 6.4e-72)
t_0
(if (<= F 1.55)
(- (/ 1.0 B) (/ x (tan B)))
(- (/ F (/ (sin B) (/ 1.0 F))) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = sqrt(0.5) / (sin(B) / F);
double tmp;
if (F <= -0.19) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3e-51) {
tmp = t_0;
} else if (F <= 1.48e-114) {
tmp = -cos(B) * (x / sin(B));
} else if (F <= 6.4e-72) {
tmp = t_0;
} else if (F <= 1.55) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = (F / (sin(B) / (1.0 / F))) - (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 = sqrt(0.5d0) / (sin(b) / f)
if (f <= (-0.19d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3d-51)) then
tmp = t_0
else if (f <= 1.48d-114) then
tmp = -cos(b) * (x / sin(b))
else if (f <= 6.4d-72) then
tmp = t_0
else if (f <= 1.55d0) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = (f / (sin(b) / (1.0d0 / f))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt(0.5) / (Math.sin(B) / F);
double tmp;
if (F <= -0.19) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3e-51) {
tmp = t_0;
} else if (F <= 1.48e-114) {
tmp = -Math.cos(B) * (x / Math.sin(B));
} else if (F <= 6.4e-72) {
tmp = t_0;
} else if (F <= 1.55) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = (F / (Math.sin(B) / (1.0 / F))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt(0.5) / (math.sin(B) / F) tmp = 0 if F <= -0.19: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3e-51: tmp = t_0 elif F <= 1.48e-114: tmp = -math.cos(B) * (x / math.sin(B)) elif F <= 6.4e-72: tmp = t_0 elif F <= 1.55: tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = (F / (math.sin(B) / (1.0 / F))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(sqrt(0.5) / Float64(sin(B) / F)) tmp = 0.0 if (F <= -0.19) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3e-51) tmp = t_0; elseif (F <= 1.48e-114) tmp = Float64(Float64(-cos(B)) * Float64(x / sin(B))); elseif (F <= 6.4e-72) tmp = t_0; elseif (F <= 1.55) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(F / Float64(sin(B) / Float64(1.0 / F))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt(0.5) / (sin(B) / F); tmp = 0.0; if (F <= -0.19) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3e-51) tmp = t_0; elseif (F <= 1.48e-114) tmp = -cos(B) * (x / sin(B)); elseif (F <= 6.4e-72) tmp = t_0; elseif (F <= 1.55) tmp = (1.0 / B) - (x / tan(B)); else tmp = (F / (sin(B) / (1.0 / F))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.19], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3e-51], t$95$0, If[LessEqual[F, 1.48e-114], N[((-N[Cos[B], $MachinePrecision]) * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.4e-72], t$95$0, If[LessEqual[F, 1.55], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{if}\;F \leq -0.19:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3 \cdot 10^{-51}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.48 \cdot 10^{-114}:\\
\;\;\;\;\left(-\cos B\right) \cdot \frac{x}{\sin B}\\
\mathbf{elif}\;F \leq 6.4 \cdot 10^{-72}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.55:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\frac{1}{F}}} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.19Initial program 53.6%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 87.0%
if -0.19 < F < -3.00000000000000002e-51 or 1.48e-114 < F < 6.39999999999999998e-72Initial program 99.0%
+-commutative99.0%
unsub-neg99.0%
associate-*l/99.1%
associate-*r/99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in F around 0 99.1%
Taylor expanded in x around 0 79.1%
associate-/l*79.1%
Simplified79.1%
if -3.00000000000000002e-51 < F < 1.48e-114Initial program 99.6%
+-commutative99.6%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 77.6%
mul-1-neg77.6%
*-commutative77.6%
associate-*l/77.6%
distribute-rgt-neg-in77.6%
Simplified77.6%
if 6.39999999999999998e-72 < F < 1.55000000000000004Initial program 99.8%
+-commutative99.8%
unsub-neg99.8%
associate-*l/99.6%
associate-*r/99.8%
*-commutative99.8%
Simplified99.9%
Taylor expanded in F around inf 57.3%
Taylor expanded in B around 0 62.4%
if 1.55000000000000004 < F Initial program 65.5%
associate-*l/79.4%
+-commutative79.4%
*-commutative79.4%
fma-udef79.4%
fma-def79.4%
metadata-eval79.4%
metadata-eval79.4%
associate-/l*79.3%
fma-def79.3%
fma-udef79.3%
*-commutative79.3%
fma-def79.3%
fma-def79.3%
Applied egg-rr79.3%
Taylor expanded in F around inf 98.4%
Taylor expanded in B around 0 82.3%
Final simplification80.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (sqrt 0.5) (/ (sin B) F))))
(if (<= F -2.1e-5)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.8e-54)
t_0
(if (<= F 6e-113)
(/ (* x (- (cos B))) (sin B))
(if (<= F 3.5e-77)
t_0
(if (<= F 1.15)
(- (/ 1.0 B) (/ x (tan B)))
(- (/ F (/ (sin B) (/ 1.0 F))) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = sqrt(0.5) / (sin(B) / F);
double tmp;
if (F <= -2.1e-5) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.8e-54) {
tmp = t_0;
} else if (F <= 6e-113) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 3.5e-77) {
tmp = t_0;
} else if (F <= 1.15) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = (F / (sin(B) / (1.0 / F))) - (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 = sqrt(0.5d0) / (sin(b) / f)
if (f <= (-2.1d-5)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.8d-54)) then
tmp = t_0
else if (f <= 6d-113) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 3.5d-77) then
tmp = t_0
else if (f <= 1.15d0) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = (f / (sin(b) / (1.0d0 / f))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt(0.5) / (Math.sin(B) / F);
double tmp;
if (F <= -2.1e-5) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.8e-54) {
tmp = t_0;
} else if (F <= 6e-113) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 3.5e-77) {
tmp = t_0;
} else if (F <= 1.15) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = (F / (Math.sin(B) / (1.0 / F))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt(0.5) / (math.sin(B) / F) tmp = 0 if F <= -2.1e-5: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.8e-54: tmp = t_0 elif F <= 6e-113: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 3.5e-77: tmp = t_0 elif F <= 1.15: tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = (F / (math.sin(B) / (1.0 / F))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(sqrt(0.5) / Float64(sin(B) / F)) tmp = 0.0 if (F <= -2.1e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.8e-54) tmp = t_0; elseif (F <= 6e-113) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 3.5e-77) tmp = t_0; elseif (F <= 1.15) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(F / Float64(sin(B) / Float64(1.0 / F))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt(0.5) / (sin(B) / F); tmp = 0.0; if (F <= -2.1e-5) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.8e-54) tmp = t_0; elseif (F <= 6e-113) tmp = (x * -cos(B)) / sin(B); elseif (F <= 3.5e-77) tmp = t_0; elseif (F <= 1.15) tmp = (1.0 / B) - (x / tan(B)); else tmp = (F / (sin(B) / (1.0 / F))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.1e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.8e-54], t$95$0, If[LessEqual[F, 6e-113], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.5e-77], t$95$0, If[LessEqual[F, 1.15], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{if}\;F \leq -2.1 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.8 \cdot 10^{-54}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-113}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-77}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.15:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\frac{1}{F}}} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.09999999999999988e-5Initial program 53.6%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 87.0%
if -2.09999999999999988e-5 < F < -4.80000000000000026e-54 or 6.0000000000000002e-113 < F < 3.50000000000000013e-77Initial program 99.0%
+-commutative99.0%
unsub-neg99.0%
associate-*l/99.1%
associate-*r/99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in F around 0 99.1%
Taylor expanded in x around 0 79.1%
associate-/l*79.1%
Simplified79.1%
if -4.80000000000000026e-54 < F < 6.0000000000000002e-113Initial program 99.6%
+-commutative99.6%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 77.6%
mul-1-neg77.6%
*-commutative77.6%
associate-*l/77.6%
distribute-rgt-neg-in77.6%
Simplified77.6%
associate-*l/77.6%
Applied egg-rr77.6%
if 3.50000000000000013e-77 < F < 1.1499999999999999Initial program 99.8%
+-commutative99.8%
unsub-neg99.8%
associate-*l/99.6%
associate-*r/99.8%
*-commutative99.8%
Simplified99.9%
Taylor expanded in F around inf 57.3%
Taylor expanded in B around 0 62.4%
if 1.1499999999999999 < F Initial program 65.5%
associate-*l/79.4%
+-commutative79.4%
*-commutative79.4%
fma-udef79.4%
fma-def79.4%
metadata-eval79.4%
metadata-eval79.4%
associate-/l*79.3%
fma-def79.3%
fma-udef79.3%
*-commutative79.3%
fma-def79.3%
fma-def79.3%
Applied egg-rr79.3%
Taylor expanded in F around inf 98.4%
Taylor expanded in B around 0 82.3%
Final simplification80.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (sqrt 0.5) (/ (sin B) F))) (t_1 (/ x (tan B))))
(if (<= F -1.8e-6)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -9.5e-56)
t_0
(if (<= F 1.62e-115)
(/ (* x (- (cos B))) (sin B))
(if (<= F 1.5e-81)
t_0
(if (<= F 1.68)
(- (/ 1.0 B) t_1)
(- (/ F (/ (sin B) (/ 1.0 F))) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = sqrt(0.5) / (sin(B) / F);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.8e-6) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -9.5e-56) {
tmp = t_0;
} else if (F <= 1.62e-115) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 1.5e-81) {
tmp = t_0;
} else if (F <= 1.68) {
tmp = (1.0 / B) - t_1;
} else {
tmp = (F / (sin(B) / (1.0 / F))) - (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 = sqrt(0.5d0) / (sin(b) / f)
t_1 = x / tan(b)
if (f <= (-1.8d-6)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-9.5d-56)) then
tmp = t_0
else if (f <= 1.62d-115) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 1.5d-81) then
tmp = t_0
else if (f <= 1.68d0) then
tmp = (1.0d0 / b) - t_1
else
tmp = (f / (sin(b) / (1.0d0 / f))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt(0.5) / (Math.sin(B) / F);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.8e-6) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -9.5e-56) {
tmp = t_0;
} else if (F <= 1.62e-115) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 1.5e-81) {
tmp = t_0;
} else if (F <= 1.68) {
tmp = (1.0 / B) - t_1;
} else {
tmp = (F / (Math.sin(B) / (1.0 / F))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt(0.5) / (math.sin(B) / F) t_1 = x / math.tan(B) tmp = 0 if F <= -1.8e-6: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -9.5e-56: tmp = t_0 elif F <= 1.62e-115: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 1.5e-81: tmp = t_0 elif F <= 1.68: tmp = (1.0 / B) - t_1 else: tmp = (F / (math.sin(B) / (1.0 / F))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(sqrt(0.5) / Float64(sin(B) / F)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.8e-6) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -9.5e-56) tmp = t_0; elseif (F <= 1.62e-115) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 1.5e-81) tmp = t_0; elseif (F <= 1.68) tmp = Float64(Float64(1.0 / B) - t_1); else tmp = Float64(Float64(F / Float64(sin(B) / Float64(1.0 / F))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt(0.5) / (sin(B) / F); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.8e-6) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -9.5e-56) tmp = t_0; elseif (F <= 1.62e-115) tmp = (x * -cos(B)) / sin(B); elseif (F <= 1.5e-81) tmp = t_0; elseif (F <= 1.68) tmp = (1.0 / B) - t_1; else tmp = (F / (sin(B) / (1.0 / F))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.8e-6], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -9.5e-56], t$95$0, If[LessEqual[F, 1.62e-115], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.5e-81], t$95$0, If[LessEqual[F, 1.68], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.8 \cdot 10^{-6}:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -9.5 \cdot 10^{-56}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.62 \cdot 10^{-115}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-81}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.68:\\
\;\;\;\;\frac{1}{B} - t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\frac{1}{F}}} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.79999999999999992e-6Initial program 53.6%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u40.6%
expm1-udef40.6%
+-commutative40.6%
un-div-inv40.6%
Applied egg-rr40.6%
expm1-def40.6%
expm1-log1p99.7%
unsub-neg99.7%
Simplified99.7%
if -1.79999999999999992e-6 < F < -9.4999999999999991e-56 or 1.62e-115 < F < 1.4999999999999999e-81Initial program 99.0%
+-commutative99.0%
unsub-neg99.0%
associate-*l/99.1%
associate-*r/99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in F around 0 99.1%
Taylor expanded in x around 0 79.1%
associate-/l*79.1%
Simplified79.1%
if -9.4999999999999991e-56 < F < 1.62e-115Initial program 99.6%
+-commutative99.6%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 77.6%
mul-1-neg77.6%
*-commutative77.6%
associate-*l/77.6%
distribute-rgt-neg-in77.6%
Simplified77.6%
associate-*l/77.6%
Applied egg-rr77.6%
if 1.4999999999999999e-81 < F < 1.67999999999999994Initial program 99.8%
+-commutative99.8%
unsub-neg99.8%
associate-*l/99.6%
associate-*r/99.8%
*-commutative99.8%
Simplified99.9%
Taylor expanded in F around inf 57.3%
Taylor expanded in B around 0 62.4%
if 1.67999999999999994 < F Initial program 65.5%
associate-*l/79.4%
+-commutative79.4%
*-commutative79.4%
fma-udef79.4%
fma-def79.4%
metadata-eval79.4%
metadata-eval79.4%
associate-/l*79.3%
fma-def79.3%
fma-udef79.3%
*-commutative79.3%
fma-def79.3%
fma-def79.3%
Applied egg-rr79.3%
Taylor expanded in F around inf 98.4%
Taylor expanded in B around 0 82.3%
Final simplification84.5%
(FPCore (F B x)
:precision binary64
(if (<= F -0.15)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6.2e-197)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 0.0028)
(- (/ 1.0 B) (/ x (tan B)))
(- (/ F (/ (sin B) (/ 1.0 F))) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.15) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6.2e-197) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 0.0028) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = (F / (sin(B) / (1.0 / F))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.15d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6.2d-197)) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 0.0028d0) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = (f / (sin(b) / (1.0d0 / f))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.15) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6.2e-197) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 0.0028) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = (F / (Math.sin(B) / (1.0 / F))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.15: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6.2e-197: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) elif F <= 0.0028: tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = (F / (math.sin(B) / (1.0 / F))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.15) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6.2e-197) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 0.0028) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(F / Float64(sin(B) / Float64(1.0 / F))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.15) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6.2e-197) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); elseif (F <= 0.0028) tmp = (1.0 / B) - (x / tan(B)); else tmp = (F / (sin(B) / (1.0 / F))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.2e-197], N[(N[(N[(F / B), $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.0028], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.15:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.2 \cdot 10^{-197}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.0028:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\frac{1}{F}}} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.149999999999999994Initial program 53.6%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 87.0%
if -0.149999999999999994 < F < -6.20000000000000057e-197Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 67.8%
Taylor expanded in F around 0 67.9%
if -6.20000000000000057e-197 < F < 0.00279999999999999997Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around inf 33.4%
Taylor expanded in B around 0 52.5%
if 0.00279999999999999997 < F Initial program 66.0%
associate-*l/79.6%
+-commutative79.6%
*-commutative79.6%
fma-udef79.6%
fma-def79.6%
metadata-eval79.6%
metadata-eval79.6%
associate-/l*79.6%
fma-def79.6%
fma-udef79.6%
*-commutative79.6%
fma-def79.6%
fma-def79.6%
Applied egg-rr79.6%
Taylor expanded in F around inf 97.3%
Taylor expanded in B around 0 81.4%
Final simplification73.3%
(FPCore (F B x)
:precision binary64
(if (<= F -2.1e-5)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -8.4e-197)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 17.0)
(- (/ 1.0 B) (/ x (tan B)))
(- (/ F (/ (sin B) (/ 1.0 F))) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-5) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -8.4e-197) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 17.0) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = (F / (sin(B) / (1.0 / F))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.1d-5)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-8.4d-197)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 17.0d0) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = (f / (sin(b) / (1.0d0 / f))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-5) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -8.4e-197) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 17.0) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = (F / (Math.sin(B) / (1.0 / F))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.1e-5: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -8.4e-197: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 17.0: tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = (F / (math.sin(B) / (1.0 / F))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.1e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -8.4e-197) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 17.0) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(F / Float64(sin(B) / Float64(1.0 / F))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.1e-5) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -8.4e-197) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 17.0) tmp = (1.0 / B) - (x / tan(B)); else tmp = (F / (sin(B) / (1.0 / F))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.1e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8.4e-197], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 17.0], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.1 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -8.4 \cdot 10^{-197}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 17:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\frac{1}{F}}} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.09999999999999988e-5Initial program 53.6%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 87.0%
if -2.09999999999999988e-5 < F < -8.4e-197Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 67.8%
Taylor expanded in x around 0 67.8%
if -8.4e-197 < F < 17Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around inf 33.1%
Taylor expanded in B around 0 51.9%
if 17 < F Initial program 65.5%
associate-*l/79.4%
+-commutative79.4%
*-commutative79.4%
fma-udef79.4%
fma-def79.4%
metadata-eval79.4%
metadata-eval79.4%
associate-/l*79.3%
fma-def79.3%
fma-udef79.3%
*-commutative79.3%
fma-def79.3%
fma-def79.3%
Applied egg-rr79.3%
Taylor expanded in F around inf 98.4%
Taylor expanded in B around 0 82.3%
Final simplification73.3%
(FPCore (F B x)
:precision binary64
(if (<= F -0.48)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.2e-196)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 0.0136)
(- (/ 1.0 B) (/ x (tan B)))
(- (/ F (/ (sin B) (/ 1.0 F))) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.48) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.2e-196) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 0.0136) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = (F / (sin(B) / (1.0 / F))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.48d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.2d-196)) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 0.0136d0) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = (f / (sin(b) / (1.0d0 / f))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.48) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.2e-196) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 0.0136) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = (F / (Math.sin(B) / (1.0 / F))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.48: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.2e-196: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 0.0136: tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = (F / (math.sin(B) / (1.0 / F))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.48) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.2e-196) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 0.0136) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(F / Float64(sin(B) / Float64(1.0 / F))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.48) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.2e-196) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 0.0136) tmp = (1.0 / B) - (x / tan(B)); else tmp = (F / (sin(B) / (1.0 / F))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.48], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.2e-196], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.0136], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.48:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.2 \cdot 10^{-196}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 0.0136:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\frac{1}{F}}} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.47999999999999998Initial program 53.6%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 87.0%
if -0.47999999999999998 < F < -2.20000000000000015e-196Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 67.8%
if -2.20000000000000015e-196 < F < 0.0135999999999999992Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around inf 33.4%
Taylor expanded in B around 0 52.5%
if 0.0135999999999999992 < F Initial program 66.0%
associate-*l/79.6%
+-commutative79.6%
*-commutative79.6%
fma-udef79.6%
fma-def79.6%
metadata-eval79.6%
metadata-eval79.6%
associate-/l*79.6%
fma-def79.6%
fma-udef79.6%
*-commutative79.6%
fma-def79.6%
fma-def79.6%
Applied egg-rr79.6%
Taylor expanded in F around inf 97.3%
Taylor expanded in B around 0 81.4%
Final simplification73.3%
(FPCore (F B x)
:precision binary64
(if (<= F -1.4)
(/ (- -1.0 x) B)
(if (<= F -9.6e-197)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4) {
tmp = (-1.0 - x) / B;
} else if (F <= -9.6e-197) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-9.6d-197)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.4) {
tmp = (-1.0 - x) / B;
} else if (F <= -9.6e-197) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.4: tmp = (-1.0 - x) / B elif F <= -9.6e-197: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -9.6e-197) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.4) tmp = (-1.0 - x) / B; elseif (F <= -9.6e-197) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.4], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -9.6e-197], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -9.6 \cdot 10^{-197}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 53.6%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 53.2%
mul-1-neg53.2%
+-commutative53.2%
Simplified53.2%
if -1.3999999999999999 < F < -9.6000000000000003e-197Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 67.8%
Taylor expanded in x around 0 67.8%
if -9.6000000000000003e-197 < F Initial program 81.9%
+-commutative81.9%
unsub-neg81.9%
associate-*l/89.1%
associate-*r/89.0%
*-commutative89.0%
Simplified89.1%
Taylor expanded in F around inf 67.0%
Taylor expanded in B around 0 59.5%
Final simplification59.1%
(FPCore (F B x)
:precision binary64
(if (<= F -0.032)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -7.5e-196)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.032) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -7.5e-196) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.032d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-7.5d-196)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.032) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -7.5e-196) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.032: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -7.5e-196: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.032) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -7.5e-196) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.032) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -7.5e-196) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.032], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.5e-196], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.032:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -7.5 \cdot 10^{-196}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -0.032000000000000001Initial program 53.6%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 87.0%
if -0.032000000000000001 < F < -7.5e-196Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 67.8%
Taylor expanded in x around 0 67.8%
if -7.5e-196 < F Initial program 81.9%
+-commutative81.9%
unsub-neg81.9%
associate-*l/89.1%
associate-*r/89.0%
*-commutative89.0%
Simplified89.1%
Taylor expanded in F around inf 67.0%
Taylor expanded in B around 0 59.5%
Final simplification68.9%
(FPCore (F B x) :precision binary64 (if (<= F -1.25e-9) (/ (- -1.0 x) B) (- (/ 1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e-9) {
tmp = (-1.0 - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.25d-9)) then
tmp = ((-1.0d0) - x) / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e-9) {
tmp = (-1.0 - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.25e-9: tmp = (-1.0 - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.25e-9) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.25e-9) tmp = (-1.0 - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.25e-9], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.25 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.25e-9Initial program 54.2%
Taylor expanded in F around -inf 98.5%
Taylor expanded in B around 0 52.6%
mul-1-neg52.6%
+-commutative52.6%
Simplified52.6%
if -1.25e-9 < F Initial program 86.0%
+-commutative86.0%
unsub-neg86.0%
associate-*l/91.5%
associate-*r/91.4%
*-commutative91.4%
Simplified91.5%
Taylor expanded in F around inf 57.4%
Taylor expanded in B around 0 55.3%
Final simplification54.5%
(FPCore (F B x)
:precision binary64
(if (<= F -2e-37)
(/ (- -1.0 x) B)
(if (<= F 1.06e-89)
(- (* B (* x (- -0.3333333333333333))) (/ x B))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2e-37) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.06e-89) {
tmp = (B * (x * -(-0.3333333333333333))) - (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 <= (-2d-37)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.06d-89) then
tmp = (b * (x * -(-0.3333333333333333d0))) - (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 <= -2e-37) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.06e-89) {
tmp = (B * (x * -(-0.3333333333333333))) - (x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2e-37: tmp = (-1.0 - x) / B elif F <= 1.06e-89: tmp = (B * (x * -(-0.3333333333333333))) - (x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2e-37) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.06e-89) tmp = Float64(Float64(B * Float64(x * Float64(-(-0.3333333333333333)))) - 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 <= -2e-37) tmp = (-1.0 - x) / B; elseif (F <= 1.06e-89) tmp = (B * (x * -(-0.3333333333333333))) - (x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2e-37], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.06e-89], N[(N[(B * N[(x * (--0.3333333333333333)), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{-37}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.06 \cdot 10^{-89}:\\
\;\;\;\;B \cdot \left(x \cdot \left(--0.3333333333333333\right)\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.00000000000000013e-37Initial program 55.9%
Taylor expanded in F around -inf 95.0%
Taylor expanded in B around 0 50.9%
mul-1-neg50.9%
+-commutative50.9%
Simplified50.9%
if -2.00000000000000013e-37 < F < 1.0600000000000001e-89Initial program 99.6%
+-commutative99.6%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
distribute-lft-neg-in99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 70.1%
mul-1-neg70.1%
*-commutative70.1%
associate-*l/70.1%
distribute-rgt-neg-in70.1%
Simplified70.1%
Taylor expanded in B around 0 42.9%
+-commutative42.9%
mul-1-neg42.9%
unsub-neg42.9%
mul-1-neg42.9%
*-commutative42.9%
distribute-rgt-neg-in42.9%
distribute-rgt-out--42.9%
metadata-eval42.9%
Simplified42.9%
if 1.0600000000000001e-89 < F Initial program 72.0%
+-commutative72.0%
fma-def72.1%
+-commutative72.1%
*-commutative72.1%
fma-def72.1%
fma-def72.1%
metadata-eval72.1%
metadata-eval72.1%
distribute-lft-neg-in72.1%
associate-*r/72.1%
*-rgt-identity72.1%
Simplified72.1%
Taylor expanded in B around 0 40.2%
Taylor expanded in F around inf 44.9%
neg-mul-144.9%
unsub-neg44.9%
Simplified44.9%
Final simplification46.0%
(FPCore (F B x) :precision binary64 (if (<= F -5.8e-49) (/ (- -1.0 x) B) (if (<= F 4.7e-82) (- (/ x B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.8e-49) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.7e-82) {
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.8d-49)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.7d-82) 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.8e-49) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.7e-82) {
tmp = -(x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.8e-49: tmp = (-1.0 - x) / B elif F <= 4.7e-82: tmp = -(x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.8e-49) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.7e-82) 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.8e-49) tmp = (-1.0 - x) / B; elseif (F <= 4.7e-82) tmp = -(x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.8e-49], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.7e-82], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.8 \cdot 10^{-49}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.7 \cdot 10^{-82}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.8e-49Initial program 59.0%
Taylor expanded in F around -inf 89.9%
Taylor expanded in B around 0 48.8%
mul-1-neg48.8%
+-commutative48.8%
Simplified48.8%
if -5.8e-49 < F < 4.7000000000000001e-82Initial program 99.6%
+-commutative99.6%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 72.9%
mul-1-neg72.9%
*-commutative72.9%
associate-*l/72.9%
distribute-rgt-neg-in72.9%
Simplified72.9%
Taylor expanded in B around 0 43.9%
associate-*r/43.9%
neg-mul-143.9%
Simplified43.9%
if 4.7000000000000001e-82 < F Initial program 71.8%
+-commutative71.8%
fma-def71.8%
+-commutative71.8%
*-commutative71.8%
fma-def71.8%
fma-def71.8%
metadata-eval71.8%
metadata-eval71.8%
distribute-lft-neg-in71.8%
associate-*r/71.8%
*-rgt-identity71.8%
Simplified71.8%
Taylor expanded in B around 0 40.6%
Taylor expanded in F around inf 45.3%
neg-mul-145.3%
unsub-neg45.3%
Simplified45.3%
Final simplification46.0%
(FPCore (F B x) :precision binary64 (if (<= F 1.95e-82) (- (/ x B)) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.95e-82) {
tmp = -(x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 1.95d-82) then
tmp = -(x / b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 1.95e-82) {
tmp = -(x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.95e-82: tmp = -(x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.95e-82) tmp = Float64(-Float64(x / B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 1.95e-82) tmp = -(x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.95e-82], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.95 \cdot 10^{-82}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 1.94999999999999987e-82Initial program 79.3%
+-commutative79.3%
fma-def79.3%
+-commutative79.3%
*-commutative79.3%
fma-def79.3%
fma-def79.3%
metadata-eval79.3%
metadata-eval79.3%
distribute-lft-neg-in79.3%
associate-*r/79.3%
*-rgt-identity79.3%
Simplified79.3%
Taylor expanded in F around 0 53.2%
mul-1-neg53.2%
*-commutative53.2%
associate-*l/53.1%
distribute-rgt-neg-in53.1%
Simplified53.1%
Taylor expanded in B around 0 33.9%
associate-*r/33.9%
neg-mul-133.9%
Simplified33.9%
if 1.94999999999999987e-82 < F Initial program 71.8%
+-commutative71.8%
fma-def71.8%
+-commutative71.8%
*-commutative71.8%
fma-def71.8%
fma-def71.8%
metadata-eval71.8%
metadata-eval71.8%
distribute-lft-neg-in71.8%
associate-*r/71.8%
*-rgt-identity71.8%
Simplified71.8%
Taylor expanded in B around 0 40.6%
Taylor expanded in F around inf 45.3%
neg-mul-145.3%
unsub-neg45.3%
Simplified45.3%
Final simplification37.8%
(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 76.7%
+-commutative76.7%
fma-def76.7%
+-commutative76.7%
*-commutative76.7%
fma-def76.7%
fma-def76.7%
metadata-eval76.7%
metadata-eval76.7%
distribute-lft-neg-in76.7%
associate-*r/76.8%
*-rgt-identity76.8%
Simplified76.8%
Taylor expanded in F around 0 50.9%
mul-1-neg50.9%
*-commutative50.9%
associate-*l/50.8%
distribute-rgt-neg-in50.8%
Simplified50.8%
Taylor expanded in B around 0 31.4%
associate-*r/31.4%
neg-mul-131.4%
Simplified31.4%
Final simplification31.4%
herbie shell --seed 2023222
(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))))))