
(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 -1e+30)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 40000.0)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e+30) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 40000.0) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e+30) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 40000.0) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 40000.0], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+30}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 40000:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1e30Initial program 47.0%
Taylor expanded in F around -inf 99.8%
expm1-log1p-u47.0%
expm1-udef46.8%
div-inv46.8%
neg-mul-146.8%
fma-def46.8%
Applied egg-rr46.8%
expm1-def47.0%
expm1-log1p99.8%
rem-log-exp40.6%
fma-udef40.6%
neg-mul-140.6%
prod-exp37.0%
*-commutative37.0%
prod-exp40.6%
rem-log-exp99.8%
unsub-neg99.8%
Simplified99.8%
if -1e30 < F < 4e4Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
if 4e4 < F Initial program 60.5%
Taylor expanded in F around inf 99.7%
expm1-log1p-u54.6%
expm1-udef54.6%
div-inv54.6%
neg-mul-154.6%
fma-def54.6%
Applied egg-rr54.6%
expm1-def54.6%
expm1-log1p99.7%
fma-udef99.7%
neg-mul-199.7%
+-commutative99.7%
unsub-neg99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -500000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 105000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ (* x (cos B)) (sin B)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -500000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 105000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - ((x * cos(B)) / sin(B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-500000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 105000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - ((x * cos(b)) / sin(b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -500000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 105000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - ((x * Math.cos(B)) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -500000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 105000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - ((x * math.cos(B)) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -500000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 105000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(Float64(x * cos(B)) / 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 <= -500000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 105000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - ((x * cos(B)) / sin(B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -500000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 105000000.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[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[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 -500000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 105000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -5e8Initial program 49.9%
Taylor expanded in F around -inf 99.8%
expm1-log1p-u46.9%
expm1-udef46.7%
div-inv46.7%
neg-mul-146.7%
fma-def46.7%
Applied egg-rr46.7%
expm1-def46.9%
expm1-log1p99.8%
rem-log-exp41.3%
fma-udef41.3%
neg-mul-141.3%
prod-exp37.8%
*-commutative37.8%
prod-exp41.3%
rem-log-exp99.8%
unsub-neg99.8%
Simplified99.8%
if -5e8 < F < 1.05e8Initial program 99.6%
Taylor expanded in x around 0 99.6%
if 1.05e8 < F Initial program 60.0%
Taylor expanded in F around inf 99.7%
expm1-log1p-u55.4%
expm1-udef55.4%
div-inv55.4%
neg-mul-155.4%
fma-def55.4%
Applied egg-rr55.4%
expm1-def55.4%
expm1-log1p99.7%
fma-udef99.7%
neg-mul-199.7%
+-commutative99.7%
unsub-neg99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -102000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 40000.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 <= -102000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 40000.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 <= (-102000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 40000.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 <= -102000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 40000.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 <= -102000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 40000.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 <= -102000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 40000.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 <= -102000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 40000.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, -102000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 40000.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 -102000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 40000:\\
\;\;\;\;\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 < -1.02e8Initial program 49.9%
Taylor expanded in F around -inf 99.8%
expm1-log1p-u46.9%
expm1-udef46.7%
div-inv46.7%
neg-mul-146.7%
fma-def46.7%
Applied egg-rr46.7%
expm1-def46.9%
expm1-log1p99.8%
rem-log-exp41.3%
fma-udef41.3%
neg-mul-141.3%
prod-exp37.8%
*-commutative37.8%
prod-exp41.3%
rem-log-exp99.8%
unsub-neg99.8%
Simplified99.8%
if -1.02e8 < F < 4e4Initial program 99.6%
if 4e4 < F Initial program 60.5%
Taylor expanded in F around inf 99.7%
expm1-log1p-u54.6%
expm1-udef54.6%
div-inv54.6%
neg-mul-154.6%
fma-def54.6%
Applied egg-rr54.6%
expm1-def54.6%
expm1-log1p99.7%
fma-udef99.7%
neg-mul-199.7%
+-commutative99.7%
unsub-neg99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.84)
(+
(* x (/ -1.0 (tan B)))
(/ F (- (/ (* (sin B) (- -1.0 x)) F) (* F (sin B)))))
(if (<= F 0.00095)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.84) {
tmp = (x * (-1.0 / tan(B))) + (F / (((sin(B) * (-1.0 - x)) / F) - (F * sin(B))));
} else if (F <= 0.00095) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.84d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + (f / (((sin(b) * ((-1.0d0) - x)) / f) - (f * sin(b))))
else if (f <= 0.00095d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.84) {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (((Math.sin(B) * (-1.0 - x)) / F) - (F * Math.sin(B))));
} else if (F <= 0.00095) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.84: tmp = (x * (-1.0 / math.tan(B))) + (F / (((math.sin(B) * (-1.0 - x)) / F) - (F * math.sin(B)))) elif F <= 0.00095: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.84) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(Float64(Float64(sin(B) * Float64(-1.0 - x)) / F) - Float64(F * sin(B))))); elseif (F <= 0.00095) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.84) tmp = (x * (-1.0 / tan(B))) + (F / (((sin(B) * (-1.0 - x)) / F) - (F * sin(B)))); elseif (F <= 0.00095) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.84], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(N[(N[(N[Sin[B], $MachinePrecision] * N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision] - N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00095], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.84:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\frac{\sin B \cdot \left(-1 - x\right)}{F} - F \cdot \sin B}\\
\mathbf{elif}\;F \leq 0.00095:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.839999999999999969Initial program 50.6%
associate-*l/60.5%
+-commutative60.5%
*-commutative60.5%
fma-udef60.5%
fma-def60.5%
metadata-eval60.5%
metadata-eval60.5%
associate-/l*60.4%
fma-def60.4%
fma-udef60.4%
*-commutative60.4%
fma-def60.4%
fma-def60.4%
Applied egg-rr60.4%
Taylor expanded in F around -inf 99.6%
mul-1-neg99.6%
unsub-neg99.6%
associate-*r/99.6%
associate-*r*99.6%
distribute-lft-in99.6%
metadata-eval99.6%
associate-*r*99.6%
metadata-eval99.6%
neg-mul-199.6%
*-commutative99.6%
Simplified99.6%
if -0.839999999999999969 < F < 9.49999999999999998e-4Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.5%
if 9.49999999999999998e-4 < F Initial program 62.1%
Taylor expanded in F around inf 98.6%
expm1-log1p-u52.7%
expm1-udef52.6%
div-inv52.6%
neg-mul-152.6%
fma-def52.6%
Applied egg-rr52.6%
expm1-def52.7%
expm1-log1p98.7%
fma-udef98.7%
neg-mul-198.7%
+-commutative98.7%
unsub-neg98.7%
Simplified98.7%
Final simplification99.3%
(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.00095)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.00095) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.00095d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.00095) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.00095: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.00095) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.00095) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.00095], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.00095:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 50.6%
Taylor expanded in F around -inf 99.5%
expm1-log1p-u47.3%
expm1-udef47.2%
div-inv47.2%
neg-mul-147.2%
fma-def47.2%
Applied egg-rr47.2%
expm1-def47.3%
expm1-log1p99.5%
rem-log-exp41.8%
fma-udef41.8%
neg-mul-141.8%
prod-exp38.4%
*-commutative38.4%
prod-exp41.8%
rem-log-exp99.5%
unsub-neg99.5%
Simplified99.5%
if -1.3999999999999999 < F < 9.49999999999999998e-4Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.5%
if 9.49999999999999998e-4 < F Initial program 62.1%
Taylor expanded in F around inf 98.6%
expm1-log1p-u52.7%
expm1-udef52.6%
div-inv52.6%
neg-mul-152.6%
fma-def52.6%
Applied egg-rr52.6%
expm1-def52.7%
expm1-log1p98.7%
fma-udef98.7%
neg-mul-198.7%
+-commutative98.7%
unsub-neg98.7%
Simplified98.7%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.55)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.00095)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.55) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.00095) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.55d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.00095d0) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.55) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.00095) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.55: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.00095: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.55) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.00095) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.55) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.00095) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.55], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.00095], 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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.55:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.00095:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.55000000000000004Initial program 50.6%
Taylor expanded in F around -inf 99.5%
expm1-log1p-u47.3%
expm1-udef47.2%
div-inv47.2%
neg-mul-147.2%
fma-def47.2%
Applied egg-rr47.2%
expm1-def47.3%
expm1-log1p99.5%
rem-log-exp41.8%
fma-udef41.8%
neg-mul-141.8%
prod-exp38.4%
*-commutative38.4%
prod-exp41.8%
rem-log-exp99.5%
unsub-neg99.5%
Simplified99.5%
if -0.55000000000000004 < F < 9.49999999999999998e-4Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 88.0%
if 9.49999999999999998e-4 < F Initial program 62.1%
Taylor expanded in F around inf 98.6%
expm1-log1p-u52.7%
expm1-udef52.6%
div-inv52.6%
neg-mul-152.6%
fma-def52.6%
Applied egg-rr52.6%
expm1-def52.7%
expm1-log1p98.7%
fma-udef98.7%
neg-mul-198.7%
+-commutative98.7%
unsub-neg98.7%
Simplified98.7%
Final simplification94.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e+154)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.7e-87)
(- (/ (- F) (* F B)) t_0)
(if (<= F 6.4e-66) (/ (- (cos B)) (/ (sin B) x)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e+154) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.7e-87) {
tmp = (-F / (F * B)) - t_0;
} else if (F <= 6.4e-66) {
tmp = -cos(B) / (sin(B) / x);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1d+154)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.7d-87)) then
tmp = (-f / (f * b)) - t_0
else if (f <= 6.4d-66) then
tmp = -cos(b) / (sin(b) / x)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1e+154) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.7e-87) {
tmp = (-F / (F * B)) - t_0;
} else if (F <= 6.4e-66) {
tmp = -Math.cos(B) / (Math.sin(B) / x);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1e+154: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.7e-87: tmp = (-F / (F * B)) - t_0 elif F <= 6.4e-66: tmp = -math.cos(B) / (math.sin(B) / x) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e+154) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.7e-87) tmp = Float64(Float64(Float64(-F) / Float64(F * B)) - t_0); elseif (F <= 6.4e-66) tmp = Float64(Float64(-cos(B)) / Float64(sin(B) / x)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1e+154) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.7e-87) tmp = (-F / (F * B)) - t_0; elseif (F <= 6.4e-66) tmp = -cos(B) / (sin(B) / x); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+154], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.7e-87], N[(N[((-F) / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6.4e-66], N[((-N[Cos[B], $MachinePrecision]) / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+154}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.7 \cdot 10^{-87}:\\
\;\;\;\;\frac{-F}{F \cdot B} - t_0\\
\mathbf{elif}\;F \leq 6.4 \cdot 10^{-66}:\\
\;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -1.00000000000000004e154Initial program 21.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 83.0%
if -1.00000000000000004e154 < F < -3.7000000000000002e-87Initial program 95.6%
Taylor expanded in F around -inf 75.1%
Taylor expanded in B around 0 66.7%
expm1-log1p-u27.7%
expm1-udef27.1%
+-commutative27.1%
fma-def27.1%
div-inv27.1%
Applied egg-rr27.1%
expm1-def27.7%
expm1-log1p66.9%
fma-neg66.9%
*-commutative66.9%
times-frac70.8%
mul-1-neg70.8%
Simplified70.8%
if -3.7000000000000002e-87 < F < 6.39999999999999963e-66Initial program 99.6%
Taylor expanded in F around -inf 41.9%
Taylor expanded in B around 0 51.3%
Taylor expanded in x around inf 70.6%
mul-1-neg70.6%
associate-/l*70.5%
Simplified70.5%
if 6.39999999999999963e-66 < F Initial program 67.1%
+-commutative67.1%
unsub-neg67.1%
associate-*l/79.5%
associate-*r/79.4%
*-commutative79.4%
Simplified79.5%
Taylor expanded in F around inf 89.8%
Taylor expanded in B around 0 76.1%
Final simplification74.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.3e+154)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -7.6e-87)
(- (/ (- F) (* F B)) t_0)
(if (<= F 2e-66) (/ (* (cos B) (- x)) (sin B)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.3e+154) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -7.6e-87) {
tmp = (-F / (F * B)) - t_0;
} else if (F <= 2e-66) {
tmp = (cos(B) * -x) / sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.3d+154)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-7.6d-87)) then
tmp = (-f / (f * b)) - t_0
else if (f <= 2d-66) then
tmp = (cos(b) * -x) / sin(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.3e+154) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -7.6e-87) {
tmp = (-F / (F * B)) - t_0;
} else if (F <= 2e-66) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.3e+154: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -7.6e-87: tmp = (-F / (F * B)) - t_0 elif F <= 2e-66: tmp = (math.cos(B) * -x) / math.sin(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.3e+154) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -7.6e-87) tmp = Float64(Float64(Float64(-F) / Float64(F * B)) - t_0); elseif (F <= 2e-66) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.3e+154) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -7.6e-87) tmp = (-F / (F * B)) - t_0; elseif (F <= 2e-66) tmp = (cos(B) * -x) / sin(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.3e+154], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.6e-87], N[(N[((-F) / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2e-66], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.3 \cdot 10^{+154}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -7.6 \cdot 10^{-87}:\\
\;\;\;\;\frac{-F}{F \cdot B} - t_0\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-66}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -2.3e154Initial program 21.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 83.0%
if -2.3e154 < F < -7.6e-87Initial program 95.6%
Taylor expanded in F around -inf 75.1%
Taylor expanded in B around 0 66.7%
expm1-log1p-u27.7%
expm1-udef27.1%
+-commutative27.1%
fma-def27.1%
div-inv27.1%
Applied egg-rr27.1%
expm1-def27.7%
expm1-log1p66.9%
fma-neg66.9%
*-commutative66.9%
times-frac70.8%
mul-1-neg70.8%
Simplified70.8%
if -7.6e-87 < F < 2e-66Initial program 99.6%
Taylor expanded in F around -inf 41.9%
Taylor expanded in x around inf 70.6%
mul-1-neg70.6%
*-commutative70.6%
Simplified70.6%
if 2e-66 < F Initial program 67.1%
+-commutative67.1%
unsub-neg67.1%
associate-*l/79.5%
associate-*r/79.4%
*-commutative79.4%
Simplified79.5%
Taylor expanded in F around inf 89.8%
Taylor expanded in B around 0 76.1%
Final simplification74.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.5e-9)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 5.5e-45)
(/ (* (cos B) (- x)) (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 <= -6.5e-9) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 5.5e-45) {
tmp = (cos(B) * -x) / 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 <= (-6.5d-9)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 5.5d-45) then
tmp = (cos(b) * -x) / 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 <= -6.5e-9) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 5.5e-45) {
tmp = (Math.cos(B) * -x) / 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 <= -6.5e-9: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 5.5e-45: tmp = (math.cos(B) * -x) / 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 <= -6.5e-9) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 5.5e-45) tmp = Float64(Float64(cos(B) * Float64(-x)) / 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 <= -6.5e-9) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 5.5e-45) tmp = (cos(B) * -x) / 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, -6.5e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.5e-45], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $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 -6.5 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-45}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -6.5000000000000003e-9Initial program 50.6%
Taylor expanded in F around -inf 99.5%
expm1-log1p-u47.3%
expm1-udef47.2%
div-inv47.2%
neg-mul-147.2%
fma-def47.2%
Applied egg-rr47.2%
expm1-def47.3%
expm1-log1p99.5%
rem-log-exp41.8%
fma-udef41.8%
neg-mul-141.8%
prod-exp38.4%
*-commutative38.4%
prod-exp41.8%
rem-log-exp99.5%
unsub-neg99.5%
Simplified99.5%
if -6.5000000000000003e-9 < F < 5.5000000000000003e-45Initial program 99.6%
Taylor expanded in F around -inf 42.4%
Taylor expanded in x around inf 66.3%
mul-1-neg66.3%
*-commutative66.3%
Simplified66.3%
if 5.5000000000000003e-45 < F Initial program 65.0%
Taylor expanded in F around inf 94.0%
expm1-log1p-u50.1%
expm1-udef50.1%
div-inv50.1%
neg-mul-150.1%
fma-def50.1%
Applied egg-rr50.1%
expm1-def50.1%
expm1-log1p94.1%
fma-udef94.1%
neg-mul-194.1%
+-commutative94.1%
unsub-neg94.1%
Simplified94.1%
Final simplification84.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.5e-9)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.55e-68) (/ (* (cos B) (- x)) (sin B)) (- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.5e-9) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.55e-68) {
tmp = (cos(B) * -x) / sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6.5d-9)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.55d-68) then
tmp = (cos(b) * -x) / sin(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6.5e-9) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.55e-68) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6.5e-9: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.55e-68: tmp = (math.cos(B) * -x) / math.sin(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.5e-9) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.55e-68) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.5e-9) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.55e-68) tmp = (cos(B) * -x) / sin(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.5e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.55e-68], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.5 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-68}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -6.5000000000000003e-9Initial program 50.6%
Taylor expanded in F around -inf 99.5%
expm1-log1p-u47.3%
expm1-udef47.2%
div-inv47.2%
neg-mul-147.2%
fma-def47.2%
Applied egg-rr47.2%
expm1-def47.3%
expm1-log1p99.5%
rem-log-exp41.8%
fma-udef41.8%
neg-mul-141.8%
prod-exp38.4%
*-commutative38.4%
prod-exp41.8%
rem-log-exp99.5%
unsub-neg99.5%
Simplified99.5%
if -6.5000000000000003e-9 < F < 1.55e-68Initial program 99.6%
Taylor expanded in F around -inf 42.5%
Taylor expanded in x around inf 66.6%
mul-1-neg66.6%
*-commutative66.6%
Simplified66.6%
if 1.55e-68 < F Initial program 67.1%
+-commutative67.1%
unsub-neg67.1%
associate-*l/79.5%
associate-*r/79.4%
*-commutative79.4%
Simplified79.5%
Taylor expanded in F around inf 89.8%
Taylor expanded in B around 0 76.1%
Final simplification78.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.2e+147)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4e-68)
(- (/ (- F) (* F B)) t_0)
(if (<= F 1.35e-73)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5.2e+147) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4e-68) {
tmp = (-F / (F * B)) - t_0;
} else if (F <= 1.35e-73) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-5.2d+147)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4d-68)) then
tmp = (-f / (f * b)) - t_0
else if (f <= 1.35d-73) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -5.2e+147) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4e-68) {
tmp = (-F / (F * B)) - t_0;
} else if (F <= 1.35e-73) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5.2e+147: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4e-68: tmp = (-F / (F * B)) - t_0 elif F <= 1.35e-73: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.2e+147) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4e-68) tmp = Float64(Float64(Float64(-F) / Float64(F * B)) - t_0); elseif (F <= 1.35e-73) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -5.2e+147) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4e-68) tmp = (-F / (F * B)) - t_0; elseif (F <= 1.35e-73) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.2e+147], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4e-68], N[(N[((-F) / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.35e-73], 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], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.2 \cdot 10^{+147}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4 \cdot 10^{-68}:\\
\;\;\;\;\frac{-F}{F \cdot B} - t_0\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-73}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -5.1999999999999997e147Initial program 21.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 83.0%
if -5.1999999999999997e147 < F < -4.00000000000000027e-68Initial program 94.9%
Taylor expanded in F around -inf 80.8%
Taylor expanded in B around 0 71.2%
expm1-log1p-u31.6%
expm1-udef30.9%
+-commutative30.9%
fma-def30.9%
div-inv30.9%
Applied egg-rr30.9%
expm1-def31.6%
expm1-log1p71.4%
fma-neg71.4%
*-commutative71.4%
times-frac75.9%
mul-1-neg75.9%
Simplified75.9%
if -4.00000000000000027e-68 < F < 1.34999999999999997e-73Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.6%
*-commutative99.6%
Simplified99.7%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 64.0%
Taylor expanded in F around -inf 64.1%
if 1.34999999999999997e-73 < F Initial program 67.5%
+-commutative67.5%
unsub-neg67.5%
associate-*l/79.7%
associate-*r/79.6%
*-commutative79.6%
Simplified79.7%
Taylor expanded in F around inf 88.8%
Taylor expanded in B around 0 76.0%
Final simplification73.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (/ x (tan B)))))
(if (<= x -1.35e-91)
t_0
(if (<= x -1.35e-113)
(+ (/ (- -1.0 x) B) (* 0.3333333333333333 (* B x)))
(if (<= x -2.25e-136)
t_0
(if (<= x 5.5e-129)
(/ (sqrt 0.5) (/ B F))
(if (<= x 3300000.0)
(* x (+ (/ -1.0 B) (* B 0.3333333333333333)))
t_0)))))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / tan(B));
double tmp;
if (x <= -1.35e-91) {
tmp = t_0;
} else if (x <= -1.35e-113) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (x <= -2.25e-136) {
tmp = t_0;
} else if (x <= 5.5e-129) {
tmp = sqrt(0.5) / (B / F);
} else if (x <= 3300000.0) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = 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 = (1.0d0 / b) - (x / tan(b))
if (x <= (-1.35d-91)) then
tmp = t_0
else if (x <= (-1.35d-113)) then
tmp = (((-1.0d0) - x) / b) + (0.3333333333333333d0 * (b * x))
else if (x <= (-2.25d-136)) then
tmp = t_0
else if (x <= 5.5d-129) then
tmp = sqrt(0.5d0) / (b / f)
else if (x <= 3300000.0d0) then
tmp = x * (((-1.0d0) / b) + (b * 0.3333333333333333d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / Math.tan(B));
double tmp;
if (x <= -1.35e-91) {
tmp = t_0;
} else if (x <= -1.35e-113) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (x <= -2.25e-136) {
tmp = t_0;
} else if (x <= 5.5e-129) {
tmp = Math.sqrt(0.5) / (B / F);
} else if (x <= 3300000.0) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 / B) - (x / math.tan(B)) tmp = 0 if x <= -1.35e-91: tmp = t_0 elif x <= -1.35e-113: tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)) elif x <= -2.25e-136: tmp = t_0 elif x <= 5.5e-129: tmp = math.sqrt(0.5) / (B / F) elif x <= 3300000.0: tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (x <= -1.35e-91) tmp = t_0; elseif (x <= -1.35e-113) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(0.3333333333333333 * Float64(B * x))); elseif (x <= -2.25e-136) tmp = t_0; elseif (x <= 5.5e-129) tmp = Float64(sqrt(0.5) / Float64(B / F)); elseif (x <= 3300000.0) tmp = Float64(x * Float64(Float64(-1.0 / B) + Float64(B * 0.3333333333333333))); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (1.0 / B) - (x / tan(B)); tmp = 0.0; if (x <= -1.35e-91) tmp = t_0; elseif (x <= -1.35e-113) tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)); elseif (x <= -2.25e-136) tmp = t_0; elseif (x <= 5.5e-129) tmp = sqrt(0.5) / (B / F); elseif (x <= 3300000.0) tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.35e-91], t$95$0, If[LessEqual[x, -1.35e-113], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.25e-136], t$95$0, If[LessEqual[x, 5.5e-129], N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3300000.0], N[(x * N[(N[(-1.0 / B), $MachinePrecision] + N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -1.35 \cdot 10^{-91}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-113}:\\
\;\;\;\;\frac{-1 - x}{B} + 0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{elif}\;x \leq -2.25 \cdot 10^{-136}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{-129}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}}\\
\mathbf{elif}\;x \leq 3300000:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -1.3499999999999999e-91 or -1.34999999999999998e-113 < x < -2.24999999999999986e-136 or 3.3e6 < x Initial program 82.6%
+-commutative82.6%
unsub-neg82.6%
associate-*l/93.7%
associate-*r/93.6%
*-commutative93.6%
Simplified93.8%
Taylor expanded in F around inf 81.5%
Taylor expanded in B around 0 91.7%
if -1.3499999999999999e-91 < x < -1.34999999999999998e-113Initial program 34.0%
Taylor expanded in F around -inf 36.5%
Taylor expanded in B around 0 20.7%
Taylor expanded in B around 0 68.6%
if -2.24999999999999986e-136 < x < 5.50000000000000023e-129Initial program 65.2%
+-commutative65.2%
unsub-neg65.2%
associate-*l/67.6%
associate-*r/67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in F around 0 52.5%
Taylor expanded in B around 0 34.9%
Taylor expanded in x around 0 31.7%
associate-/l*31.7%
Simplified31.7%
if 5.50000000000000023e-129 < x < 3.3e6Initial program 77.8%
Taylor expanded in F around inf 24.5%
Taylor expanded in B around 0 14.8%
Taylor expanded in x around inf 47.7%
Final simplification66.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (/ x (tan B)))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -4.5e+143)
t_1
(if (<= F -1e+55)
t_0
(if (<= F -1.4e-22)
t_1
(if (<= F 1.6e-75) (/ (- (* F (sqrt 0.5)) x) B) t_0))))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / tan(B));
double t_1 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -4.5e+143) {
tmp = t_1;
} else if (F <= -1e+55) {
tmp = t_0;
} else if (F <= -1.4e-22) {
tmp = t_1;
} else if (F <= 1.6e-75) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = 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 = (1.0d0 / b) - (x / tan(b))
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-4.5d+143)) then
tmp = t_1
else if (f <= (-1d+55)) then
tmp = t_0
else if (f <= (-1.4d-22)) then
tmp = t_1
else if (f <= 1.6d-75) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / Math.tan(B));
double t_1 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -4.5e+143) {
tmp = t_1;
} else if (F <= -1e+55) {
tmp = t_0;
} else if (F <= -1.4e-22) {
tmp = t_1;
} else if (F <= 1.6e-75) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 / B) - (x / math.tan(B)) t_1 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -4.5e+143: tmp = t_1 elif F <= -1e+55: tmp = t_0 elif F <= -1.4e-22: tmp = t_1 elif F <= 1.6e-75: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 / B) - Float64(x / tan(B))) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -4.5e+143) tmp = t_1; elseif (F <= -1e+55) tmp = t_0; elseif (F <= -1.4e-22) tmp = t_1; elseif (F <= 1.6e-75) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (1.0 / B) - (x / tan(B)); t_1 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -4.5e+143) tmp = t_1; elseif (F <= -1e+55) tmp = t_0; elseif (F <= -1.4e-22) tmp = t_1; elseif (F <= 1.6e-75) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.5e+143], t$95$1, If[LessEqual[F, -1e+55], t$95$0, If[LessEqual[F, -1.4e-22], t$95$1, If[LessEqual[F, 1.6e-75], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -4.5 \cdot 10^{+143}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -1 \cdot 10^{+55}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.4 \cdot 10^{-22}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-75}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if F < -4.4999999999999997e143 or -1.00000000000000001e55 < F < -1.39999999999999997e-22Initial program 38.2%
Taylor expanded in F around -inf 96.2%
Taylor expanded in B around 0 78.9%
if -4.4999999999999997e143 < F < -1.00000000000000001e55 or 1.59999999999999988e-75 < F Initial program 72.5%
+-commutative72.5%
unsub-neg72.5%
associate-*l/83.4%
associate-*r/83.3%
*-commutative83.3%
Simplified83.4%
Taylor expanded in F around inf 87.0%
Taylor expanded in B around 0 76.6%
if -1.39999999999999997e-22 < F < 1.59999999999999988e-75Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.6%
*-commutative99.6%
Simplified99.7%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 63.0%
Taylor expanded in x around 0 63.0%
Final simplification72.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -8e+155)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.26e-67)
(- (/ (- F) (* F B)) t_0)
(if (<= F 4.8e-75) (/ (- (* F (sqrt 0.5)) x) B) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -8e+155) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.26e-67) {
tmp = (-F / (F * B)) - t_0;
} else if (F <= 4.8e-75) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-8d+155)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.26d-67)) then
tmp = (-f / (f * b)) - t_0
else if (f <= 4.8d-75) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -8e+155) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.26e-67) {
tmp = (-F / (F * B)) - t_0;
} else if (F <= 4.8e-75) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -8e+155: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.26e-67: tmp = (-F / (F * B)) - t_0 elif F <= 4.8e-75: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -8e+155) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.26e-67) tmp = Float64(Float64(Float64(-F) / Float64(F * B)) - t_0); elseif (F <= 4.8e-75) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -8e+155) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.26e-67) tmp = (-F / (F * B)) - t_0; elseif (F <= 4.8e-75) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8e+155], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.26e-67], N[(N[((-F) / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.8e-75], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -8 \cdot 10^{+155}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.26 \cdot 10^{-67}:\\
\;\;\;\;\frac{-F}{F \cdot B} - t_0\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{-75}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -8.00000000000000006e155Initial program 21.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 83.0%
if -8.00000000000000006e155 < F < -2.2600000000000001e-67Initial program 94.9%
Taylor expanded in F around -inf 80.8%
Taylor expanded in B around 0 71.2%
expm1-log1p-u31.6%
expm1-udef30.9%
+-commutative30.9%
fma-def30.9%
div-inv30.9%
Applied egg-rr30.9%
expm1-def31.6%
expm1-log1p71.4%
fma-neg71.4%
*-commutative71.4%
times-frac75.9%
mul-1-neg75.9%
Simplified75.9%
if -2.2600000000000001e-67 < F < 4.80000000000000039e-75Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.6%
*-commutative99.6%
Simplified99.7%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 64.0%
Taylor expanded in x around 0 64.0%
if 4.80000000000000039e-75 < F Initial program 67.5%
+-commutative67.5%
unsub-neg67.5%
associate-*l/79.7%
associate-*r/79.6%
*-commutative79.6%
Simplified79.7%
Taylor expanded in F around inf 88.8%
Taylor expanded in B around 0 76.0%
Final simplification73.0%
(FPCore (F B x)
:precision binary64
(if (<= F -5.7e+156)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6.8e-67)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F 3.9e-73)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.7e+156) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6.8e-67) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= 3.9e-73) {
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 <= (-5.7d+156)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6.8d-67)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= 3.9d-73) 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 <= -5.7e+156) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6.8e-67) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= 3.9e-73) {
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 <= -5.7e+156: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6.8e-67: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= 3.9e-73: 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 <= -5.7e+156) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6.8e-67) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 3.9e-73) 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 <= -5.7e+156) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6.8e-67) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= 3.9e-73) 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, -5.7e+156], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.8e-67], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.9e-73], 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 -5.7 \cdot 10^{+156}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.8 \cdot 10^{-67}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 3.9 \cdot 10^{-73}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -5.69999999999999998e156Initial program 22.3%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 82.6%
if -5.69999999999999998e156 < F < -6.8000000000000002e-67Initial program 92.6%
Taylor expanded in F around -inf 85.9%
Taylor expanded in B around 0 76.4%
if -6.8000000000000002e-67 < F < 3.89999999999999982e-73Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.6%
*-commutative99.6%
Simplified99.7%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 64.0%
Taylor expanded in x around 0 64.0%
if 3.89999999999999982e-73 < F Initial program 67.5%
+-commutative67.5%
unsub-neg67.5%
associate-*l/79.7%
associate-*r/79.6%
*-commutative79.6%
Simplified79.7%
Taylor expanded in F around inf 88.8%
Taylor expanded in B around 0 76.0%
Final simplification73.0%
(FPCore (F B x) :precision binary64 (if (or (<= B -2.35e-79) (not (<= B 6.4e-80))) (- (/ 1.0 B) (/ x (tan B))) (/ (- (* F (sqrt 0.5)) x) B)))
double code(double F, double B, double x) {
double tmp;
if ((B <= -2.35e-79) || !(B <= 6.4e-80)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = ((F * sqrt(0.5)) - 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 ((b <= (-2.35d-79)) .or. (.not. (b <= 6.4d-80))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = ((f * sqrt(0.5d0)) - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((B <= -2.35e-79) || !(B <= 6.4e-80)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (B <= -2.35e-79) or not (B <= 6.4e-80): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = ((F * math.sqrt(0.5)) - x) / B return tmp
function code(F, B, x) tmp = 0.0 if ((B <= -2.35e-79) || !(B <= 6.4e-80)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((B <= -2.35e-79) || ~((B <= 6.4e-80))) tmp = (1.0 / B) - (x / tan(B)); else tmp = ((F * sqrt(0.5)) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[B, -2.35e-79], N[Not[LessEqual[B, 6.4e-80]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.35 \cdot 10^{-79} \lor \neg \left(B \leq 6.4 \cdot 10^{-80}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\end{array}
\end{array}
if B < -2.3500000000000001e-79 or 6.3999999999999998e-80 < B Initial program 80.5%
+-commutative80.5%
unsub-neg80.5%
associate-*l/80.5%
associate-*r/80.5%
*-commutative80.5%
Simplified80.7%
Taylor expanded in F around inf 63.6%
Taylor expanded in B around 0 60.8%
if -2.3500000000000001e-79 < B < 6.3999999999999998e-80Initial program 67.9%
+-commutative67.9%
unsub-neg67.9%
associate-*l/84.2%
associate-*r/84.1%
*-commutative84.1%
Simplified84.2%
Taylor expanded in F around 0 61.1%
Taylor expanded in B around 0 61.0%
Taylor expanded in x around 0 70.4%
Final simplification64.8%
(FPCore (F B x)
:precision binary64
(if (<= F -3e-87)
(+ (/ (- -1.0 x) B) (* 0.3333333333333333 (* B x)))
(if (<= F 6.8e-66)
(/ (- x) B)
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3e-87) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (F <= 6.8e-66) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3d-87)) then
tmp = (((-1.0d0) - x) / b) + (0.3333333333333333d0 * (b * x))
else if (f <= 6.8d-66) then
tmp = -x / b
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3e-87) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (F <= 6.8e-66) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3e-87: tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)) elif F <= 6.8e-66: tmp = -x / B else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3e-87) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(0.3333333333333333 * Float64(B * x))); elseif (F <= 6.8e-66) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3e-87) tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)); elseif (F <= 6.8e-66) tmp = -x / B; else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3e-87], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.8e-66], N[((-x) / B), $MachinePrecision], N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{-87}:\\
\;\;\;\;\frac{-1 - x}{B} + 0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{-66}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.00000000000000016e-87Initial program 59.9%
Taylor expanded in F around -inf 72.1%
Taylor expanded in B around 0 52.4%
Taylor expanded in B around 0 45.6%
if -3.00000000000000016e-87 < F < 6.79999999999999994e-66Initial program 99.6%
Taylor expanded in F around -inf 41.9%
Taylor expanded in B around 0 25.7%
associate-*r/25.7%
distribute-lft-in25.7%
metadata-eval25.7%
neg-mul-125.7%
Simplified25.7%
Taylor expanded in x around inf 42.4%
associate-*r/42.4%
neg-mul-142.4%
Simplified42.4%
if 6.79999999999999994e-66 < F Initial program 67.1%
Taylor expanded in F around inf 91.0%
Taylor expanded in B around 0 48.5%
associate--l+48.5%
*-commutative48.5%
*-commutative48.5%
div-sub48.5%
Simplified48.5%
Final simplification45.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* 0.3333333333333333 (* B x))))
(if (<= F -1.5e-86)
(+ (/ (- -1.0 x) B) t_0)
(if (<= F 4.2e-69) (/ (- x) B) (- (+ (/ 1.0 B) t_0) (/ x B))))))
double code(double F, double B, double x) {
double t_0 = 0.3333333333333333 * (B * x);
double tmp;
if (F <= -1.5e-86) {
tmp = ((-1.0 - x) / B) + t_0;
} else if (F <= 4.2e-69) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + t_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 = 0.3333333333333333d0 * (b * x)
if (f <= (-1.5d-86)) then
tmp = (((-1.0d0) - x) / b) + t_0
else if (f <= 4.2d-69) then
tmp = -x / b
else
tmp = ((1.0d0 / b) + t_0) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 0.3333333333333333 * (B * x);
double tmp;
if (F <= -1.5e-86) {
tmp = ((-1.0 - x) / B) + t_0;
} else if (F <= 4.2e-69) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + t_0) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = 0.3333333333333333 * (B * x) tmp = 0 if F <= -1.5e-86: tmp = ((-1.0 - x) / B) + t_0 elif F <= 4.2e-69: tmp = -x / B else: tmp = ((1.0 / B) + t_0) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(0.3333333333333333 * Float64(B * x)) tmp = 0.0 if (F <= -1.5e-86) tmp = Float64(Float64(Float64(-1.0 - x) / B) + t_0); elseif (F <= 4.2e-69) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(Float64(1.0 / B) + t_0) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 0.3333333333333333 * (B * x); tmp = 0.0; if (F <= -1.5e-86) tmp = ((-1.0 - x) / B) + t_0; elseif (F <= 4.2e-69) tmp = -x / B; else tmp = ((1.0 / B) + t_0) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.5e-86], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[F, 4.2e-69], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{if}\;F \leq -1.5 \cdot 10^{-86}:\\
\;\;\;\;\frac{-1 - x}{B} + t_0\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-69}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + t_0\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.5e-86Initial program 59.9%
Taylor expanded in F around -inf 72.1%
Taylor expanded in B around 0 52.4%
Taylor expanded in B around 0 45.6%
if -1.5e-86 < F < 4.1999999999999999e-69Initial program 99.6%
Taylor expanded in F around -inf 41.9%
Taylor expanded in B around 0 25.7%
associate-*r/25.7%
distribute-lft-in25.7%
metadata-eval25.7%
neg-mul-125.7%
Simplified25.7%
Taylor expanded in x around inf 42.4%
associate-*r/42.4%
neg-mul-142.4%
Simplified42.4%
if 4.1999999999999999e-69 < F Initial program 67.1%
Taylor expanded in F around inf 91.0%
Taylor expanded in B around 0 48.5%
Taylor expanded in x around inf 48.9%
Final simplification45.6%
(FPCore (F B x)
:precision binary64
(if (<= F -1.45e-86)
(/ (- -1.0 x) B)
(if (<= F 2e-67)
(/ (- x) B)
(- (+ (/ 1.0 B) (* B 0.16666666666666666)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.45e-86) {
tmp = (-1.0 - x) / B;
} else if (F <= 2e-67) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.45d-86)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2d-67) then
tmp = -x / b
else
tmp = ((1.0d0 / b) + (b * 0.16666666666666666d0)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.45e-86) {
tmp = (-1.0 - x) / B;
} else if (F <= 2e-67) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.45e-86: tmp = (-1.0 - x) / B elif F <= 2e-67: tmp = -x / B else: tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.45e-86) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2e-67) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * 0.16666666666666666)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.45e-86) tmp = (-1.0 - x) / B; elseif (F <= 2e-67) tmp = -x / B; else tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.45e-86], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2e-67], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.45 \cdot 10^{-86}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-67}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.45e-86Initial program 59.9%
Taylor expanded in F around -inf 89.1%
Taylor expanded in B around 0 45.2%
associate-*r/45.2%
distribute-lft-in45.2%
metadata-eval45.2%
neg-mul-145.2%
Simplified45.2%
Taylor expanded in x around 0 45.2%
sub-neg45.2%
mul-1-neg45.2%
+-commutative45.2%
distribute-neg-frac45.2%
metadata-eval45.2%
sub-neg45.2%
div-sub45.2%
Simplified45.2%
if -1.45e-86 < F < 1.99999999999999989e-67Initial program 99.6%
Taylor expanded in F around -inf 41.9%
Taylor expanded in B around 0 25.7%
associate-*r/25.7%
distribute-lft-in25.7%
metadata-eval25.7%
neg-mul-125.7%
Simplified25.7%
Taylor expanded in x around inf 42.4%
associate-*r/42.4%
neg-mul-142.4%
Simplified42.4%
if 1.99999999999999989e-67 < F Initial program 67.1%
Taylor expanded in F around inf 91.0%
Taylor expanded in B around 0 48.5%
Taylor expanded in x around 0 48.1%
*-commutative48.1%
Simplified48.1%
Final simplification45.2%
(FPCore (F B x)
:precision binary64
(if (<= F -7.6e-87)
(+ (/ (- -1.0 x) B) (* 0.3333333333333333 (* B x)))
(if (<= F 3.1e-68)
(/ (- x) B)
(- (+ (/ 1.0 B) (* B 0.16666666666666666)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.6e-87) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (F <= 3.1e-68) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (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.6d-87)) then
tmp = (((-1.0d0) - x) / b) + (0.3333333333333333d0 * (b * x))
else if (f <= 3.1d-68) then
tmp = -x / b
else
tmp = ((1.0d0 / b) + (b * 0.16666666666666666d0)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.6e-87) {
tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x));
} else if (F <= 3.1e-68) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.6e-87: tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)) elif F <= 3.1e-68: tmp = -x / B else: tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.6e-87) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(0.3333333333333333 * Float64(B * x))); elseif (F <= 3.1e-68) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * 0.16666666666666666)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.6e-87) tmp = ((-1.0 - x) / B) + (0.3333333333333333 * (B * x)); elseif (F <= 3.1e-68) tmp = -x / B; else tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.6e-87], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.1e-68], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.6 \cdot 10^{-87}:\\
\;\;\;\;\frac{-1 - x}{B} + 0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-68}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.6e-87Initial program 59.9%
Taylor expanded in F around -inf 72.1%
Taylor expanded in B around 0 52.4%
Taylor expanded in B around 0 45.6%
if -7.6e-87 < F < 3.0999999999999999e-68Initial program 99.6%
Taylor expanded in F around -inf 41.9%
Taylor expanded in B around 0 25.7%
associate-*r/25.7%
distribute-lft-in25.7%
metadata-eval25.7%
neg-mul-125.7%
Simplified25.7%
Taylor expanded in x around inf 42.4%
associate-*r/42.4%
neg-mul-142.4%
Simplified42.4%
if 3.0999999999999999e-68 < F Initial program 67.1%
Taylor expanded in F around inf 91.0%
Taylor expanded in B around 0 48.5%
Taylor expanded in x around 0 48.1%
*-commutative48.1%
Simplified48.1%
Final simplification45.4%
(FPCore (F B x) :precision binary64 (if (<= F -1.5e-86) (/ (- -1.0 x) B) (if (<= F 2.4e-66) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-86) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.4e-66) {
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.5d-86)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.4d-66) 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.5e-86) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.4e-66) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.5e-86: tmp = (-1.0 - x) / B elif F <= 2.4e-66: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.5e-86) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.4e-66) 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.5e-86) tmp = (-1.0 - x) / B; elseif (F <= 2.4e-66) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.5e-86], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.4e-66], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.5 \cdot 10^{-86}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-66}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.5e-86Initial program 59.9%
Taylor expanded in F around -inf 89.1%
Taylor expanded in B around 0 45.2%
associate-*r/45.2%
distribute-lft-in45.2%
metadata-eval45.2%
neg-mul-145.2%
Simplified45.2%
Taylor expanded in x around 0 45.2%
sub-neg45.2%
mul-1-neg45.2%
+-commutative45.2%
distribute-neg-frac45.2%
metadata-eval45.2%
sub-neg45.2%
div-sub45.2%
Simplified45.2%
if -1.5e-86 < F < 2.40000000000000026e-66Initial program 99.6%
Taylor expanded in F around -inf 41.9%
Taylor expanded in B around 0 25.7%
associate-*r/25.7%
distribute-lft-in25.7%
metadata-eval25.7%
neg-mul-125.7%
Simplified25.7%
Taylor expanded in x around inf 42.4%
associate-*r/42.4%
neg-mul-142.4%
Simplified42.4%
if 2.40000000000000026e-66 < F Initial program 67.1%
Taylor expanded in F around inf 91.0%
Taylor expanded in B around 0 47.8%
Final simplification45.1%
(FPCore (F B x) :precision binary64 (if (or (<= x -7.2e-24) (not (<= x 4.3e-132))) (/ (- x) B) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -7.2e-24) || !(x <= 4.3e-132)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-7.2d-24)) .or. (.not. (x <= 4.3d-132))) then
tmp = -x / b
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -7.2e-24) || !(x <= 4.3e-132)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -7.2e-24) or not (x <= 4.3e-132): tmp = -x / B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -7.2e-24) || !(x <= 4.3e-132)) tmp = Float64(Float64(-x) / B); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -7.2e-24) || ~((x <= 4.3e-132))) tmp = -x / B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -7.2e-24], N[Not[LessEqual[x, 4.3e-132]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{-24} \lor \neg \left(x \leq 4.3 \cdot 10^{-132}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -7.2000000000000002e-24 or 4.2999999999999997e-132 < x Initial program 83.8%
Taylor expanded in F around -inf 79.7%
Taylor expanded in B around 0 40.3%
associate-*r/40.3%
distribute-lft-in40.3%
metadata-eval40.3%
neg-mul-140.3%
Simplified40.3%
Taylor expanded in x around inf 47.7%
associate-*r/47.7%
neg-mul-147.7%
Simplified47.7%
if -7.2000000000000002e-24 < x < 4.2999999999999997e-132Initial program 62.3%
Taylor expanded in F around -inf 36.2%
Taylor expanded in B around 0 22.5%
associate-*r/22.5%
distribute-lft-in22.5%
metadata-eval22.5%
neg-mul-122.5%
Simplified22.5%
Taylor expanded in x around 0 22.5%
Final simplification37.7%
(FPCore (F B x) :precision binary64 (if (<= F -1.5e-86) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-86) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.5d-86)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-86) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.5e-86: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.5e-86) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.5e-86) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.5e-86], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.5 \cdot 10^{-86}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -1.5e-86Initial program 59.9%
Taylor expanded in F around -inf 89.1%
Taylor expanded in B around 0 45.2%
associate-*r/45.2%
distribute-lft-in45.2%
metadata-eval45.2%
neg-mul-145.2%
Simplified45.2%
Taylor expanded in x around 0 45.2%
sub-neg45.2%
mul-1-neg45.2%
+-commutative45.2%
distribute-neg-frac45.2%
metadata-eval45.2%
sub-neg45.2%
div-sub45.2%
Simplified45.2%
if -1.5e-86 < F Initial program 83.5%
Taylor expanded in F around -inf 48.1%
Taylor expanded in B around 0 26.8%
associate-*r/26.8%
distribute-lft-in26.8%
metadata-eval26.8%
neg-mul-126.8%
Simplified26.8%
Taylor expanded in x around inf 35.5%
associate-*r/35.5%
neg-mul-135.5%
Simplified35.5%
Final simplification38.9%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 75.3%
Taylor expanded in F around -inf 62.4%
Taylor expanded in B around 0 33.2%
associate-*r/33.2%
distribute-lft-in33.2%
metadata-eval33.2%
neg-mul-133.2%
Simplified33.2%
Taylor expanded in x around 0 11.7%
Final simplification11.7%
herbie shell --seed 2023175
(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))))))