
(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 24 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 -3.8e+39)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 17500000.0)
(fma
(/ F (sin B))
(pow (fma x 2.0 (fma F F 2.0)) -0.5)
(/ (- x) (tan B)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.8e+39) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 17500000.0) {
tmp = fma((F / sin(B)), pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5), (-x / tan(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.8e+39) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 17500000.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(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.8e+39], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 17500000.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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.8 \cdot 10^{+39}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 17500000:\\
\;\;\;\;\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{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -3.7999999999999998e39Initial program 53.4%
distribute-lft-neg-in53.4%
+-commutative53.4%
cancel-sign-sub-inv53.4%
Simplified74.8%
clear-num74.7%
inv-pow74.7%
fma-def74.7%
fma-udef74.7%
*-commutative74.7%
fma-def74.7%
fma-def74.7%
Applied egg-rr74.7%
unpow-174.7%
Simplified74.7%
Taylor expanded in F around -inf 99.8%
if -3.7999999999999998e39 < F < 1.75e7Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
if 1.75e7 < F Initial program 57.4%
distribute-lft-neg-in57.4%
+-commutative57.4%
cancel-sign-sub-inv57.4%
Simplified75.5%
clear-num75.5%
inv-pow75.5%
fma-def75.5%
fma-udef75.5%
*-commutative75.5%
fma-def75.5%
fma-def75.5%
Applied egg-rr75.5%
unpow-175.5%
Simplified75.5%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4e+39)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 46000000.0)
(- (/ (/ F (sin B)) (sqrt (fma F F 2.0))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4e+39) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 46000000.0) {
tmp = ((F / sin(B)) / sqrt(fma(F, F, 2.0))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4e+39) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 46000000.0) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(fma(F, F, 2.0))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4e+39], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 46000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4 \cdot 10^{+39}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 46000000:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -3.99999999999999976e39Initial program 53.4%
distribute-lft-neg-in53.4%
+-commutative53.4%
cancel-sign-sub-inv53.4%
Simplified74.8%
clear-num74.7%
inv-pow74.7%
fma-def74.7%
fma-udef74.7%
*-commutative74.7%
fma-def74.7%
fma-def74.7%
Applied egg-rr74.7%
unpow-174.7%
Simplified74.7%
Taylor expanded in F around -inf 99.8%
if -3.99999999999999976e39 < F < 4.6e7Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.5%
clear-num99.5%
inv-pow99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
Taylor expanded in x around 0 99.5%
+-commutative99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
expm1-log1p-u85.9%
expm1-udef70.6%
un-div-inv70.6%
*-commutative70.6%
Applied egg-rr70.6%
expm1-def85.9%
expm1-log1p99.6%
*-commutative99.6%
associate-/r*99.5%
Simplified99.5%
if 4.6e7 < F Initial program 57.4%
distribute-lft-neg-in57.4%
+-commutative57.4%
cancel-sign-sub-inv57.4%
Simplified75.5%
clear-num75.5%
inv-pow75.5%
fma-def75.5%
fma-udef75.5%
*-commutative75.5%
fma-def75.5%
fma-def75.5%
Applied egg-rr75.5%
unpow-175.5%
Simplified75.5%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.8e+39)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 39000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.8e+39) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 39000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.8d+39)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 39000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.8e+39) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 39000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.8e+39: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 39000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.8e+39) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 39000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.8e+39) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 39000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.8e+39], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 39000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.8 \cdot 10^{+39}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 39000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -3.7999999999999998e39Initial program 53.4%
distribute-lft-neg-in53.4%
+-commutative53.4%
cancel-sign-sub-inv53.4%
Simplified74.8%
clear-num74.7%
inv-pow74.7%
fma-def74.7%
fma-udef74.7%
*-commutative74.7%
fma-def74.7%
fma-def74.7%
Applied egg-rr74.7%
unpow-174.7%
Simplified74.7%
Taylor expanded in F around -inf 99.8%
if -3.7999999999999998e39 < F < 3.9e7Initial program 99.4%
if 3.9e7 < F Initial program 57.4%
distribute-lft-neg-in57.4%
+-commutative57.4%
cancel-sign-sub-inv57.4%
Simplified75.5%
clear-num75.5%
inv-pow75.5%
fma-def75.5%
fma-udef75.5%
*-commutative75.5%
fma-def75.5%
fma-def75.5%
Applied egg-rr75.5%
unpow-175.5%
Simplified75.5%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.8e+39)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 22500000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.8e+39) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 22500000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.8d+39)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 22500000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.8e+39) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 22500000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.8e+39: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 22500000.0: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.8e+39) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 22500000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.8e+39) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 22500000.0) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.8e+39], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 22500000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.8 \cdot 10^{+39}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 22500000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -3.7999999999999998e39Initial program 53.4%
distribute-lft-neg-in53.4%
+-commutative53.4%
cancel-sign-sub-inv53.4%
Simplified74.8%
clear-num74.7%
inv-pow74.7%
fma-def74.7%
fma-udef74.7%
*-commutative74.7%
fma-def74.7%
fma-def74.7%
Applied egg-rr74.7%
unpow-174.7%
Simplified74.7%
Taylor expanded in F around -inf 99.8%
if -3.7999999999999998e39 < F < 2.25e7Initial program 99.4%
div-inv99.6%
clear-num99.5%
Applied egg-rr99.5%
if 2.25e7 < F Initial program 57.4%
distribute-lft-neg-in57.4%
+-commutative57.4%
cancel-sign-sub-inv57.4%
Simplified75.5%
clear-num75.5%
inv-pow75.5%
fma-def75.5%
fma-udef75.5%
*-commutative75.5%
fma-def75.5%
fma-def75.5%
Applied egg-rr75.5%
unpow-175.5%
Simplified75.5%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.9)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.9) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.9d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.9) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.9: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.9) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.9) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.9], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.9:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 55.6%
distribute-lft-neg-in55.6%
+-commutative55.6%
cancel-sign-sub-inv55.6%
Simplified76.0%
clear-num75.9%
inv-pow75.9%
fma-def75.9%
fma-udef75.9%
*-commutative75.9%
fma-def75.9%
fma-def75.9%
Applied egg-rr75.9%
unpow-175.9%
Simplified75.9%
Taylor expanded in F around -inf 99.7%
if -1.3999999999999999 < F < 0.900000000000000022Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.5%
Taylor expanded in F around 0 98.7%
Taylor expanded in x around 0 98.8%
if 0.900000000000000022 < F Initial program 58.0%
distribute-lft-neg-in58.0%
+-commutative58.0%
cancel-sign-sub-inv58.0%
Simplified75.8%
clear-num75.8%
inv-pow75.8%
fma-def75.8%
fma-udef75.8%
*-commutative75.8%
fma-def75.8%
fma-def75.8%
Applied egg-rr75.8%
unpow-175.8%
Simplified75.8%
Taylor expanded in x around 0 75.9%
+-commutative75.9%
unpow275.9%
fma-udef75.9%
Simplified75.9%
Taylor expanded in F around -inf 41.6%
mul-1-neg41.6%
Simplified41.6%
un-div-inv41.6%
*-commutative41.6%
associate-/r*41.6%
sub-neg41.6%
add-sqr-sqrt0.0%
sqrt-unprod75.3%
sqr-neg75.3%
sqrt-unprod98.6%
add-sqr-sqrt99.0%
distribute-neg-frac99.0%
add-sqr-sqrt99.0%
sqrt-unprod99.0%
sqr-neg99.0%
sqrt-unprod0.0%
add-sqr-sqrt99.4%
frac-2neg99.4%
Applied egg-rr99.4%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.8e-43)
(- (/ -1.0 (sin B)) t_0)
(if (or (<= F 1.6e-39) (not (<= F 0.00034)))
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)
(/ (* F (sqrt 0.5)) (sin B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5.8e-43) {
tmp = (-1.0 / sin(B)) - t_0;
} else if ((F <= 1.6e-39) || !(F <= 0.00034)) {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
} else {
tmp = (F * sqrt(0.5)) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-5.8d-43)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if ((f <= 1.6d-39) .or. (.not. (f <= 0.00034d0))) then
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
else
tmp = (f * sqrt(0.5d0)) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -5.8e-43) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if ((F <= 1.6e-39) || !(F <= 0.00034)) {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
} else {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5.8e-43: tmp = (-1.0 / math.sin(B)) - t_0 elif (F <= 1.6e-39) or not (F <= 0.00034): tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 else: tmp = (F * math.sqrt(0.5)) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.8e-43) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif ((F <= 1.6e-39) || !(F <= 0.00034)) tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); else tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -5.8e-43) tmp = (-1.0 / sin(B)) - t_0; elseif ((F <= 1.6e-39) || ~((F <= 0.00034))) tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; else tmp = (F * sqrt(0.5)) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8e-43], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[Or[LessEqual[F, 1.6e-39], N[Not[LessEqual[F, 0.00034]], $MachinePrecision]], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{-43}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-39} \lor \neg \left(F \leq 0.00034\right):\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\end{array}
\end{array}
if F < -5.8000000000000003e-43Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
cancel-sign-sub-inv61.2%
Simplified78.9%
clear-num78.9%
inv-pow78.9%
fma-def78.9%
fma-udef78.9%
*-commutative78.9%
fma-def78.9%
fma-def78.9%
Applied egg-rr78.9%
unpow-178.9%
Simplified78.9%
Taylor expanded in F around -inf 95.9%
if -5.8000000000000003e-43 < F < 1.5999999999999999e-39 or 3.4e-4 < F Initial program 82.5%
distribute-lft-neg-in82.5%
+-commutative82.5%
cancel-sign-sub-inv82.5%
Simplified89.9%
clear-num89.9%
inv-pow89.9%
fma-def89.9%
fma-udef89.9%
*-commutative89.9%
fma-def89.9%
fma-def89.9%
Applied egg-rr89.9%
unpow-189.9%
Simplified89.9%
Taylor expanded in x around 0 89.9%
+-commutative89.9%
unpow289.9%
fma-udef89.9%
Simplified89.9%
Taylor expanded in F around -inf 60.2%
mul-1-neg60.2%
Simplified60.2%
un-div-inv60.2%
*-commutative60.2%
associate-/r*60.2%
sub-neg60.2%
add-sqr-sqrt21.4%
sqrt-unprod73.9%
sqr-neg73.9%
sqrt-unprod62.0%
add-sqr-sqrt83.6%
distribute-neg-frac83.6%
add-sqr-sqrt62.1%
sqrt-unprod83.6%
sqr-neg83.6%
sqrt-unprod21.4%
add-sqr-sqrt83.8%
frac-2neg83.8%
Applied egg-rr83.8%
if 1.5999999999999999e-39 < F < 3.4e-4Initial program 99.0%
distribute-lft-neg-in99.0%
+-commutative99.0%
cancel-sign-sub-inv99.0%
Simplified99.0%
Taylor expanded in F around 0 94.2%
Taylor expanded in x around 0 93.9%
Final simplification87.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.017)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.5e-9)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.017) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.5e-9) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.017d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.5d-9) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.017) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.5e-9) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.017: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.5e-9: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.017) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.5e-9) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.017) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.5e-9) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.017], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.5e-9], 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[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.017:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-9}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.017000000000000001Initial program 56.3%
distribute-lft-neg-in56.3%
+-commutative56.3%
cancel-sign-sub-inv56.3%
Simplified76.3%
clear-num76.2%
inv-pow76.2%
fma-def76.2%
fma-udef76.2%
*-commutative76.2%
fma-def76.2%
fma-def76.2%
Applied egg-rr76.2%
unpow-176.2%
Simplified76.2%
Taylor expanded in F around -inf 98.3%
if -0.017000000000000001 < F < 1.49999999999999999e-9Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 89.4%
if 1.49999999999999999e-9 < F Initial program 59.1%
distribute-lft-neg-in59.1%
+-commutative59.1%
cancel-sign-sub-inv59.1%
Simplified76.4%
clear-num76.4%
inv-pow76.4%
fma-def76.4%
fma-udef76.4%
*-commutative76.4%
fma-def76.4%
fma-def76.4%
Applied egg-rr76.4%
unpow-176.4%
Simplified76.4%
Taylor expanded in x around 0 76.6%
+-commutative76.6%
unpow276.6%
fma-udef76.6%
Simplified76.6%
Taylor expanded in F around -inf 40.6%
mul-1-neg40.6%
Simplified40.6%
un-div-inv40.6%
*-commutative40.6%
associate-/r*40.6%
sub-neg40.6%
add-sqr-sqrt0.0%
sqrt-unprod73.3%
sqr-neg73.3%
sqrt-unprod96.0%
add-sqr-sqrt96.4%
distribute-neg-frac96.4%
add-sqr-sqrt96.4%
sqrt-unprod96.4%
sqr-neg96.4%
sqrt-unprod0.0%
add-sqr-sqrt97.1%
frac-2neg97.1%
Applied egg-rr97.1%
Final simplification93.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7.5e-44)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 7.5e-42)
(* (cos B) (/ (- x) (sin B)))
(if (<= F 0.00027)
(/ (* F (sqrt 0.5)) (sin B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7.5e-44) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 7.5e-42) {
tmp = cos(B) * (-x / sin(B));
} else if (F <= 0.00027) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-7.5d-44)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 7.5d-42) then
tmp = cos(b) * (-x / sin(b))
else if (f <= 0.00027d0) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -7.5e-44) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 7.5e-42) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else if (F <= 0.00027) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7.5e-44: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 7.5e-42: tmp = math.cos(B) * (-x / math.sin(B)) elif F <= 0.00027: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7.5e-44) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 7.5e-42) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); elseif (F <= 0.00027) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -7.5e-44) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 7.5e-42) tmp = cos(B) * (-x / sin(B)); elseif (F <= 0.00027) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.5e-44], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7.5e-42], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00027], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7.5 \cdot 10^{-44}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-42}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 0.00027:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -7.50000000000000008e-44Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
cancel-sign-sub-inv61.2%
Simplified78.9%
clear-num78.9%
inv-pow78.9%
fma-def78.9%
fma-udef78.9%
*-commutative78.9%
fma-def78.9%
fma-def78.9%
Applied egg-rr78.9%
unpow-178.9%
Simplified78.9%
Taylor expanded in F around -inf 95.9%
if -7.50000000000000008e-44 < F < 7.49999999999999972e-42Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 73.0%
mul-1-neg73.0%
associate-*l/73.0%
*-commutative73.0%
distribute-rgt-neg-in73.0%
Simplified73.0%
if 7.49999999999999972e-42 < F < 2.70000000000000003e-4Initial program 99.0%
distribute-lft-neg-in99.0%
+-commutative99.0%
cancel-sign-sub-inv99.0%
Simplified99.0%
Taylor expanded in F around 0 94.2%
Taylor expanded in x around 0 93.9%
if 2.70000000000000003e-4 < F Initial program 58.0%
distribute-lft-neg-in58.0%
+-commutative58.0%
cancel-sign-sub-inv58.0%
Simplified75.8%
clear-num75.8%
inv-pow75.8%
fma-def75.8%
fma-udef75.8%
*-commutative75.8%
fma-def75.8%
fma-def75.8%
Applied egg-rr75.8%
unpow-175.8%
Simplified75.8%
Taylor expanded in F around inf 99.0%
Final simplification87.3%
(FPCore (F B x)
:precision binary64
(if (<= F -4.5e-46)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 1.35e-40)
(/ (- x) (tan B))
(if (<= F 0.00345)
(/ F (/ (sin B) (sqrt 0.5)))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.5e-46) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 1.35e-40) {
tmp = -x / tan(B);
} else if (F <= 0.00345) {
tmp = F / (sin(B) / sqrt(0.5));
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.5d-46)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 1.35d-40) then
tmp = -x / tan(b)
else if (f <= 0.00345d0) then
tmp = f / (sin(b) / sqrt(0.5d0))
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.5e-46) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 1.35e-40) {
tmp = -x / Math.tan(B);
} else if (F <= 0.00345) {
tmp = F / (Math.sin(B) / Math.sqrt(0.5));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.5e-46: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 1.35e-40: tmp = -x / math.tan(B) elif F <= 0.00345: tmp = F / (math.sin(B) / math.sqrt(0.5)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.5e-46) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 1.35e-40) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.00345) tmp = Float64(F / Float64(sin(B) / sqrt(0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.5e-46) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 1.35e-40) tmp = -x / tan(B); elseif (F <= 0.00345) tmp = F / (sin(B) / sqrt(0.5)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.5e-46], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.35e-40], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00345], N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.5 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-40}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.00345:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.50000000000000001e-46Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
cancel-sign-sub-inv61.2%
Simplified78.9%
Taylor expanded in F around -inf 95.7%
associate-/r*95.8%
Simplified95.8%
Taylor expanded in B around 0 74.2%
if -4.50000000000000001e-46 < F < 1.35e-40Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 73.0%
expm1-log1p-u49.4%
expm1-udef27.5%
associate-/l*27.5%
quot-tan27.5%
Applied egg-rr27.5%
expm1-def49.4%
expm1-log1p73.0%
Simplified73.0%
if 1.35e-40 < F < 0.0034499999999999999Initial program 99.0%
distribute-lft-neg-in99.0%
+-commutative99.0%
cancel-sign-sub-inv99.0%
Simplified99.0%
Taylor expanded in F around 0 94.2%
Taylor expanded in x around 0 93.9%
associate-/l*93.7%
Simplified93.7%
if 0.0034499999999999999 < F Initial program 58.0%
Taylor expanded in F around inf 98.9%
Taylor expanded in B around 0 79.5%
Final simplification75.7%
(FPCore (F B x)
:precision binary64
(if (<= F -4.7e-45)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 8.5e-42)
(/ (- x) (tan B))
(if (<= F 0.12)
(/ (* F (sqrt 0.5)) (sin B))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.7e-45) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 8.5e-42) {
tmp = -x / tan(B);
} else if (F <= 0.12) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.7d-45)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 8.5d-42) then
tmp = -x / tan(b)
else if (f <= 0.12d0) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.7e-45) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 8.5e-42) {
tmp = -x / Math.tan(B);
} else if (F <= 0.12) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.7e-45: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 8.5e-42: tmp = -x / math.tan(B) elif F <= 0.12: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.7e-45) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 8.5e-42) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.12) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.7e-45) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 8.5e-42) tmp = -x / tan(B); elseif (F <= 0.12) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.7e-45], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e-42], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.12], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.7 \cdot 10^{-45}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-42}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.12:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.6999999999999998e-45Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
cancel-sign-sub-inv61.2%
Simplified78.9%
Taylor expanded in F around -inf 95.7%
associate-/r*95.8%
Simplified95.8%
Taylor expanded in B around 0 74.2%
if -4.6999999999999998e-45 < F < 8.4999999999999996e-42Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 73.0%
expm1-log1p-u49.4%
expm1-udef27.5%
associate-/l*27.5%
quot-tan27.5%
Applied egg-rr27.5%
expm1-def49.4%
expm1-log1p73.0%
Simplified73.0%
if 8.4999999999999996e-42 < F < 0.12Initial program 99.0%
distribute-lft-neg-in99.0%
+-commutative99.0%
cancel-sign-sub-inv99.0%
Simplified99.0%
Taylor expanded in F around 0 94.2%
Taylor expanded in x around 0 93.9%
if 0.12 < F Initial program 58.0%
Taylor expanded in F around inf 98.9%
Taylor expanded in B around 0 79.5%
Final simplification75.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.5e-43)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 8.5e-41)
(* (cos B) (/ (- x) (sin B)))
(if (<= F 0.00145)
(/ (* F (sqrt 0.5)) (sin B))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-43) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 8.5e-41) {
tmp = cos(B) * (-x / sin(B));
} else if (F <= 0.00145) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.5d-43)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 8.5d-41) then
tmp = cos(b) * (-x / sin(b))
else if (f <= 0.00145d0) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-43) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 8.5e-41) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else if (F <= 0.00145) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.5e-43: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 8.5e-41: tmp = math.cos(B) * (-x / math.sin(B)) elif F <= 0.00145: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.5e-43) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 8.5e-41) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); elseif (F <= 0.00145) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.5e-43) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 8.5e-41) tmp = cos(B) * (-x / sin(B)); elseif (F <= 0.00145) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.5e-43], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e-41], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00145], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.5 \cdot 10^{-43}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-41}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 0.00145:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.50000000000000002e-43Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
cancel-sign-sub-inv61.2%
Simplified78.9%
Taylor expanded in F around -inf 95.7%
associate-/r*95.8%
Simplified95.8%
Taylor expanded in B around 0 74.2%
if -1.50000000000000002e-43 < F < 8.4999999999999996e-41Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 73.0%
mul-1-neg73.0%
associate-*l/73.0%
*-commutative73.0%
distribute-rgt-neg-in73.0%
Simplified73.0%
if 8.4999999999999996e-41 < F < 0.00145Initial program 99.0%
distribute-lft-neg-in99.0%
+-commutative99.0%
cancel-sign-sub-inv99.0%
Simplified99.0%
Taylor expanded in F around 0 94.2%
Taylor expanded in x around 0 93.9%
if 0.00145 < F Initial program 58.0%
Taylor expanded in F around inf 98.9%
Taylor expanded in B around 0 79.5%
Final simplification75.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.5e-43)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.15e-40)
(* (cos B) (/ (- x) (sin B)))
(if (<= F 0.088)
(/ (* F (sqrt 0.5)) (sin B))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-43) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.15e-40) {
tmp = cos(B) * (-x / sin(B));
} else if (F <= 0.088) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.5d-43)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.15d-40) then
tmp = cos(b) * (-x / sin(b))
else if (f <= 0.088d0) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-43) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.15e-40) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else if (F <= 0.088) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.5e-43: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.15e-40: tmp = math.cos(B) * (-x / math.sin(B)) elif F <= 0.088: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.5e-43) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.15e-40) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); elseif (F <= 0.088) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.5e-43) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.15e-40) tmp = cos(B) * (-x / sin(B)); elseif (F <= 0.088) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.5e-43], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.15e-40], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.088], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.5 \cdot 10^{-43}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-40}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 0.088:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.50000000000000002e-43Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
cancel-sign-sub-inv61.2%
Simplified78.9%
clear-num78.9%
inv-pow78.9%
fma-def78.9%
fma-udef78.9%
*-commutative78.9%
fma-def78.9%
fma-def78.9%
Applied egg-rr78.9%
unpow-178.9%
Simplified78.9%
Taylor expanded in F around -inf 95.9%
if -1.50000000000000002e-43 < F < 1.15e-40Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 73.0%
mul-1-neg73.0%
associate-*l/73.0%
*-commutative73.0%
distribute-rgt-neg-in73.0%
Simplified73.0%
if 1.15e-40 < F < 0.087999999999999995Initial program 99.0%
distribute-lft-neg-in99.0%
+-commutative99.0%
cancel-sign-sub-inv99.0%
Simplified99.0%
Taylor expanded in F around 0 94.2%
Taylor expanded in x around 0 93.9%
if 0.087999999999999995 < F Initial program 58.0%
Taylor expanded in F around inf 98.9%
Taylor expanded in B around 0 79.5%
Final simplification81.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))))
(if (<= F -3.6e-47)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 6e-57)
t_0
(if (<= F 350.0)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 1.46e+44)
t_0
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B))))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double tmp;
if (F <= -3.6e-47) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 6e-57) {
tmp = t_0;
} else if (F <= 350.0) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 1.46e+44) {
tmp = t_0;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = -x / tan(b)
if (f <= (-3.6d-47)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 6d-57) then
tmp = t_0
else if (f <= 350.0d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 1.46d+44) then
tmp = t_0
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / Math.tan(B);
double tmp;
if (F <= -3.6e-47) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 6e-57) {
tmp = t_0;
} else if (F <= 350.0) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 1.46e+44) {
tmp = t_0;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) tmp = 0 if F <= -3.6e-47: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 6e-57: tmp = t_0 elif F <= 350.0: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 1.46e+44: tmp = t_0 else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) tmp = 0.0 if (F <= -3.6e-47) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 6e-57) tmp = t_0; elseif (F <= 350.0) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 1.46e+44) tmp = t_0; else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); tmp = 0.0; if (F <= -3.6e-47) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 6e-57) tmp = t_0; elseif (F <= 350.0) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 1.46e+44) tmp = t_0; else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.6e-47], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e-57], t$95$0, If[LessEqual[F, 350.0], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.46e+44], t$95$0, N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
\mathbf{if}\;F \leq -3.6 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-57}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 350:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 1.46 \cdot 10^{+44}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.59999999999999991e-47Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
cancel-sign-sub-inv61.2%
Simplified78.9%
Taylor expanded in F around -inf 95.7%
associate-/r*95.8%
Simplified95.8%
Taylor expanded in B around 0 74.2%
if -3.59999999999999991e-47 < F < 6.00000000000000001e-57 or 350 < F < 1.4599999999999999e44Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 72.6%
expm1-log1p-u48.3%
expm1-udef27.3%
associate-/l*27.3%
quot-tan27.3%
Applied egg-rr27.3%
expm1-def48.3%
expm1-log1p72.7%
Simplified72.7%
if 6.00000000000000001e-57 < F < 350Initial program 99.1%
distribute-lft-neg-in99.1%
+-commutative99.1%
cancel-sign-sub-inv99.1%
Simplified99.2%
Taylor expanded in F around 0 87.8%
Taylor expanded in B around 0 71.9%
Taylor expanded in x around 0 71.9%
if 1.4599999999999999e44 < F Initial program 52.2%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 53.6%
associate--l+53.6%
distribute-rgt-in53.6%
*-commutative53.6%
metadata-eval53.6%
distribute-rgt-out--53.6%
distribute-rgt-in53.6%
distribute-rgt-out--53.6%
metadata-eval53.6%
div-sub53.6%
Simplified53.6%
Final simplification68.3%
(FPCore (F B x)
:precision binary64
(if (<= F -4e-43)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 3e-57)
(/ (- x) (tan B))
(if (<= F 1.5e-9)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4e-43) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 3e-57) {
tmp = -x / tan(B);
} else if (F <= 1.5e-9) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4d-43)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 3d-57) then
tmp = -x / tan(b)
else if (f <= 1.5d-9) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4e-43) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 3e-57) {
tmp = -x / Math.tan(B);
} else if (F <= 1.5e-9) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4e-43: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 3e-57: tmp = -x / math.tan(B) elif F <= 1.5e-9: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4e-43) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 3e-57) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 1.5e-9) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4e-43) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 3e-57) tmp = -x / tan(B); elseif (F <= 1.5e-9) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4e-43], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-57], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.5e-9], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4 \cdot 10^{-43}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-57}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-9}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.00000000000000031e-43Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
cancel-sign-sub-inv61.2%
Simplified78.9%
Taylor expanded in F around -inf 95.7%
associate-/r*95.8%
Simplified95.8%
Taylor expanded in B around 0 74.2%
if -4.00000000000000031e-43 < F < 3.00000000000000001e-57Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 73.1%
expm1-log1p-u50.0%
expm1-udef27.4%
associate-/l*27.4%
quot-tan27.4%
Applied egg-rr27.4%
expm1-def50.0%
expm1-log1p73.2%
Simplified73.2%
if 3.00000000000000001e-57 < F < 1.49999999999999999e-9Initial program 99.1%
distribute-lft-neg-in99.1%
+-commutative99.1%
cancel-sign-sub-inv99.1%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 99.6%
Taylor expanded in x around 0 99.6%
if 1.49999999999999999e-9 < F Initial program 59.1%
Taylor expanded in F around inf 96.6%
Taylor expanded in B around 0 77.7%
Final simplification75.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))))
(if (<= F -1.85e+130)
t_0
(if (<= F -4.1e+39)
(+
(* B (- (* x 0.3333333333333333) 0.16666666666666666))
(/ (- -1.0 x) B))
(if (<= F 1.8e+44)
t_0
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B)))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double tmp;
if (F <= -1.85e+130) {
tmp = t_0;
} else if (F <= -4.1e+39) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 1.8e+44) {
tmp = t_0;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = -x / tan(b)
if (f <= (-1.85d+130)) then
tmp = t_0
else if (f <= (-4.1d+39)) then
tmp = (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0)) + (((-1.0d0) - x) / b)
else if (f <= 1.8d+44) then
tmp = t_0
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / Math.tan(B);
double tmp;
if (F <= -1.85e+130) {
tmp = t_0;
} else if (F <= -4.1e+39) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 1.8e+44) {
tmp = t_0;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) tmp = 0 if F <= -1.85e+130: tmp = t_0 elif F <= -4.1e+39: tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B) elif F <= 1.8e+44: tmp = t_0 else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) tmp = 0.0 if (F <= -1.85e+130) tmp = t_0; elseif (F <= -4.1e+39) tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 1.8e+44) tmp = t_0; else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); tmp = 0.0; if (F <= -1.85e+130) tmp = t_0; elseif (F <= -4.1e+39) tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B); elseif (F <= 1.8e+44) tmp = t_0; else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.85e+130], t$95$0, If[LessEqual[F, -4.1e+39], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.8e+44], t$95$0, N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
\mathbf{if}\;F \leq -1.85 \cdot 10^{+130}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -4.1 \cdot 10^{+39}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{+44}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.8500000000000001e130 or -4.10000000000000004e39 < F < 1.8e44Initial program 85.6%
distribute-lft-neg-in85.6%
+-commutative85.6%
fma-def85.6%
+-commutative85.6%
*-commutative85.6%
fma-def85.6%
fma-def85.6%
metadata-eval85.6%
metadata-eval85.6%
associate-*r/85.8%
*-rgt-identity85.8%
Simplified85.8%
Taylor expanded in F around 0 66.1%
expm1-log1p-u41.3%
expm1-udef27.4%
associate-/l*27.4%
quot-tan27.4%
Applied egg-rr27.4%
expm1-def41.3%
expm1-log1p66.1%
Simplified66.1%
if -1.8500000000000001e130 < F < -4.10000000000000004e39Initial program 82.7%
distribute-lft-neg-in82.7%
+-commutative82.7%
cancel-sign-sub-inv82.7%
Simplified99.6%
Taylor expanded in F around -inf 99.4%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 60.3%
if 1.8e44 < F Initial program 52.2%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 53.6%
associate--l+53.6%
distribute-rgt-in53.6%
*-commutative53.6%
metadata-eval53.6%
distribute-rgt-out--53.6%
distribute-rgt-in53.6%
distribute-rgt-out--53.6%
metadata-eval53.6%
div-sub53.6%
Simplified53.6%
Final simplification62.5%
(FPCore (F B x) :precision binary64 (if (or (<= x -1.8e-189) (not (<= x 2.25e-187))) (/ (- x) (tan B)) (/ F (/ B (sqrt 0.5)))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -1.8e-189) || !(x <= 2.25e-187)) {
tmp = -x / tan(B);
} else {
tmp = F / (B / sqrt(0.5));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-1.8d-189)) .or. (.not. (x <= 2.25d-187))) then
tmp = -x / tan(b)
else
tmp = f / (b / sqrt(0.5d0))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -1.8e-189) || !(x <= 2.25e-187)) {
tmp = -x / Math.tan(B);
} else {
tmp = F / (B / Math.sqrt(0.5));
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -1.8e-189) or not (x <= 2.25e-187): tmp = -x / math.tan(B) else: tmp = F / (B / math.sqrt(0.5)) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -1.8e-189) || !(x <= 2.25e-187)) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(F / Float64(B / sqrt(0.5))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -1.8e-189) || ~((x <= 2.25e-187))) tmp = -x / tan(B); else tmp = F / (B / sqrt(0.5)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -1.8e-189], N[Not[LessEqual[x, 2.25e-187]], $MachinePrecision]], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(F / N[(B / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{-189} \lor \neg \left(x \leq 2.25 \cdot 10^{-187}\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}}\\
\end{array}
\end{array}
if x < -1.80000000000000008e-189 or 2.2499999999999999e-187 < x Initial program 79.3%
distribute-lft-neg-in79.3%
+-commutative79.3%
fma-def79.3%
+-commutative79.3%
*-commutative79.3%
fma-def79.3%
fma-def79.3%
metadata-eval79.3%
metadata-eval79.3%
associate-*r/79.4%
*-rgt-identity79.4%
Simplified79.4%
Taylor expanded in F around 0 71.2%
expm1-log1p-u40.5%
expm1-udef29.9%
associate-/l*29.9%
quot-tan29.9%
Applied egg-rr29.9%
expm1-def40.5%
expm1-log1p71.3%
Simplified71.3%
if -1.80000000000000008e-189 < x < 2.2499999999999999e-187Initial program 69.3%
distribute-lft-neg-in69.3%
+-commutative69.3%
cancel-sign-sub-inv69.3%
Simplified70.8%
Taylor expanded in F around 0 54.1%
Taylor expanded in B around 0 31.9%
Taylor expanded in x around 0 29.1%
associate-/l*29.2%
Simplified29.2%
Final simplification61.8%
(FPCore (F B x)
:precision binary64
(if (<= F -4.6e-46)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 1.1e+44)
(/ (- x) (tan B))
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.6e-46) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 1.1e+44) {
tmp = -x / tan(B);
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.6d-46)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 1.1d+44) then
tmp = -x / tan(b)
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.6e-46) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 1.1e+44) {
tmp = -x / Math.tan(B);
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.6e-46: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 1.1e+44: tmp = -x / math.tan(B) else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.6e-46) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 1.1e+44) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.6e-46) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 1.1e+44) tmp = -x / tan(B); else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.6e-46], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.1e+44], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.6 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{+44}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.5999999999999998e-46Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
cancel-sign-sub-inv61.2%
Simplified78.9%
Taylor expanded in F around -inf 95.7%
associate-/r*95.8%
Simplified95.8%
Taylor expanded in B around 0 74.2%
if -4.5999999999999998e-46 < F < 1.09999999999999998e44Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 68.5%
expm1-log1p-u45.2%
expm1-udef25.9%
associate-/l*25.9%
quot-tan25.9%
Applied egg-rr25.9%
expm1-def45.2%
expm1-log1p68.5%
Simplified68.5%
if 1.09999999999999998e44 < F Initial program 52.2%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 53.6%
associate--l+53.6%
distribute-rgt-in53.6%
*-commutative53.6%
metadata-eval53.6%
distribute-rgt-out--53.6%
distribute-rgt-in53.6%
distribute-rgt-out--53.6%
metadata-eval53.6%
div-sub53.6%
Simplified53.6%
Final simplification66.4%
(FPCore (F B x)
:precision binary64
(if (<= F -3.8e+39)
(+ (* B (- (* x 0.3333333333333333) 0.16666666666666666)) (/ (- -1.0 x) B))
(if (<= F 3.7e-56)
(/ (- x) (sin B))
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e+39) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 3.7e-56) {
tmp = -x / sin(B);
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.8d+39)) then
tmp = (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0)) + (((-1.0d0) - x) / b)
else if (f <= 3.7d-56) then
tmp = -x / sin(b)
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e+39) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 3.7e-56) {
tmp = -x / Math.sin(B);
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.8e+39: tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B) elif F <= 3.7e-56: tmp = -x / math.sin(B) else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.8e+39) tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 3.7e-56) tmp = Float64(Float64(-x) / sin(B)); else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.8e+39) tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B); elseif (F <= 3.7e-56) tmp = -x / sin(B); else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.8e+39], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.7e-56], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.8 \cdot 10^{+39}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{-56}:\\
\;\;\;\;\frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.7999999999999998e39Initial program 53.4%
distribute-lft-neg-in53.4%
+-commutative53.4%
cancel-sign-sub-inv53.4%
Simplified74.8%
Taylor expanded in F around -inf 99.5%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 52.2%
if -3.7999999999999998e39 < F < 3.7000000000000002e-56Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 71.8%
Taylor expanded in B around 0 35.9%
if 3.7000000000000002e-56 < F Initial program 62.5%
Taylor expanded in F around inf 91.3%
Taylor expanded in B around 0 49.2%
associate--l+49.2%
distribute-rgt-in49.2%
*-commutative49.2%
metadata-eval49.2%
distribute-rgt-out--49.2%
distribute-rgt-in49.2%
distribute-rgt-out--49.2%
metadata-eval49.2%
div-sub49.2%
Simplified49.2%
Final simplification43.9%
(FPCore (F B x)
:precision binary64
(if (<= F -2.9e-43)
(/ (- -1.0 x) B)
(if (<= F 1.4e-97)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.9e-43) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.4e-97) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.9d-43)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.4d-97) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.9e-43) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.4e-97) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.9e-43: tmp = (-1.0 - x) / B elif F <= 1.4e-97: tmp = (-x / B) - (B * (x * -0.3333333333333333)) else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.9e-43) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.4e-97) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.9e-43) tmp = (-1.0 - x) / B; elseif (F <= 1.4e-97) tmp = (-x / B) - (B * (x * -0.3333333333333333)); else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.9e-43], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.4e-97], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.9 \cdot 10^{-43}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-97}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.9000000000000001e-43Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
cancel-sign-sub-inv61.2%
Simplified78.9%
Taylor expanded in F around -inf 95.7%
associate-/r*95.8%
Simplified95.8%
Taylor expanded in B around 0 48.1%
associate-*r/48.1%
distribute-lft-in48.1%
metadata-eval48.1%
neg-mul-148.1%
Simplified48.1%
if -2.9000000000000001e-43 < F < 1.4000000000000001e-97Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 73.9%
mul-1-neg73.9%
associate-*l/74.0%
*-commutative74.0%
distribute-rgt-neg-in74.0%
Simplified74.0%
Taylor expanded in B around 0 34.6%
distribute-lft-out34.6%
mul-1-neg34.6%
fma-def34.6%
distribute-rgt-out--34.6%
metadata-eval34.6%
Simplified34.6%
fma-udef34.6%
+-commutative34.6%
Applied egg-rr34.6%
if 1.4000000000000001e-97 < F Initial program 65.8%
Taylor expanded in F around inf 86.8%
Taylor expanded in B around 0 46.3%
associate--l+46.3%
distribute-rgt-in46.3%
*-commutative46.3%
metadata-eval46.3%
distribute-rgt-out--46.3%
distribute-rgt-in46.3%
distribute-rgt-out--46.3%
metadata-eval46.3%
div-sub46.3%
Simplified46.3%
Final simplification42.5%
(FPCore (F B x)
:precision binary64
(if (<= F -7.5e-44)
(/ (- -1.0 x) B)
(if (<= F 4.2e-63)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.5e-44) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.2e-63) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} 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 <= (-7.5d-44)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.2d-63) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
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 <= -7.5e-44) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.2e-63) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.5e-44: tmp = (-1.0 - x) / B elif F <= 4.2e-63: tmp = (-x / B) - (B * (x * -0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.5e-44) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.2e-63) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.5e-44) tmp = (-1.0 - x) / B; elseif (F <= 4.2e-63) tmp = (-x / B) - (B * (x * -0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.5e-44], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.2e-63], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.5 \cdot 10^{-44}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-63}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.50000000000000008e-44Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
cancel-sign-sub-inv61.2%
Simplified78.9%
Taylor expanded in F around -inf 95.7%
associate-/r*95.8%
Simplified95.8%
Taylor expanded in B around 0 48.1%
associate-*r/48.1%
distribute-lft-in48.1%
metadata-eval48.1%
neg-mul-148.1%
Simplified48.1%
if -7.50000000000000008e-44 < F < 4.2e-63Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 73.6%
mul-1-neg73.6%
associate-*l/73.6%
*-commutative73.6%
distribute-rgt-neg-in73.6%
Simplified73.6%
Taylor expanded in B around 0 33.7%
distribute-lft-out33.7%
mul-1-neg33.7%
fma-def33.7%
distribute-rgt-out--33.7%
metadata-eval33.7%
Simplified33.7%
fma-udef33.7%
+-commutative33.7%
Applied egg-rr33.7%
if 4.2e-63 < F Initial program 63.4%
Taylor expanded in F around inf 89.3%
Taylor expanded in B around 0 48.0%
Final simplification42.4%
(FPCore (F B x)
:precision binary64
(if (<= F -6.5e-45)
(/ (- -1.0 x) B)
(if (<= F 2.4e-63)
(* x (- (/ -1.0 B) (* B -0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.5e-45) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.4e-63) {
tmp = x * ((-1.0 / B) - (B * -0.3333333333333333));
} 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 <= (-6.5d-45)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.4d-63) then
tmp = x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0)))
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 <= -6.5e-45) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.4e-63) {
tmp = x * ((-1.0 / B) - (B * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.5e-45: tmp = (-1.0 - x) / B elif F <= 2.4e-63: tmp = x * ((-1.0 / B) - (B * -0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.5e-45) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.4e-63) tmp = Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.5e-45) tmp = (-1.0 - x) / B; elseif (F <= 2.4e-63) tmp = x * ((-1.0 / B) - (B * -0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.5e-45], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.4e-63], N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.5 \cdot 10^{-45}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-63}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6.4999999999999995e-45Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
cancel-sign-sub-inv61.2%
Simplified78.9%
Taylor expanded in F around -inf 95.7%
associate-/r*95.8%
Simplified95.8%
Taylor expanded in B around 0 48.1%
associate-*r/48.1%
distribute-lft-in48.1%
metadata-eval48.1%
neg-mul-148.1%
Simplified48.1%
if -6.4999999999999995e-45 < F < 2.4000000000000001e-63Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 73.6%
mul-1-neg73.6%
associate-*l/73.6%
*-commutative73.6%
distribute-rgt-neg-in73.6%
Simplified73.6%
Taylor expanded in B around 0 33.7%
distribute-lft-out33.7%
mul-1-neg33.7%
fma-def33.7%
distribute-rgt-out--33.7%
metadata-eval33.7%
Simplified33.7%
Taylor expanded in x around 0 33.6%
if 2.4000000000000001e-63 < F Initial program 63.4%
Taylor expanded in F around inf 89.3%
Taylor expanded in B around 0 48.0%
Final simplification42.4%
(FPCore (F B x) :precision binary64 (if (<= F -2.5e-43) (/ (- -1.0 x) B) (if (<= F 5e-138) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.5e-43) {
tmp = (-1.0 - x) / B;
} else if (F <= 5e-138) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.5d-43)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 5d-138) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.5e-43) {
tmp = (-1.0 - x) / B;
} else if (F <= 5e-138) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.5e-43: tmp = (-1.0 - x) / B elif F <= 5e-138: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.5e-43) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 5e-138) 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 <= -2.5e-43) tmp = (-1.0 - x) / B; elseif (F <= 5e-138) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.5e-43], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5e-138], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.5 \cdot 10^{-43}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-138}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.50000000000000009e-43Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
cancel-sign-sub-inv61.2%
Simplified78.9%
Taylor expanded in F around -inf 95.7%
associate-/r*95.8%
Simplified95.8%
Taylor expanded in B around 0 48.1%
associate-*r/48.1%
distribute-lft-in48.1%
metadata-eval48.1%
neg-mul-148.1%
Simplified48.1%
if -2.50000000000000009e-43 < F < 4.99999999999999989e-138Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 76.2%
mul-1-neg76.2%
associate-*l/76.3%
*-commutative76.3%
distribute-rgt-neg-in76.3%
Simplified76.3%
Taylor expanded in B around 0 35.8%
associate-*r/35.8%
neg-mul-135.8%
Simplified35.8%
if 4.99999999999999989e-138 < F Initial program 68.2%
Taylor expanded in F around inf 81.9%
Taylor expanded in B around 0 43.1%
Final simplification42.0%
(FPCore (F B x) :precision binary64 (if (<= F 4.4e-138) (/ (- x) B) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 4.4e-138) {
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 <= 4.4d-138) 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 <= 4.4e-138) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 4.4e-138: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 4.4e-138) 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 <= 4.4e-138) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 4.4e-138], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 4.4 \cdot 10^{-138}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 4.3999999999999998e-138Initial program 82.4%
distribute-lft-neg-in82.4%
+-commutative82.4%
fma-def82.4%
+-commutative82.4%
*-commutative82.4%
fma-def82.4%
fma-def82.4%
metadata-eval82.4%
metadata-eval82.4%
associate-*r/82.5%
*-rgt-identity82.5%
Simplified82.5%
Taylor expanded in F around 0 66.0%
mul-1-neg66.0%
associate-*l/66.0%
*-commutative66.0%
distribute-rgt-neg-in66.0%
Simplified66.0%
Taylor expanded in B around 0 32.0%
associate-*r/32.0%
neg-mul-132.0%
Simplified32.0%
if 4.3999999999999998e-138 < F Initial program 68.2%
Taylor expanded in F around inf 81.9%
Taylor expanded in B around 0 43.1%
Final simplification36.2%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(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 77.0%
distribute-lft-neg-in77.0%
+-commutative77.0%
fma-def77.0%
+-commutative77.0%
*-commutative77.0%
fma-def77.0%
fma-def77.0%
metadata-eval77.0%
metadata-eval77.0%
associate-*r/77.1%
*-rgt-identity77.1%
Simplified77.1%
Taylor expanded in F around 0 57.4%
mul-1-neg57.4%
associate-*l/57.4%
*-commutative57.4%
distribute-rgt-neg-in57.4%
Simplified57.4%
Taylor expanded in B around 0 28.8%
associate-*r/28.8%
neg-mul-128.8%
Simplified28.8%
Final simplification28.8%
herbie shell --seed 2023285
(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))))))