
(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 28 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 -400000000.0)
(- (/ (fma x (cos B) 1.0) (sin B)))
(if (<= F 20000000.0)
(fma (pow (fma 2.0 x (fma F F 2.0)) -0.5) (/ F (sin B)) t_0)
(fma (/ 1.0 (sin B)) 1.0 t_0)))))
double code(double F, double B, double x) {
double t_0 = -(x / tan(B));
double tmp;
if (F <= -400000000.0) {
tmp = -(fma(x, cos(B), 1.0) / sin(B));
} else if (F <= 20000000.0) {
tmp = fma(pow(fma(2.0, x, fma(F, F, 2.0)), -0.5), (F / sin(B)), t_0);
} else {
tmp = fma((1.0 / sin(B)), 1.0, t_0);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(-Float64(x / tan(B))) tmp = 0.0 if (F <= -400000000.0) tmp = Float64(-Float64(fma(x, cos(B), 1.0) / sin(B))); elseif (F <= 20000000.0) tmp = fma((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5), Float64(F / sin(B)), t_0); else tmp = fma(Float64(1.0 / sin(B)), 1.0, t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])}, If[LessEqual[F, -400000000.0], (-N[(N[(x * N[Cos[B], $MachinePrecision] + 1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 20000000.0], N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * 1.0 + t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -\frac{x}{\tan B}\\
\mathbf{if}\;F \leq -400000000:\\
\;\;\;\;-\frac{\mathsf{fma}\left(x, \cos B, 1\right)}{\sin B}\\
\mathbf{elif}\;F \leq 20000000:\\
\;\;\;\;\mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{F}{\sin B}, t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, 1, t\_0\right)\\
\end{array}
\end{array}
if F < -4e8Initial program 49.2%
Applied rewrites69.5%
Applied rewrites60.9%
Taylor expanded in F around -inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
lower-cos.f64N/A
lower-neg.f64N/A
lower-sin.f6499.8
Applied rewrites99.8%
if -4e8 < F < 2e7Initial program 99.4%
lift-tan.f64N/A
lift-/.f64N/A
lift-*.f64N/A
neg-sub0N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
Applied rewrites99.6%
if 2e7 < F Initial program 62.2%
Applied rewrites77.7%
Taylor expanded in F around inf
Applied rewrites99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B))))
(t_1
(+
t_0
(* (/ F (sin B)) (pow (+ (* x 2.0) (+ 2.0 (* F F))) (/ -1.0 2.0)))))
(t_2 (* (sqrt (/ 1.0 (+ 2.0 (fma F F (* x 2.0))))) (/ F B))))
(if (<= t_1 (- INFINITY))
(/ (- -1.0 x) B)
(if (<= t_1 -400.0)
(- t_2 (/ x (tan B)))
(if (<= t_1 1e-153)
(* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B)))
(if (<= t_1 1e-18)
(+ t_0 (* (/ F B) (sqrt (/ 1.0 (fma 2.0 x 2.0)))))
(if (<= t_1 20.0)
(/ 1.0 (/ (* (sin B) (sqrt (fma F F 2.0))) F))
(if (<= t_1 5e+297)
(+ t_2 (/ -1.0 (/ (tan B) x)))
(+
t_0
(/
(* (/ 1.0 F) (fma 0.16666666666666666 (* F (* B B)) F))
B))))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = t_0 + ((F / sin(B)) * pow(((x * 2.0) + (2.0 + (F * F))), (-1.0 / 2.0)));
double t_2 = sqrt((1.0 / (2.0 + fma(F, F, (x * 2.0))))) * (F / B);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (-1.0 - x) / B;
} else if (t_1 <= -400.0) {
tmp = t_2 - (x / tan(B));
} else if (t_1 <= 1e-153) {
tmp = F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B));
} else if (t_1 <= 1e-18) {
tmp = t_0 + ((F / B) * sqrt((1.0 / fma(2.0, x, 2.0))));
} else if (t_1 <= 20.0) {
tmp = 1.0 / ((sin(B) * sqrt(fma(F, F, 2.0))) / F);
} else if (t_1 <= 5e+297) {
tmp = t_2 + (-1.0 / (tan(B) / x));
} else {
tmp = t_0 + (((1.0 / F) * fma(0.16666666666666666, (F * (B * B)), F)) / B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64(t_0 + Float64(Float64(F / sin(B)) * (Float64(Float64(x * 2.0) + Float64(2.0 + Float64(F * F))) ^ Float64(-1.0 / 2.0)))) t_2 = Float64(sqrt(Float64(1.0 / Float64(2.0 + fma(F, F, Float64(x * 2.0))))) * Float64(F / B)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(-1.0 - x) / B); elseif (t_1 <= -400.0) tmp = Float64(t_2 - Float64(x / tan(B))); elseif (t_1 <= 1e-153) tmp = Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))); elseif (t_1 <= 1e-18) tmp = Float64(t_0 + Float64(Float64(F / B) * sqrt(Float64(1.0 / fma(2.0, x, 2.0))))); elseif (t_1 <= 20.0) tmp = Float64(1.0 / Float64(Float64(sin(B) * sqrt(fma(F, F, 2.0))) / F)); elseif (t_1 <= 5e+297) tmp = Float64(t_2 + Float64(-1.0 / Float64(tan(B) / x))); else tmp = Float64(t_0 + Float64(Float64(Float64(1.0 / F) * fma(0.16666666666666666, Float64(F * Float64(B * B)), F)) / B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(x * 2.0), $MachinePrecision] + N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(F * F + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[t$95$1, -400.0], N[(t$95$2 - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-153], N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-18], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 20.0], N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+297], N[(t$95$2 + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(N[(1.0 / F), $MachinePrecision] * N[(0.16666666666666666 * N[(F * N[(B * B), $MachinePrecision]), $MachinePrecision] + F), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := t\_0 + \frac{F}{\sin B} \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{\left(\frac{-1}{2}\right)}\\
t_2 := \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, x \cdot 2\right)}} \cdot \frac{F}{B}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;t\_1 \leq -400:\\
\;\;\;\;t\_2 - \frac{x}{\tan B}\\
\mathbf{elif}\;t\_1 \leq 10^{-153}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\
\mathbf{elif}\;t\_1 \leq 10^{-18}:\\
\;\;\;\;t\_0 + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}\\
\mathbf{elif}\;t\_1 \leq 20:\\
\;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+297}:\\
\;\;\;\;t\_2 + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{\frac{1}{F} \cdot \mathsf{fma}\left(0.16666666666666666, F \cdot \left(B \cdot B\right), F\right)}{B}\\
\end{array}
\end{array}
if (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -inf.0Initial program 62.8%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f64100.0
Applied rewrites100.0%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6473.4
Applied rewrites73.4%
if -inf.0 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -400Initial program 99.6%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites68.0%
Applied rewrites67.7%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6499.6
Applied rewrites99.6%
if -400 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 1.00000000000000004e-153Initial program 59.7%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6436.0
Applied rewrites36.0%
if 1.00000000000000004e-153 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 1.0000000000000001e-18Initial program 76.6%
Taylor expanded in F around 0
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6476.3
Applied rewrites76.3%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f6445.6
Applied rewrites45.6%
if 1.0000000000000001e-18 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 20Initial program 94.8%
Applied rewrites95.0%
Taylor expanded in x around 0
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6483.9
Applied rewrites83.9%
if 20 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 4.9999999999999998e297Initial program 99.3%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites79.5%
Applied rewrites79.6%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6499.5
Applied rewrites99.5%
lift-tan.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6499.4
Applied rewrites99.4%
if 4.9999999999999998e297 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) Initial program 12.7%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites71.4%
Taylor expanded in F around inf
lower-/.f6479.5
Applied rewrites79.5%
Final simplification75.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B))))
(t_1
(+
t_0
(* (/ F (sin B)) (pow (+ (* x 2.0) (+ 2.0 (* F F))) (/ -1.0 2.0)))))
(t_2
(-
(* (sqrt (/ 1.0 (+ 2.0 (fma F F (* x 2.0))))) (/ F B))
(/ x (tan B)))))
(if (<= t_1 (- INFINITY))
(/ (- -1.0 x) B)
(if (<= t_1 -400.0)
t_2
(if (<= t_1 1e-153)
(* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B)))
(if (<= t_1 1e-18)
(+ t_0 (* (/ F B) (sqrt (/ 1.0 (fma 2.0 x 2.0)))))
(if (<= t_1 20.0)
(/ 1.0 (/ (* (sin B) (sqrt (fma F F 2.0))) F))
(if (<= t_1 5e+297)
t_2
(+
t_0
(/
(* (/ 1.0 F) (fma 0.16666666666666666 (* F (* B B)) F))
B))))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = t_0 + ((F / sin(B)) * pow(((x * 2.0) + (2.0 + (F * F))), (-1.0 / 2.0)));
double t_2 = (sqrt((1.0 / (2.0 + fma(F, F, (x * 2.0))))) * (F / B)) - (x / tan(B));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (-1.0 - x) / B;
} else if (t_1 <= -400.0) {
tmp = t_2;
} else if (t_1 <= 1e-153) {
tmp = F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B));
} else if (t_1 <= 1e-18) {
tmp = t_0 + ((F / B) * sqrt((1.0 / fma(2.0, x, 2.0))));
} else if (t_1 <= 20.0) {
tmp = 1.0 / ((sin(B) * sqrt(fma(F, F, 2.0))) / F);
} else if (t_1 <= 5e+297) {
tmp = t_2;
} else {
tmp = t_0 + (((1.0 / F) * fma(0.16666666666666666, (F * (B * B)), F)) / B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64(t_0 + Float64(Float64(F / sin(B)) * (Float64(Float64(x * 2.0) + Float64(2.0 + Float64(F * F))) ^ Float64(-1.0 / 2.0)))) t_2 = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + fma(F, F, Float64(x * 2.0))))) * Float64(F / B)) - Float64(x / tan(B))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(-1.0 - x) / B); elseif (t_1 <= -400.0) tmp = t_2; elseif (t_1 <= 1e-153) tmp = Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))); elseif (t_1 <= 1e-18) tmp = Float64(t_0 + Float64(Float64(F / B) * sqrt(Float64(1.0 / fma(2.0, x, 2.0))))); elseif (t_1 <= 20.0) tmp = Float64(1.0 / Float64(Float64(sin(B) * sqrt(fma(F, F, 2.0))) / F)); elseif (t_1 <= 5e+297) tmp = t_2; else tmp = Float64(t_0 + Float64(Float64(Float64(1.0 / F) * fma(0.16666666666666666, Float64(F * Float64(B * B)), F)) / B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(x * 2.0), $MachinePrecision] + N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(F * F + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[t$95$1, -400.0], t$95$2, If[LessEqual[t$95$1, 1e-153], N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-18], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 20.0], N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+297], t$95$2, N[(t$95$0 + N[(N[(N[(1.0 / F), $MachinePrecision] * N[(0.16666666666666666 * N[(F * N[(B * B), $MachinePrecision]), $MachinePrecision] + F), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := t\_0 + \frac{F}{\sin B} \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{\left(\frac{-1}{2}\right)}\\
t_2 := \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, x \cdot 2\right)}} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;t\_1 \leq -400:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{-153}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\
\mathbf{elif}\;t\_1 \leq 10^{-18}:\\
\;\;\;\;t\_0 + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}\\
\mathbf{elif}\;t\_1 \leq 20:\\
\;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+297}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{\frac{1}{F} \cdot \mathsf{fma}\left(0.16666666666666666, F \cdot \left(B \cdot B\right), F\right)}{B}\\
\end{array}
\end{array}
if (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -inf.0Initial program 62.8%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f64100.0
Applied rewrites100.0%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6473.4
Applied rewrites73.4%
if -inf.0 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -400 or 20 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 4.9999999999999998e297Initial program 99.4%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites73.7%
Applied rewrites73.6%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6499.6
Applied rewrites99.6%
if -400 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 1.00000000000000004e-153Initial program 59.7%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6436.0
Applied rewrites36.0%
if 1.00000000000000004e-153 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 1.0000000000000001e-18Initial program 76.6%
Taylor expanded in F around 0
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6476.3
Applied rewrites76.3%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f6445.6
Applied rewrites45.6%
if 1.0000000000000001e-18 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 20Initial program 94.8%
Applied rewrites95.0%
Taylor expanded in x around 0
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6483.9
Applied rewrites83.9%
if 4.9999999999999998e297 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) Initial program 12.7%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites71.4%
Taylor expanded in F around inf
lower-/.f6479.5
Applied rewrites79.5%
Final simplification75.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.5)
(- (/ (fma x (cos B) 1.0) (sin B)))
(if (<= F 0.029)
(- (/ F (* (sin B) (sqrt (fma 2.0 x 2.0)))) t_0)
(fma (/ 1.0 (sin B)) 1.0 (- t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.5) {
tmp = -(fma(x, cos(B), 1.0) / sin(B));
} else if (F <= 0.029) {
tmp = (F / (sin(B) * sqrt(fma(2.0, x, 2.0)))) - t_0;
} else {
tmp = fma((1.0 / sin(B)), 1.0, -t_0);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.5) tmp = Float64(-Float64(fma(x, cos(B), 1.0) / sin(B))); elseif (F <= 0.029) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(2.0, x, 2.0)))) - t_0); else tmp = fma(Float64(1.0 / sin(B)), 1.0, Float64(-t_0)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.5], (-N[(N[(x * N[Cos[B], $MachinePrecision] + 1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 0.029], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * 1.0 + (-t$95$0)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.5:\\
\;\;\;\;-\frac{\mathsf{fma}\left(x, \cos B, 1\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.029:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, 2\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, 1, -t\_0\right)\\
\end{array}
\end{array}
if F < -1.5Initial program 50.6%
Applied rewrites70.3%
Applied rewrites61.9%
Taylor expanded in F around -inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
lower-cos.f64N/A
lower-neg.f64N/A
lower-sin.f6498.9
Applied rewrites98.9%
if -1.5 < F < 0.0290000000000000015Initial program 99.4%
Taylor expanded in F around 0
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6499.4
Applied rewrites99.4%
lift-tan.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
lift-sin.f64N/A
lift-fma.f64N/A
lift-/.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-neg.f64N/A
lift-*.f64N/A
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
Applied rewrites99.6%
if 0.0290000000000000015 < F Initial program 64.7%
Applied rewrites79.1%
Taylor expanded in F around inf
Applied rewrites99.4%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -26.5)
(- (/ (fma x (cos B) 1.0) (sin B)))
(if (<= F 1.66e-15)
(- (* (sqrt (/ 1.0 (+ 2.0 (fma F F (* x 2.0))))) (/ F B)) t_0)
(if (<= F 2.6e-10)
(/ 1.0 (/ (* (sin B) (sqrt (fma F F 2.0))) F))
(fma (/ 1.0 (sin B)) 1.0 (- t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -26.5) {
tmp = -(fma(x, cos(B), 1.0) / sin(B));
} else if (F <= 1.66e-15) {
tmp = (sqrt((1.0 / (2.0 + fma(F, F, (x * 2.0))))) * (F / B)) - t_0;
} else if (F <= 2.6e-10) {
tmp = 1.0 / ((sin(B) * sqrt(fma(F, F, 2.0))) / F);
} else {
tmp = fma((1.0 / sin(B)), 1.0, -t_0);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -26.5) tmp = Float64(-Float64(fma(x, cos(B), 1.0) / sin(B))); elseif (F <= 1.66e-15) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + fma(F, F, Float64(x * 2.0))))) * Float64(F / B)) - t_0); elseif (F <= 2.6e-10) tmp = Float64(1.0 / Float64(Float64(sin(B) * sqrt(fma(F, F, 2.0))) / F)); else tmp = fma(Float64(1.0 / sin(B)), 1.0, Float64(-t_0)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -26.5], (-N[(N[(x * N[Cos[B], $MachinePrecision] + 1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 1.66e-15], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(F * F + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.6e-10], N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * 1.0 + (-t$95$0)), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -26.5:\\
\;\;\;\;-\frac{\mathsf{fma}\left(x, \cos B, 1\right)}{\sin B}\\
\mathbf{elif}\;F \leq 1.66 \cdot 10^{-15}:\\
\;\;\;\;\sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, x \cdot 2\right)}} \cdot \frac{F}{B} - t\_0\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-10}:\\
\;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, 1, -t\_0\right)\\
\end{array}
\end{array}
if F < -26.5Initial program 50.6%
Applied rewrites70.3%
Applied rewrites61.9%
Taylor expanded in F around -inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
lower-cos.f64N/A
lower-neg.f64N/A
lower-sin.f6498.9
Applied rewrites98.9%
if -26.5 < F < 1.65999999999999996e-15Initial program 99.5%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites65.3%
Applied rewrites65.4%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6482.9
Applied rewrites82.9%
if 1.65999999999999996e-15 < F < 2.59999999999999981e-10Initial program 99.1%
Applied rewrites99.1%
Taylor expanded in x around 0
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64100.0
Applied rewrites100.0%
if 2.59999999999999981e-10 < F Initial program 65.6%
Applied rewrites79.7%
Taylor expanded in F around inf
Applied rewrites99.4%
Final simplification92.9%
(FPCore (F B x)
:precision binary64
(if (<= F -26.5)
(- (/ (fma x (cos B) 1.0) (sin B)))
(if (<= F 1.66e-15)
(- (* (sqrt (/ 1.0 (+ 2.0 (fma F F (* x 2.0))))) (/ F B)) (/ x (tan B)))
(if (<= F 2.6e-10)
(/ 1.0 (/ (* (sin B) (sqrt (fma F F 2.0))) F))
(/ (fma (cos B) (- x) 1.0) (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -26.5) {
tmp = -(fma(x, cos(B), 1.0) / sin(B));
} else if (F <= 1.66e-15) {
tmp = (sqrt((1.0 / (2.0 + fma(F, F, (x * 2.0))))) * (F / B)) - (x / tan(B));
} else if (F <= 2.6e-10) {
tmp = 1.0 / ((sin(B) * sqrt(fma(F, F, 2.0))) / F);
} else {
tmp = fma(cos(B), -x, 1.0) / sin(B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -26.5) tmp = Float64(-Float64(fma(x, cos(B), 1.0) / sin(B))); elseif (F <= 1.66e-15) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + fma(F, F, Float64(x * 2.0))))) * Float64(F / B)) - Float64(x / tan(B))); elseif (F <= 2.6e-10) tmp = Float64(1.0 / Float64(Float64(sin(B) * sqrt(fma(F, F, 2.0))) / F)); else tmp = Float64(fma(cos(B), Float64(-x), 1.0) / sin(B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -26.5], (-N[(N[(x * N[Cos[B], $MachinePrecision] + 1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 1.66e-15], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(F * F + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.6e-10], N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[B], $MachinePrecision] * (-x) + 1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -26.5:\\
\;\;\;\;-\frac{\mathsf{fma}\left(x, \cos B, 1\right)}{\sin B}\\
\mathbf{elif}\;F \leq 1.66 \cdot 10^{-15}:\\
\;\;\;\;\sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, x \cdot 2\right)}} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-10}:\\
\;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\cos B, -x, 1\right)}{\sin B}\\
\end{array}
\end{array}
if F < -26.5Initial program 50.6%
Applied rewrites70.3%
Applied rewrites61.9%
Taylor expanded in F around -inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
lower-cos.f64N/A
lower-neg.f64N/A
lower-sin.f6498.9
Applied rewrites98.9%
if -26.5 < F < 1.65999999999999996e-15Initial program 99.5%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites65.3%
Applied rewrites65.4%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6482.9
Applied rewrites82.9%
if 1.65999999999999996e-15 < F < 2.59999999999999981e-10Initial program 99.1%
Applied rewrites99.1%
Taylor expanded in x around 0
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64100.0
Applied rewrites100.0%
if 2.59999999999999981e-10 < F Initial program 65.6%
Applied rewrites79.7%
Applied rewrites71.1%
Taylor expanded in F around inf
lower-/.f64N/A
distribute-lft-inN/A
rgt-mult-inverseN/A
lower-fma.f64N/A
lower-cos.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-sin.f6499.3
Applied rewrites99.3%
Final simplification92.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ (* x (cos B)) (sin B)))))
(if (<= x -880000.0)
t_0
(if (<= x -8e-197)
(- (* (sqrt (/ 1.0 (+ 2.0 (fma F F (* x 2.0))))) (/ F B)) (/ x (tan B)))
(if (<= x 7.6e-81)
(/ 1.0 (/ (* (sin B) (sqrt (fma F F 2.0))) F))
t_0)))))
double code(double F, double B, double x) {
double t_0 = -((x * cos(B)) / sin(B));
double tmp;
if (x <= -880000.0) {
tmp = t_0;
} else if (x <= -8e-197) {
tmp = (sqrt((1.0 / (2.0 + fma(F, F, (x * 2.0))))) * (F / B)) - (x / tan(B));
} else if (x <= 7.6e-81) {
tmp = 1.0 / ((sin(B) * sqrt(fma(F, F, 2.0))) / F);
} else {
tmp = t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(-Float64(Float64(x * cos(B)) / sin(B))) tmp = 0.0 if (x <= -880000.0) tmp = t_0; elseif (x <= -8e-197) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + fma(F, F, Float64(x * 2.0))))) * Float64(F / B)) - Float64(x / tan(B))); elseif (x <= 7.6e-81) tmp = Float64(1.0 / Float64(Float64(sin(B) * sqrt(fma(F, F, 2.0))) / F)); else tmp = t_0; end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision])}, If[LessEqual[x, -880000.0], t$95$0, If[LessEqual[x, -8e-197], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(F * F + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.6e-81], N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -\frac{x \cdot \cos B}{\sin B}\\
\mathbf{if}\;x \leq -880000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-197}:\\
\;\;\;\;\sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, x \cdot 2\right)}} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{-81}:\\
\;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -8.8e5 or 7.5999999999999997e-81 < x Initial program 82.2%
Taylor expanded in x around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6493.4
Applied rewrites93.4%
if -8.8e5 < x < -7.9999999999999999e-197Initial program 69.9%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites54.6%
Applied rewrites54.4%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6456.7
Applied rewrites56.7%
if -7.9999999999999999e-197 < x < 7.5999999999999997e-81Initial program 67.8%
Applied rewrites67.8%
Taylor expanded in x around 0
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6465.5
Applied rewrites65.5%
Final simplification76.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -26.5)
(- (/ (fma x (cos B) 1.0) (sin B)))
(if (<= F 5e+79)
(- (* (sqrt (/ 1.0 (+ 2.0 (fma F F (* x 2.0))))) (/ F B)) t_0)
(- (/ (fma (* B B) 0.16666666666666666 1.0) B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -26.5) {
tmp = -(fma(x, cos(B), 1.0) / sin(B));
} else if (F <= 5e+79) {
tmp = (sqrt((1.0 / (2.0 + fma(F, F, (x * 2.0))))) * (F / B)) - t_0;
} else {
tmp = (fma((B * B), 0.16666666666666666, 1.0) / B) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -26.5) tmp = Float64(-Float64(fma(x, cos(B), 1.0) / sin(B))); elseif (F <= 5e+79) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + fma(F, F, Float64(x * 2.0))))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(fma(Float64(B * B), 0.16666666666666666, 1.0) / 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, -26.5], (-N[(N[(x * N[Cos[B], $MachinePrecision] + 1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 5e+79], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(F * F + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(N[(B * B), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -26.5:\\
\;\;\;\;-\frac{\mathsf{fma}\left(x, \cos B, 1\right)}{\sin B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{+79}:\\
\;\;\;\;\sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, x \cdot 2\right)}} \cdot \frac{F}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} - t\_0\\
\end{array}
\end{array}
if F < -26.5Initial program 50.6%
Applied rewrites70.3%
Applied rewrites61.9%
Taylor expanded in F around -inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
lower-cos.f64N/A
lower-neg.f64N/A
lower-sin.f6498.9
Applied rewrites98.9%
if -26.5 < F < 5e79Initial program 98.7%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites62.9%
Applied rewrites62.8%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6478.7
Applied rewrites78.7%
if 5e79 < F Initial program 51.1%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites44.8%
Applied rewrites44.7%
Taylor expanded in F around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6462.7
Applied rewrites62.7%
Final simplification81.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= x -4.2e-13)
t_0
(if (<= x 7e-81)
(/ 1.0 (/ (* (sin B) (sqrt (fma F F 2.0))) F))
(if (<= x 1.05e+15)
(+ (* x (/ -1.0 (tan B))) (* (/ F B) (sqrt (/ 1.0 (fma 2.0 x 2.0)))))
t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (x <= -4.2e-13) {
tmp = t_0;
} else if (x <= 7e-81) {
tmp = 1.0 / ((sin(B) * sqrt(fma(F, F, 2.0))) / F);
} else if (x <= 1.05e+15) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) * sqrt((1.0 / fma(2.0, x, 2.0))));
} 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 <= -4.2e-13) tmp = t_0; elseif (x <= 7e-81) tmp = Float64(1.0 / Float64(Float64(sin(B) * sqrt(fma(F, F, 2.0))) / F)); elseif (x <= 1.05e+15) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * sqrt(Float64(1.0 / fma(2.0, x, 2.0))))); else tmp = t_0; end return 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, -4.2e-13], t$95$0, If[LessEqual[x, 7e-81], N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e+15], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $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 -4.2 \cdot 10^{-13}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-81}:\\
\;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{+15}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -4.19999999999999977e-13 or 1.05e15 < x Initial program 82.6%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites70.1%
Applied rewrites70.0%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6482.7
Applied rewrites82.7%
Taylor expanded in F around -inf
lower-/.f6498.9
Applied rewrites98.9%
if -4.19999999999999977e-13 < x < 6.99999999999999973e-81Initial program 68.5%
Applied rewrites68.5%
Taylor expanded in x around 0
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6458.6
Applied rewrites58.6%
if 6.99999999999999973e-81 < x < 1.05e15Initial program 79.2%
Taylor expanded in F around 0
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6468.3
Applied rewrites68.3%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f6468.6
Applied rewrites68.6%
Final simplification75.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ -1.0 B) t_0)))
(if (<= x -4.2e-13)
t_1
(if (<= x 1.45e-55)
(/ 1.0 (/ (* (sin B) (sqrt (fma F F 2.0))) F))
(if (<= x 1.05e+15) (- (* (/ F B) (sqrt (/ 0.5 x))) t_0) t_1)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (-1.0 / B) - t_0;
double tmp;
if (x <= -4.2e-13) {
tmp = t_1;
} else if (x <= 1.45e-55) {
tmp = 1.0 / ((sin(B) * sqrt(fma(F, F, 2.0))) / F);
} else if (x <= 1.05e+15) {
tmp = ((F / B) * sqrt((0.5 / x))) - t_0;
} else {
tmp = t_1;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(-1.0 / B) - t_0) tmp = 0.0 if (x <= -4.2e-13) tmp = t_1; elseif (x <= 1.45e-55) tmp = Float64(1.0 / Float64(Float64(sin(B) * sqrt(fma(F, F, 2.0))) / F)); elseif (x <= 1.05e+15) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(0.5 / x))) - t_0); else tmp = t_1; end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[x, -4.2e-13], t$95$1, If[LessEqual[x, 1.45e-55], N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e+15], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(0.5 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{B} - t\_0\\
\mathbf{if}\;x \leq -4.2 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-55}:\\
\;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{+15}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{0.5}{x}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -4.19999999999999977e-13 or 1.05e15 < x Initial program 82.6%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites70.1%
Applied rewrites70.0%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6482.7
Applied rewrites82.7%
Taylor expanded in F around -inf
lower-/.f6498.9
Applied rewrites98.9%
if -4.19999999999999977e-13 < x < 1.45e-55Initial program 67.9%
Applied rewrites68.0%
Taylor expanded in x around 0
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6457.3
Applied rewrites57.3%
if 1.45e-55 < x < 1.05e15Initial program 88.1%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites82.6%
Applied rewrites82.7%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6488.3
Applied rewrites88.3%
Taylor expanded in x around inf
lower-/.f6483.1
Applied rewrites83.1%
Final simplification75.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= x -4.2e-13)
t_0
(if (<= x 7.6e-81)
(/ 1.0 (/ (* (sin B) (sqrt (fma F F 2.0))) F))
(if (<= x 1.05e+15) (/ (/ x F) (* (tan B) (/ -1.0 F))) t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (x <= -4.2e-13) {
tmp = t_0;
} else if (x <= 7.6e-81) {
tmp = 1.0 / ((sin(B) * sqrt(fma(F, F, 2.0))) / F);
} else if (x <= 1.05e+15) {
tmp = (x / F) / (tan(B) * (-1.0 / F));
} 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 <= -4.2e-13) tmp = t_0; elseif (x <= 7.6e-81) tmp = Float64(1.0 / Float64(Float64(sin(B) * sqrt(fma(F, F, 2.0))) / F)); elseif (x <= 1.05e+15) tmp = Float64(Float64(x / F) / Float64(tan(B) * Float64(-1.0 / F))); else tmp = t_0; end return 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, -4.2e-13], t$95$0, If[LessEqual[x, 7.6e-81], N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e+15], N[(N[(x / F), $MachinePrecision] / N[(N[Tan[B], $MachinePrecision] * N[(-1.0 / F), $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 -4.2 \cdot 10^{-13}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{-81}:\\
\;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{x}{F}}{\tan B \cdot \frac{-1}{F}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -4.19999999999999977e-13 or 1.05e15 < x Initial program 82.6%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites70.1%
Applied rewrites70.0%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6482.7
Applied rewrites82.7%
Taylor expanded in F around -inf
lower-/.f6498.9
Applied rewrites98.9%
if -4.19999999999999977e-13 < x < 7.5999999999999997e-81Initial program 68.5%
Applied rewrites68.5%
Taylor expanded in x around 0
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6458.6
Applied rewrites58.6%
if 7.5999999999999997e-81 < x < 1.05e15Initial program 79.2%
Applied rewrites83.8%
Applied rewrites79.9%
Taylor expanded in x around inf
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6468.2
Applied rewrites68.2%
Final simplification75.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= x -4.2e-13)
t_0
(if (<= x 7.6e-81)
(* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B)))
(if (<= x 1.05e+15) (/ (/ x F) (* (tan B) (/ -1.0 F))) t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (x <= -4.2e-13) {
tmp = t_0;
} else if (x <= 7.6e-81) {
tmp = F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B));
} else if (x <= 1.05e+15) {
tmp = (x / F) / (tan(B) * (-1.0 / F));
} 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 <= -4.2e-13) tmp = t_0; elseif (x <= 7.6e-81) tmp = Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))); elseif (x <= 1.05e+15) tmp = Float64(Float64(x / F) / Float64(tan(B) * Float64(-1.0 / F))); else tmp = t_0; end return 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, -4.2e-13], t$95$0, If[LessEqual[x, 7.6e-81], N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e+15], N[(N[(x / F), $MachinePrecision] / N[(N[Tan[B], $MachinePrecision] * N[(-1.0 / F), $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 -4.2 \cdot 10^{-13}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{-81}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{x}{F}}{\tan B \cdot \frac{-1}{F}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -4.19999999999999977e-13 or 1.05e15 < x Initial program 82.6%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites70.1%
Applied rewrites70.0%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6482.7
Applied rewrites82.7%
Taylor expanded in F around -inf
lower-/.f6498.9
Applied rewrites98.9%
if -4.19999999999999977e-13 < x < 7.5999999999999997e-81Initial program 68.5%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6458.4
Applied rewrites58.4%
if 7.5999999999999997e-81 < x < 1.05e15Initial program 79.2%
Applied rewrites83.8%
Applied rewrites79.9%
Taylor expanded in x around inf
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6468.2
Applied rewrites68.2%
Final simplification75.0%
(FPCore (F B x)
:precision binary64
(if (<= B 0.13)
(/
(fma
F
(sqrt (/ 1.0 (fma 2.0 x (fma F F 2.0))))
(- (* 0.3333333333333333 (* x (* B B))) x))
B)
(- (* (/ F B) (/ 1.0 F)) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 0.13) {
tmp = fma(F, sqrt((1.0 / fma(2.0, x, fma(F, F, 2.0)))), ((0.3333333333333333 * (x * (B * B))) - x)) / B;
} else {
tmp = ((F / B) * (1.0 / F)) - (x / tan(B));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (B <= 0.13) tmp = Float64(fma(F, sqrt(Float64(1.0 / fma(2.0, x, fma(F, F, 2.0)))), Float64(Float64(0.3333333333333333 * Float64(x * Float64(B * B))) - x)) / B); else tmp = Float64(Float64(Float64(F / B) * Float64(1.0 / F)) - Float64(x / tan(B))); end return tmp end
code[F_, B_, x_] := If[LessEqual[B, 0.13], N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(N[(0.3333333333333333 * N[(x * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 0.13:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0.3333333333333333 \cdot \left(x \cdot \left(B \cdot B\right)\right) - x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{1}{F} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 0.13Initial program 73.1%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites67.0%
Applied rewrites66.9%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6462.8
Applied rewrites62.8%
Taylor expanded in B around 0
lower-/.f64N/A
Applied rewrites63.1%
if 0.13 < B Initial program 79.9%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites20.0%
Applied rewrites19.9%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6452.5
Applied rewrites52.5%
Taylor expanded in F around inf
lower-/.f6450.3
Applied rewrites50.3%
Final simplification59.7%
(FPCore (F B x) :precision binary64 (if (<= B 4e-6) (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B) (/ (/ x F) (* (tan B) (/ -1.0 F)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 4e-6) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
} else {
tmp = (x / F) / (tan(B) * (-1.0 / F));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (B <= 4e-6) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B); else tmp = Float64(Float64(x / F) / Float64(tan(B) * Float64(-1.0 / F))); end return tmp end
code[F_, B_, x_] := If[LessEqual[B, 4e-6], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(x / F), $MachinePrecision] / N[(N[Tan[B], $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 4 \cdot 10^{-6}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{F}}{\tan B \cdot \frac{-1}{F}}\\
\end{array}
\end{array}
if B < 3.99999999999999982e-6Initial program 73.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6463.5
Applied rewrites63.5%
Applied rewrites63.5%
if 3.99999999999999982e-6 < B Initial program 79.1%
Applied rewrites79.1%
Applied rewrites75.3%
Taylor expanded in x around inf
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6448.5
Applied rewrites48.5%
Final simplification59.4%
(FPCore (F B x) :precision binary64 (if (<= B 1.18e-45) (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B) (- (/ -1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 1.18e-45) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
} else {
tmp = (-1.0 / B) - (x / tan(B));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (B <= 1.18e-45) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B); else tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); end return tmp end
code[F_, B_, x_] := If[LessEqual[B, 1.18e-45], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $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}\;B \leq 1.18 \cdot 10^{-45}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 1.18e-45Initial program 73.0%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6462.5
Applied rewrites62.5%
Applied rewrites62.5%
if 1.18e-45 < B Initial program 79.2%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites28.2%
Applied rewrites28.2%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6455.9
Applied rewrites55.9%
Taylor expanded in F around -inf
lower-/.f6448.7
Applied rewrites48.7%
(FPCore (F B x)
:precision binary64
(if (<= B 0.135)
(/
(fma
F
(sqrt (/ 1.0 (fma 2.0 x (fma F F 2.0))))
(- (* 0.3333333333333333 (* x (* B B))) x))
B)
(- (* B 0.16666666666666666) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 0.135) {
tmp = fma(F, sqrt((1.0 / fma(2.0, x, fma(F, F, 2.0)))), ((0.3333333333333333 * (x * (B * B))) - x)) / B;
} else {
tmp = (B * 0.16666666666666666) - (x / tan(B));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (B <= 0.135) tmp = Float64(fma(F, sqrt(Float64(1.0 / fma(2.0, x, fma(F, F, 2.0)))), Float64(Float64(0.3333333333333333 * Float64(x * Float64(B * B))) - x)) / B); else tmp = Float64(Float64(B * 0.16666666666666666) - Float64(x / tan(B))); end return tmp end
code[F_, B_, x_] := If[LessEqual[B, 0.135], N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(N[(0.3333333333333333 * N[(x * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(B * 0.16666666666666666), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 0.135:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0.3333333333333333 \cdot \left(x \cdot \left(B \cdot B\right)\right) - x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot 0.16666666666666666 - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 0.13500000000000001Initial program 73.1%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites67.0%
Applied rewrites66.9%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6462.8
Applied rewrites62.8%
Taylor expanded in B around 0
lower-/.f64N/A
Applied rewrites63.1%
if 0.13500000000000001 < B Initial program 79.9%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites20.0%
Applied rewrites19.9%
Taylor expanded in F around inf
*-commutativeN/A
lower-*.f6411.1
Applied rewrites11.1%
Taylor expanded in B around inf
*-commutativeN/A
lower-*.f6418.0
Applied rewrites18.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (fma 2.0 x 2.0) (* F F))))
(if (<= F -110.0)
(/ (fma 0.5 t_0 (- -1.0 x)) B)
(if (<= F 3000000.0)
(/
(fma
F
(fma
(* -0.5 (* F F))
(sqrt
(/ 1.0 (* (fma 2.0 x 2.0) (* (fma 2.0 x 2.0) (fma 2.0 x 2.0)))))
(sqrt (/ 1.0 (fma 2.0 x 2.0))))
(- x))
B)
(/ (- (fma -0.5 t_0 1.0) x) B)))))
double code(double F, double B, double x) {
double t_0 = fma(2.0, x, 2.0) / (F * F);
double tmp;
if (F <= -110.0) {
tmp = fma(0.5, t_0, (-1.0 - x)) / B;
} else if (F <= 3000000.0) {
tmp = fma(F, fma((-0.5 * (F * F)), sqrt((1.0 / (fma(2.0, x, 2.0) * (fma(2.0, x, 2.0) * fma(2.0, x, 2.0))))), sqrt((1.0 / fma(2.0, x, 2.0)))), -x) / B;
} else {
tmp = (fma(-0.5, t_0, 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(fma(2.0, x, 2.0) / Float64(F * F)) tmp = 0.0 if (F <= -110.0) tmp = Float64(fma(0.5, t_0, Float64(-1.0 - x)) / B); elseif (F <= 3000000.0) tmp = Float64(fma(F, fma(Float64(-0.5 * Float64(F * F)), sqrt(Float64(1.0 / Float64(fma(2.0, x, 2.0) * Float64(fma(2.0, x, 2.0) * fma(2.0, x, 2.0))))), sqrt(Float64(1.0 / fma(2.0, x, 2.0)))), Float64(-x)) / B); else tmp = Float64(Float64(fma(-0.5, t_0, 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -110.0], N[(N[(0.5 * t$95$0 + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3000000.0], N[(N[(F * N[(N[(-0.5 * N[(F * F), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(N[(2.0 * x + 2.0), $MachinePrecision] * N[(N[(2.0 * x + 2.0), $MachinePrecision] * N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[Sqrt[N[(1.0 / N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(-0.5 * t$95$0 + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}\\
\mathbf{if}\;F \leq -110:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.5, t\_0, -1 - x\right)}{B}\\
\mathbf{elif}\;F \leq 3000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, \mathsf{fma}\left(-0.5 \cdot \left(F \cdot F\right), \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right) \cdot \left(\mathsf{fma}\left(2, x, 2\right) \cdot \mathsf{fma}\left(2, x, 2\right)\right)}}, \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}\right), -x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-0.5, t\_0, 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -110Initial program 49.9%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6446.5
Applied rewrites46.5%
Taylor expanded in F around -inf
sub-negN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6455.6
Applied rewrites55.6%
if -110 < F < 3e6Initial program 99.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.3
Applied rewrites47.3%
Taylor expanded in F around 0
sub-negN/A
lower-fma.f64N/A
Applied rewrites47.3%
if 3e6 < F Initial program 63.3%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.5
Applied rewrites47.5%
Taylor expanded in F around inf
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6455.5
Applied rewrites55.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (fma 2.0 x 2.0) (* F F))))
(if (<= F -106.0)
(/ (fma 0.5 t_0 (- -1.0 x)) B)
(if (<= F 58000000000000.0)
(/
(fma
F
(sqrt (/ 1.0 (fma 2.0 x (fma F F 2.0))))
(- (* 0.3333333333333333 (* x (* B B))) x))
B)
(/ (- (fma -0.5 t_0 1.0) x) B)))))
double code(double F, double B, double x) {
double t_0 = fma(2.0, x, 2.0) / (F * F);
double tmp;
if (F <= -106.0) {
tmp = fma(0.5, t_0, (-1.0 - x)) / B;
} else if (F <= 58000000000000.0) {
tmp = fma(F, sqrt((1.0 / fma(2.0, x, fma(F, F, 2.0)))), ((0.3333333333333333 * (x * (B * B))) - x)) / B;
} else {
tmp = (fma(-0.5, t_0, 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(fma(2.0, x, 2.0) / Float64(F * F)) tmp = 0.0 if (F <= -106.0) tmp = Float64(fma(0.5, t_0, Float64(-1.0 - x)) / B); elseif (F <= 58000000000000.0) tmp = Float64(fma(F, sqrt(Float64(1.0 / fma(2.0, x, fma(F, F, 2.0)))), Float64(Float64(0.3333333333333333 * Float64(x * Float64(B * B))) - x)) / B); else tmp = Float64(Float64(fma(-0.5, t_0, 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -106.0], N[(N[(0.5 * t$95$0 + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 58000000000000.0], N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(N[(0.3333333333333333 * N[(x * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(-0.5 * t$95$0 + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}\\
\mathbf{if}\;F \leq -106:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.5, t\_0, -1 - x\right)}{B}\\
\mathbf{elif}\;F \leq 58000000000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0.3333333333333333 \cdot \left(x \cdot \left(B \cdot B\right)\right) - x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-0.5, t\_0, 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -106Initial program 50.6%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6445.9
Applied rewrites45.9%
Taylor expanded in F around -inf
sub-negN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6454.9
Applied rewrites54.9%
if -106 < F < 5.8e13Initial program 99.5%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites62.4%
Applied rewrites62.5%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6478.9
Applied rewrites78.9%
Taylor expanded in B around 0
lower-/.f64N/A
Applied rewrites47.4%
if 5.8e13 < F Initial program 61.7%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6448.0
Applied rewrites48.0%
Taylor expanded in F around inf
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6456.4
Applied rewrites56.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (fma 2.0 x 2.0) (* F F))))
(if (<= F -106.0)
(/ (fma 0.5 t_0 (- -1.0 x)) B)
(if (<= F 0.33)
(/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B)
(/ (- (fma -0.5 t_0 1.0) x) B)))))
double code(double F, double B, double x) {
double t_0 = fma(2.0, x, 2.0) / (F * F);
double tmp;
if (F <= -106.0) {
tmp = fma(0.5, t_0, (-1.0 - x)) / B;
} else if (F <= 0.33) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
} else {
tmp = (fma(-0.5, t_0, 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(fma(2.0, x, 2.0) / Float64(F * F)) tmp = 0.0 if (F <= -106.0) tmp = Float64(fma(0.5, t_0, Float64(-1.0 - x)) / B); elseif (F <= 0.33) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B); else tmp = Float64(Float64(fma(-0.5, t_0, 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -106.0], N[(N[(0.5 * t$95$0 + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.33], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(-0.5 * t$95$0 + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}\\
\mathbf{if}\;F \leq -106:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.5, t\_0, -1 - x\right)}{B}\\
\mathbf{elif}\;F \leq 0.33:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-0.5, t\_0, 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -106Initial program 50.6%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6445.9
Applied rewrites45.9%
Taylor expanded in F around -inf
sub-negN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6454.9
Applied rewrites54.9%
if -106 < F < 0.330000000000000016Initial program 99.5%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.7
Applied rewrites47.7%
Applied rewrites47.7%
if 0.330000000000000016 < F Initial program 64.2%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.6
Applied rewrites47.6%
Taylor expanded in F around inf
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6455.4
Applied rewrites55.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (fma 2.0 x 2.0) (* F F))))
(if (<= F -37.0)
(/ (fma 0.5 t_0 (- -1.0 x)) B)
(if (<= F 0.33)
(/ (fma F (sqrt (/ 1.0 (fma 2.0 x 2.0))) (- x)) B)
(/ (- (fma -0.5 t_0 1.0) x) B)))))
double code(double F, double B, double x) {
double t_0 = fma(2.0, x, 2.0) / (F * F);
double tmp;
if (F <= -37.0) {
tmp = fma(0.5, t_0, (-1.0 - x)) / B;
} else if (F <= 0.33) {
tmp = fma(F, sqrt((1.0 / fma(2.0, x, 2.0))), -x) / B;
} else {
tmp = (fma(-0.5, t_0, 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(fma(2.0, x, 2.0) / Float64(F * F)) tmp = 0.0 if (F <= -37.0) tmp = Float64(fma(0.5, t_0, Float64(-1.0 - x)) / B); elseif (F <= 0.33) tmp = Float64(fma(F, sqrt(Float64(1.0 / fma(2.0, x, 2.0))), Float64(-x)) / B); else tmp = Float64(Float64(fma(-0.5, t_0, 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -37.0], N[(N[(0.5 * t$95$0 + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.33], N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(-0.5 * t$95$0 + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}\\
\mathbf{if}\;F \leq -37:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.5, t\_0, -1 - x\right)}{B}\\
\mathbf{elif}\;F \leq 0.33:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}, -x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-0.5, t\_0, 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -37Initial program 50.6%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6445.9
Applied rewrites45.9%
Taylor expanded in F around -inf
sub-negN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6454.9
Applied rewrites54.9%
if -37 < F < 0.330000000000000016Initial program 99.5%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.7
Applied rewrites47.7%
Taylor expanded in F around 0
+-commutativeN/A
mul-1-negN/A
sub-negN/A
associate-*l/N/A
div-subN/A
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6447.7
Applied rewrites47.7%
if 0.330000000000000016 < F Initial program 64.2%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.6
Applied rewrites47.6%
Taylor expanded in F around inf
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6455.4
Applied rewrites55.4%
(FPCore (F B x)
:precision binary64
(if (<= F -6.2e-54)
(/ (- -1.0 x) B)
(if (<= F 3000000.0)
(* (- x) (fma B -0.3333333333333333 (/ 1.0 B)))
(/ (- (fma -0.5 (/ (fma 2.0 x 2.0) (* F F)) 1.0) x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e-54) {
tmp = (-1.0 - x) / B;
} else if (F <= 3000000.0) {
tmp = -x * fma(B, -0.3333333333333333, (1.0 / B));
} else {
tmp = (fma(-0.5, (fma(2.0, x, 2.0) / (F * F)), 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -6.2e-54) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3000000.0) tmp = Float64(Float64(-x) * fma(B, -0.3333333333333333, Float64(1.0 / B))); else tmp = Float64(Float64(fma(-0.5, Float64(fma(2.0, x, 2.0) / Float64(F * F)), 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -6.2e-54], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3000000.0], N[((-x) * N[(B * -0.3333333333333333 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.5 * N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.2 \cdot 10^{-54}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3000000:\\
\;\;\;\;\left(-x\right) \cdot \mathsf{fma}\left(B, -0.3333333333333333, \frac{1}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -6.20000000000000008e-54Initial program 53.0%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6446.2
Applied rewrites46.2%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6452.4
Applied rewrites52.4%
if -6.20000000000000008e-54 < F < 3e6Initial program 99.5%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites63.6%
Taylor expanded in B around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6447.0
Applied rewrites47.0%
Taylor expanded in x around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-neg.f6438.9
Applied rewrites38.9%
if 3e6 < F Initial program 63.3%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.5
Applied rewrites47.5%
Taylor expanded in F around inf
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6455.5
Applied rewrites55.5%
Final simplification47.7%
(FPCore (F B x)
:precision binary64
(if (<= F -6.2e-54)
(/ (- -1.0 x) B)
(if (<= F 3000000.0)
(* (- x) (fma B -0.3333333333333333 (/ 1.0 B)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e-54) {
tmp = (-1.0 - x) / B;
} else if (F <= 3000000.0) {
tmp = -x * fma(B, -0.3333333333333333, (1.0 / B));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -6.2e-54) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3000000.0) tmp = Float64(Float64(-x) * fma(B, -0.3333333333333333, Float64(1.0 / B))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -6.2e-54], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3000000.0], N[((-x) * N[(B * -0.3333333333333333 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.2 \cdot 10^{-54}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3000000:\\
\;\;\;\;\left(-x\right) \cdot \mathsf{fma}\left(B, -0.3333333333333333, \frac{1}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6.20000000000000008e-54Initial program 53.0%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6446.2
Applied rewrites46.2%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6452.4
Applied rewrites52.4%
if -6.20000000000000008e-54 < F < 3e6Initial program 99.5%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites63.6%
Taylor expanded in B around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6447.0
Applied rewrites47.0%
Taylor expanded in x around inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-neg.f6438.9
Applied rewrites38.9%
if 3e6 < F Initial program 63.3%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.5
Applied rewrites47.5%
Taylor expanded in F around inf
lower-/.f64N/A
lower--.f6455.3
Applied rewrites55.3%
Final simplification47.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) B)))
(if (<= F -6.2e-54)
(/ (- -1.0 x) B)
(if (<= F 2.2e+17) t_0 (if (<= F 8.2e+154) (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (F <= -6.2e-54) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.2e+17) {
tmp = t_0;
} else if (F <= 8.2e+154) {
tmp = 1.0 / 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) :: tmp
t_0 = -x / b
if (f <= (-6.2d-54)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.2d+17) then
tmp = t_0
else if (f <= 8.2d+154) then
tmp = 1.0d0 / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (F <= -6.2e-54) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.2e+17) {
tmp = t_0;
} else if (F <= 8.2e+154) {
tmp = 1.0 / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = -x / B tmp = 0 if F <= -6.2e-54: tmp = (-1.0 - x) / B elif F <= 2.2e+17: tmp = t_0 elif F <= 8.2e+154: tmp = 1.0 / B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / B) tmp = 0.0 if (F <= -6.2e-54) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.2e+17) tmp = t_0; elseif (F <= 8.2e+154) tmp = Float64(1.0 / B); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / B; tmp = 0.0; if (F <= -6.2e-54) tmp = (-1.0 - x) / B; elseif (F <= 2.2e+17) tmp = t_0; elseif (F <= 8.2e+154) tmp = 1.0 / B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / B), $MachinePrecision]}, If[LessEqual[F, -6.2e-54], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.2e+17], t$95$0, If[LessEqual[F, 8.2e+154], N[(1.0 / B), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{B}\\
\mathbf{if}\;F \leq -6.2 \cdot 10^{-54}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{+17}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -6.20000000000000008e-54Initial program 53.0%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6446.2
Applied rewrites46.2%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6452.4
Applied rewrites52.4%
if -6.20000000000000008e-54 < F < 2.2e17 or 8.2e154 < F Initial program 85.0%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6444.4
Applied rewrites44.4%
Taylor expanded in F around 0
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
lower-neg.f6437.1
Applied rewrites37.1%
if 2.2e17 < F < 8.2e154Initial program 83.9%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6459.7
Applied rewrites59.7%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-/.f6432.8
Applied rewrites32.8%
Taylor expanded in F around inf
lower-/.f6446.1
Applied rewrites46.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) B)))
(if (<= x -8.2e-89)
t_0
(if (<= x 1.05e-280) (/ 1.0 B) (if (<= x 6.2e-129) (/ -1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (x <= -8.2e-89) {
tmp = t_0;
} else if (x <= 1.05e-280) {
tmp = 1.0 / B;
} else if (x <= 6.2e-129) {
tmp = -1.0 / 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) :: tmp
t_0 = -x / b
if (x <= (-8.2d-89)) then
tmp = t_0
else if (x <= 1.05d-280) then
tmp = 1.0d0 / b
else if (x <= 6.2d-129) then
tmp = (-1.0d0) / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (x <= -8.2e-89) {
tmp = t_0;
} else if (x <= 1.05e-280) {
tmp = 1.0 / B;
} else if (x <= 6.2e-129) {
tmp = -1.0 / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = -x / B tmp = 0 if x <= -8.2e-89: tmp = t_0 elif x <= 1.05e-280: tmp = 1.0 / B elif x <= 6.2e-129: tmp = -1.0 / B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / B) tmp = 0.0 if (x <= -8.2e-89) tmp = t_0; elseif (x <= 1.05e-280) tmp = Float64(1.0 / B); elseif (x <= 6.2e-129) tmp = Float64(-1.0 / B); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / B; tmp = 0.0; if (x <= -8.2e-89) tmp = t_0; elseif (x <= 1.05e-280) tmp = 1.0 / B; elseif (x <= 6.2e-129) tmp = -1.0 / B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / B), $MachinePrecision]}, If[LessEqual[x, -8.2e-89], t$95$0, If[LessEqual[x, 1.05e-280], N[(1.0 / B), $MachinePrecision], If[LessEqual[x, 6.2e-129], N[(-1.0 / B), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{B}\\
\mathbf{if}\;x \leq -8.2 \cdot 10^{-89}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-280}:\\
\;\;\;\;\frac{1}{B}\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{-129}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -8.1999999999999997e-89 or 6.2000000000000001e-129 < x Initial program 80.1%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6452.6
Applied rewrites52.6%
Taylor expanded in F around 0
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
lower-neg.f6445.7
Applied rewrites45.7%
if -8.1999999999999997e-89 < x < 1.05e-280Initial program 69.8%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6434.9
Applied rewrites34.9%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-/.f6424.2
Applied rewrites24.2%
Taylor expanded in F around inf
lower-/.f6424.4
Applied rewrites24.4%
if 1.05e-280 < x < 6.2000000000000001e-129Initial program 60.2%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6443.5
Applied rewrites43.5%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-/.f6429.4
Applied rewrites29.4%
Taylor expanded in F around -inf
lower-/.f6434.8
Applied rewrites34.8%
(FPCore (F B x) :precision binary64 (if (<= F -6.2e-54) (/ (- -1.0 x) B) (if (<= F 4.5e-38) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e-54) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.5e-38) {
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 <= (-6.2d-54)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.5d-38) 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 <= -6.2e-54) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.5e-38) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.2e-54: tmp = (-1.0 - x) / B elif F <= 4.5e-38: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.2e-54) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.5e-38) 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 <= -6.2e-54) tmp = (-1.0 - x) / B; elseif (F <= 4.5e-38) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.2e-54], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.5e-38], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.2 \cdot 10^{-54}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-38}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6.20000000000000008e-54Initial program 53.0%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6446.2
Applied rewrites46.2%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6452.4
Applied rewrites52.4%
if -6.20000000000000008e-54 < F < 4.50000000000000009e-38Initial program 99.5%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.4
Applied rewrites47.4%
Taylor expanded in F around 0
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
lower-neg.f6439.1
Applied rewrites39.1%
if 4.50000000000000009e-38 < F Initial program 69.5%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.6
Applied rewrites47.6%
Taylor expanded in F around inf
lower-/.f64N/A
lower--.f6451.9
Applied rewrites51.9%
(FPCore (F B x) :precision binary64 (if (<= F 3000000.0) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 3000000.0) {
tmp = -1.0 / 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 (f <= 3000000.0d0) then
tmp = (-1.0d0) / 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 (F <= 3000000.0) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 3000000.0: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 3000000.0) tmp = Float64(-1.0 / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 3000000.0) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 3000000.0], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 3000000:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 3e6Initial program 79.5%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.0
Applied rewrites47.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-/.f6413.2
Applied rewrites13.2%
Taylor expanded in F around -inf
lower-/.f6414.5
Applied rewrites14.5%
if 3e6 < F Initial program 63.3%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.5
Applied rewrites47.5%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-/.f6418.6
Applied rewrites18.6%
Taylor expanded in F around inf
lower-/.f6432.3
Applied rewrites32.3%
(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.0%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.1
Applied rewrites47.1%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-/.f6414.7
Applied rewrites14.7%
Taylor expanded in F around -inf
lower-/.f6411.0
Applied rewrites11.0%
(FPCore (F B x) :precision binary64 (* B -0.16666666666666666))
double code(double F, double B, double x) {
return B * -0.16666666666666666;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = b * (-0.16666666666666666d0)
end function
public static double code(double F, double B, double x) {
return B * -0.16666666666666666;
}
def code(F, B, x): return B * -0.16666666666666666
function code(F, B, x) return Float64(B * -0.16666666666666666) end
function tmp = code(F, B, x) tmp = B * -0.16666666666666666; end
code[F_, B_, x_] := N[(B * -0.16666666666666666), $MachinePrecision]
\begin{array}{l}
\\
B \cdot -0.16666666666666666
\end{array}
Initial program 75.0%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites54.3%
Taylor expanded in B around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f642.6
Applied rewrites2.6%
Taylor expanded in F around -inf
*-commutativeN/A
lower-*.f642.9
Applied rewrites2.9%
herbie shell --seed 2024214
(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))))))