
(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 20 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
(if (<= F -1e+156)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 1000000.0)
(- (/ F (* (sin B) (sqrt (fma 2.0 x (fma F F 2.0))))) (/ x (tan B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1e+156) {
tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 1000000.0) {
tmp = (F / (sin(B) * sqrt(fma(2.0, x, fma(F, F, 2.0))))) - (x / tan(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -1e+156) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 1000000.0) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(2.0, x, fma(F, F, 2.0))))) - Float64(x / tan(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -1e+156], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1 \cdot 10^{+156}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 1000000:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -9.9999999999999998e155Initial program 24.3%
Taylor expanded in F around -inf
mul-1-negN/A
distribute-neg-inN/A
sub-negN/A
--lowering--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6499.8
Simplified99.8%
if -9.9999999999999998e155 < F < 1e6Initial program 98.2%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.7%
+-commutativeN/A
metadata-evalN/A
sqrt-pow2N/A
+-commutativeN/A
*-commutativeN/A
inv-powN/A
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f6499.6
Applied egg-rr99.6%
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr99.7%
if 1e6 < F Initial program 55.0%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8
Simplified99.8%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+151)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 500000000.0)
(- (/ F (* (sin B) (sqrt (fma 2.0 x (fma F F 2.0))))) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+151) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 500000000.0) {
tmp = (F / (sin(B) * sqrt(fma(2.0, x, fma(F, F, 2.0))))) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+151) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 500000000.0) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(2.0, x, fma(F, F, 2.0))))) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+151], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 500000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+151}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 500000000:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2.00000000000000003e151Initial program 24.3%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr38.8%
+-commutativeN/A
metadata-evalN/A
sqrt-pow2N/A
+-commutativeN/A
*-commutativeN/A
inv-powN/A
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f6438.8
Applied egg-rr38.8%
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr38.8%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.7
Simplified99.7%
if -2.00000000000000003e151 < F < 5e8Initial program 98.2%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.7%
+-commutativeN/A
metadata-evalN/A
sqrt-pow2N/A
+-commutativeN/A
*-commutativeN/A
inv-powN/A
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f6499.6
Applied egg-rr99.6%
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr99.7%
if 5e8 < F Initial program 55.0%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8
Simplified99.8%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -190.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.35)
(- (/ F (* (sin B) (sqrt (fma x 2.0 2.0)))) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -190.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.35) {
tmp = (F / (sin(B) * sqrt(fma(x, 2.0, 2.0)))) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -190.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.35) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(x, 2.0, 2.0)))) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -190.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.35], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(x * 2.0 + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -190:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.35:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, 2\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -190Initial program 55.9%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr65.6%
+-commutativeN/A
metadata-evalN/A
sqrt-pow2N/A
+-commutativeN/A
*-commutativeN/A
inv-powN/A
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f6465.6
Applied egg-rr65.6%
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr65.7%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8
Simplified99.8%
if -190 < F < 1.3500000000000001Initial program 99.4%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.6%
+-commutativeN/A
metadata-evalN/A
sqrt-pow2N/A
+-commutativeN/A
*-commutativeN/A
inv-powN/A
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f6499.6
Applied egg-rr99.6%
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr99.7%
Taylor expanded in F around 0
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6499.7
Simplified99.7%
if 1.3500000000000001 < F Initial program 56.2%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6498.8
Simplified98.8%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.45e-12)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 4.6e-57)
(+ t_0 (* (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0)))) (/ F B)))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.45e-12) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 4.6e-57) {
tmp = t_0 + (sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * (F / B));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.45e-12) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 4.6e-57) tmp = Float64(t_0 + Float64(sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * Float64(F / B))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45e-12], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.6e-57], N[(t$95$0 + N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.45 \cdot 10^{-12}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-57}:\\
\;\;\;\;t\_0 + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.4500000000000001e-12Initial program 57.2%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr66.6%
+-commutativeN/A
metadata-evalN/A
sqrt-pow2N/A
+-commutativeN/A
*-commutativeN/A
inv-powN/A
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f6466.6
Applied egg-rr66.6%
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr66.7%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8
Simplified99.8%
if -1.4500000000000001e-12 < F < 4.6e-57Initial program 99.5%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6485.9
Simplified85.9%
if 4.6e-57 < F Initial program 59.6%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6494.7
Simplified94.7%
Final simplification92.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45e-12)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 4.6e-57)
(+
(* x (/ -1.0 (tan B)))
(* (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0)))) (/ F B)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.45e-12) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 4.6e-57) {
tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * (F / B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45e-12) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 4.6e-57) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45e-12], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.6e-57], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45 \cdot 10^{-12}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-57}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4500000000000001e-12Initial program 57.2%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr66.6%
+-commutativeN/A
metadata-evalN/A
sqrt-pow2N/A
+-commutativeN/A
*-commutativeN/A
inv-powN/A
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f6466.6
Applied egg-rr66.6%
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr66.7%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8
Simplified99.8%
if -1.4500000000000001e-12 < F < 4.6e-57Initial program 99.5%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6485.9
Simplified85.9%
if 4.6e-57 < F Initial program 59.6%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr78.8%
+-commutativeN/A
metadata-evalN/A
sqrt-pow2N/A
+-commutativeN/A
*-commutativeN/A
inv-powN/A
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f6478.8
Applied egg-rr78.8%
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr78.9%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6494.7
Simplified94.7%
Final simplification92.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.45e-12)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 3.05e+60)
(+ t_0 (* (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0)))) (/ F B)))
(if (<= F 3.5e+123)
(- (/ F (* (sin B) (sqrt (fma 2.0 x (fma F F 2.0))))) (/ x B))
t_0)))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.45e-12) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 3.05e+60) {
tmp = t_0 + (sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * (F / B));
} else if (F <= 3.5e+123) {
tmp = (F / (sin(B) * sqrt(fma(2.0, x, fma(F, F, 2.0))))) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.45e-12) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 3.05e+60) tmp = Float64(t_0 + Float64(sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * Float64(F / B))); elseif (F <= 3.5e+123) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(2.0, x, fma(F, F, 2.0))))) - Float64(x / B)); else tmp = t_0; end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45e-12], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.05e+60], N[(t$95$0 + N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.5e+123], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.45 \cdot 10^{-12}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 3.05 \cdot 10^{+60}:\\
\;\;\;\;t\_0 + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{+123}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -1.4500000000000001e-12Initial program 57.2%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr66.6%
+-commutativeN/A
metadata-evalN/A
sqrt-pow2N/A
+-commutativeN/A
*-commutativeN/A
inv-powN/A
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f6466.6
Applied egg-rr66.6%
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr66.7%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8
Simplified99.8%
if -1.4500000000000001e-12 < F < 3.05e60Initial program 98.8%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6484.1
Simplified84.1%
if 3.05e60 < F < 3.5e123Initial program 71.8%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.5%
+-commutativeN/A
metadata-evalN/A
sqrt-pow2N/A
+-commutativeN/A
*-commutativeN/A
inv-powN/A
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f6499.6
Applied egg-rr99.6%
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr99.8%
Taylor expanded in B around 0
Simplified92.7%
if 3.5e123 < F Initial program 38.7%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6461.2
Simplified61.2%
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-/l/N/A
tan-quotN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6461.3
Applied egg-rr61.3%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6461.3
Applied egg-rr61.3%
Final simplification84.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))))
(if (<= x -6.2e-93)
t_0
(if (<= x 1.2e-11)
(- (/ F (* (sin B) (sqrt (fma 2.0 x (fma F F 2.0))))) (/ x B))
t_0))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double tmp;
if (x <= -6.2e-93) {
tmp = t_0;
} else if (x <= 1.2e-11) {
tmp = (F / (sin(B) * sqrt(fma(2.0, x, fma(F, F, 2.0))))) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) tmp = 0.0 if (x <= -6.2e-93) tmp = t_0; elseif (x <= 1.2e-11) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(2.0, x, fma(F, F, 2.0))))) - Float64(x / B)); else tmp = t_0; end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.2e-93], t$95$0, If[LessEqual[x, 1.2e-11], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{-93}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-11}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -6.19999999999999999e-93 or 1.2000000000000001e-11 < x Initial program 78.2%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6490.8
Simplified90.8%
associate-/l*N/A
distribute-lft-neg-inN/A
clear-numN/A
tan-quotN/A
div-invN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
tan-lowering-tan.f6490.9
Applied egg-rr90.9%
if -6.19999999999999999e-93 < x < 1.2000000000000001e-11Initial program 70.0%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr72.8%
+-commutativeN/A
metadata-evalN/A
sqrt-pow2N/A
+-commutativeN/A
*-commutativeN/A
inv-powN/A
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f6472.8
Applied egg-rr72.8%
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr72.9%
Taylor expanded in B around 0
Simplified62.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))))
(if (<= x -1.1e-107)
t_0
(if (<= x 1.1e-11) (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double tmp;
if (x <= -1.1e-107) {
tmp = t_0;
} else if (x <= 1.1e-11) {
tmp = F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B));
} else {
tmp = t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) tmp = 0.0 if (x <= -1.1e-107) tmp = t_0; elseif (x <= 1.1e-11) tmp = Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))); else tmp = t_0; end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.1e-107], t$95$0, If[LessEqual[x, 1.1e-11], N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
\mathbf{if}\;x \leq -1.1 \cdot 10^{-107}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{-11}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.10000000000000006e-107 or 1.1000000000000001e-11 < x Initial program 78.0%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6489.6
Simplified89.6%
associate-/l*N/A
distribute-lft-neg-inN/A
clear-numN/A
tan-quotN/A
div-invN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
tan-lowering-tan.f6489.8
Applied egg-rr89.8%
if -1.10000000000000006e-107 < x < 1.1000000000000001e-11Initial program 70.1%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
sin-lowering-sin.f6454.3
Simplified54.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0))))))
(if (<= B 1.4)
(/
(fma
(* B B)
(fma
t_0
(fma (* F (* B B)) 0.019444444444444445 (* F 0.16666666666666666))
(* x (fma 0.022222222222222223 (* B B) 0.3333333333333333)))
(fma F t_0 (- x)))
B)
(/ (- x) (tan B)))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0))));
double tmp;
if (B <= 1.4) {
tmp = fma((B * B), fma(t_0, fma((F * (B * B)), 0.019444444444444445, (F * 0.16666666666666666)), (x * fma(0.022222222222222223, (B * B), 0.3333333333333333))), fma(F, t_0, -x)) / B;
} else {
tmp = -x / tan(B);
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))) tmp = 0.0 if (B <= 1.4) tmp = Float64(fma(Float64(B * B), fma(t_0, fma(Float64(F * Float64(B * B)), 0.019444444444444445, Float64(F * 0.16666666666666666)), Float64(x * fma(0.022222222222222223, Float64(B * B), 0.3333333333333333))), fma(F, t_0, Float64(-x))) / B); else tmp = Float64(Float64(-x) / tan(B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, 1.4], N[(N[(N[(B * B), $MachinePrecision] * N[(t$95$0 * N[(N[(F * N[(B * B), $MachinePrecision]), $MachinePrecision] * 0.019444444444444445 + N[(F * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(x * N[(0.022222222222222223 * N[(B * B), $MachinePrecision] + 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F * t$95$0 + (-x)), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}\\
\mathbf{if}\;B \leq 1.4:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(t\_0, \mathsf{fma}\left(F \cdot \left(B \cdot B\right), 0.019444444444444445, F \cdot 0.16666666666666666\right), x \cdot \mathsf{fma}\left(0.022222222222222223, B \cdot B, 0.3333333333333333\right)\right), \mathsf{fma}\left(F, t\_0, -x\right)\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if B < 1.3999999999999999Initial program 72.0%
Taylor expanded in B around 0
Simplified53.0%
if 1.3999999999999999 < B Initial program 81.4%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6458.4
Simplified58.4%
associate-/l*N/A
distribute-lft-neg-inN/A
clear-numN/A
tan-quotN/A
div-invN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
tan-lowering-tan.f6458.6
Applied egg-rr58.6%
Final simplification54.5%
(FPCore (F B x)
:precision binary64
(if (<= B 1.4)
(/
(fma
(* B B)
(* x (fma (* B B) 0.022222222222222223 0.3333333333333333))
(fma F (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0)))) (- x)))
B)
(/ (- x) (tan B))))
double code(double F, double B, double x) {
double tmp;
if (B <= 1.4) {
tmp = fma((B * B), (x * fma((B * B), 0.022222222222222223, 0.3333333333333333)), fma(F, sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))), -x)) / B;
} else {
tmp = -x / tan(B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (B <= 1.4) tmp = Float64(fma(Float64(B * B), Float64(x * fma(Float64(B * B), 0.022222222222222223, 0.3333333333333333)), fma(F, sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))), Float64(-x))) / B); else tmp = Float64(Float64(-x) / tan(B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[B, 1.4], N[(N[(N[(B * B), $MachinePrecision] * N[(x * N[(N[(B * B), $MachinePrecision] * 0.022222222222222223 + 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(F * N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + (-x)), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.4:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, x \cdot \mathsf{fma}\left(B \cdot B, 0.022222222222222223, 0.3333333333333333\right), \mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if B < 1.3999999999999999Initial program 72.0%
Taylor expanded in B around 0
Simplified53.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6453.5
Simplified53.5%
if 1.3999999999999999 < B Initial program 81.4%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6458.4
Simplified58.4%
associate-/l*N/A
distribute-lft-neg-inN/A
clear-numN/A
tan-quotN/A
div-invN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
tan-lowering-tan.f6458.6
Applied egg-rr58.6%
(FPCore (F B x)
:precision binary64
(if (<= F -1.35e+154)
(/
(-
(fma
(* B B)
(fma
(* B B)
-0.019444444444444445
(fma
x
(fma (* B B) 0.022222222222222223 0.3333333333333333)
-0.16666666666666666))
-1.0)
x)
B)
(if (<= F 1000000.0)
(- (/ (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) B) (/ x B))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.35e+154) {
tmp = (fma((B * B), fma((B * B), -0.019444444444444445, fma(x, fma((B * B), 0.022222222222222223, 0.3333333333333333), -0.16666666666666666)), -1.0) - x) / B;
} else if (F <= 1000000.0) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / B) - (x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -1.35e+154) tmp = Float64(Float64(fma(Float64(B * B), fma(Float64(B * B), -0.019444444444444445, fma(x, fma(Float64(B * B), 0.022222222222222223, 0.3333333333333333), -0.16666666666666666)), -1.0) - x) / B); elseif (F <= 1000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / B) - Float64(x / B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -1.35e+154], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * -0.019444444444444445 + N[(x * N[(N[(B * B), $MachinePrecision] * 0.022222222222222223 + 0.3333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1000000.0], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(B \cdot B, -0.019444444444444445, \mathsf{fma}\left(x, \mathsf{fma}\left(B \cdot B, 0.022222222222222223, 0.3333333333333333\right), -0.16666666666666666\right)\right), -1\right) - x}{B}\\
\mathbf{elif}\;F \leq 1000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.35000000000000003e154Initial program 24.3%
Taylor expanded in B around 0
Simplified23.6%
Taylor expanded in F around -inf
associate--r+N/A
--lowering--.f64N/A
Simplified59.6%
if -1.35000000000000003e154 < F < 1e6Initial program 98.2%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6440.4
Simplified40.4%
unsub-negN/A
div-subN/A
--lowering--.f64N/A
Applied egg-rr40.4%
if 1e6 < F Initial program 55.0%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6447.6
Simplified47.6%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6457.6
Simplified57.6%
(FPCore (F B x)
:precision binary64
(if (<= F -6.1e+153)
(/
(-
(fma
(* B B)
(fma
(* B B)
-0.019444444444444445
(fma
x
(fma (* B B) 0.022222222222222223 0.3333333333333333)
-0.16666666666666666))
-1.0)
x)
B)
(if (<= F 1e+29)
(/ (fma F (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0)))) (- x)) 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.1e+153) {
tmp = (fma((B * B), fma((B * B), -0.019444444444444445, fma(x, fma((B * B), 0.022222222222222223, 0.3333333333333333), -0.16666666666666666)), -1.0) - x) / B;
} else if (F <= 1e+29) {
tmp = fma(F, sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))), -x) / 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.1e+153) tmp = Float64(Float64(fma(Float64(B * B), fma(Float64(B * B), -0.019444444444444445, fma(x, fma(Float64(B * B), 0.022222222222222223, 0.3333333333333333), -0.16666666666666666)), -1.0) - x) / B); elseif (F <= 1e+29) tmp = Float64(fma(F, sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))), Float64(-x)) / 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.1e+153], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * -0.019444444444444445 + N[(x * N[(N[(B * B), $MachinePrecision] * 0.022222222222222223 + 0.3333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1e+29], N[(N[(F * N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + (-x)), $MachinePrecision] / B), $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.1 \cdot 10^{+153}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(B \cdot B, -0.019444444444444445, \mathsf{fma}\left(x, \mathsf{fma}\left(B \cdot B, 0.022222222222222223, 0.3333333333333333\right), -0.16666666666666666\right)\right), -1\right) - x}{B}\\
\mathbf{elif}\;F \leq 10^{+29}:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}\\
\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.0999999999999998e153Initial program 24.3%
Taylor expanded in B around 0
Simplified23.6%
Taylor expanded in F around -inf
associate--r+N/A
--lowering--.f64N/A
Simplified59.6%
if -6.0999999999999998e153 < F < 9.99999999999999914e28Initial program 98.2%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6440.7
Simplified40.7%
if 9.99999999999999914e28 < F Initial program 52.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6447.4
Simplified47.4%
Taylor expanded in F around inf
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6457.9
Simplified57.9%
(FPCore (F B x)
:precision binary64
(if (<= F -1.35e-68)
(/ (- -1.0 x) B)
(if (<= F -5.5e-127)
(/ (* F (sqrt 0.5)) B)
(if (<= F 310000.0)
(/ (- x) 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 <= -1.35e-68) {
tmp = (-1.0 - x) / B;
} else if (F <= -5.5e-127) {
tmp = (F * sqrt(0.5)) / B;
} else if (F <= 310000.0) {
tmp = -x / 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 <= -1.35e-68) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -5.5e-127) tmp = Float64(Float64(F * sqrt(0.5)) / B); elseif (F <= 310000.0) tmp = Float64(Float64(-x) / 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, -1.35e-68], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -5.5e-127], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 310000.0], N[((-x) / B), $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 -1.35 \cdot 10^{-68}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{-127}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B}\\
\mathbf{elif}\;F \leq 310000:\\
\;\;\;\;\frac{-x}{B}\\
\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 < -1.3500000000000001e-68Initial program 63.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6434.3
Simplified34.3%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6447.6
Simplified47.6%
if -1.3500000000000001e-68 < F < -5.50000000000000036e-127Initial program 99.2%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6472.8
Simplified72.8%
Taylor expanded in x around 0
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6468.1
Simplified68.1%
Taylor expanded in F around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6468.1
Simplified68.1%
if -5.50000000000000036e-127 < F < 3.1e5Initial program 99.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6436.0
Simplified36.0%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f6429.2
Simplified29.2%
if 3.1e5 < F Initial program 54.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6448.3
Simplified48.3%
Taylor expanded in F around inf
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6458.1
Simplified58.1%
(FPCore (F B x)
:precision binary64
(if (<= F -190.0)
(/ (- -1.0 x) B)
(if (<= F 310000.0)
(/ (fma F (sqrt (/ 1.0 (fma 2.0 x 2.0))) (- x)) 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 <= -190.0) {
tmp = (-1.0 - x) / B;
} else if (F <= 310000.0) {
tmp = fma(F, sqrt((1.0 / fma(2.0, x, 2.0))), -x) / 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 <= -190.0) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 310000.0) tmp = Float64(fma(F, sqrt(Float64(1.0 / fma(2.0, x, 2.0))), Float64(-x)) / 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, -190.0], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 310000.0], 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 * 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 -190:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 310000:\\
\;\;\;\;\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, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -190Initial program 55.9%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6428.5
Simplified28.5%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6447.2
Simplified47.2%
if -190 < F < 3.1e5Initial program 99.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6441.5
Simplified41.5%
Taylor expanded in F around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
associate-*l/N/A
div-subN/A
sub-negN/A
+-commutativeN/A
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6441.5
Simplified41.5%
if 3.1e5 < F Initial program 54.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6448.3
Simplified48.3%
Taylor expanded in F around inf
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6458.1
Simplified58.1%
(FPCore (F B x)
:precision binary64
(if (<= F -4e-68)
(/ (- -1.0 x) B)
(if (<= F -2.9e-126)
(/ (* F (sqrt 0.5)) B)
(if (<= F 2.1e-121) (/ (- x) B) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4e-68) {
tmp = (-1.0 - x) / B;
} else if (F <= -2.9e-126) {
tmp = (F * sqrt(0.5)) / B;
} else if (F <= 2.1e-121) {
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 <= (-4d-68)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-2.9d-126)) then
tmp = (f * sqrt(0.5d0)) / b
else if (f <= 2.1d-121) 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 <= -4e-68) {
tmp = (-1.0 - x) / B;
} else if (F <= -2.9e-126) {
tmp = (F * Math.sqrt(0.5)) / B;
} else if (F <= 2.1e-121) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4e-68: tmp = (-1.0 - x) / B elif F <= -2.9e-126: tmp = (F * math.sqrt(0.5)) / B elif F <= 2.1e-121: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4e-68) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -2.9e-126) tmp = Float64(Float64(F * sqrt(0.5)) / B); elseif (F <= 2.1e-121) 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 <= -4e-68) tmp = (-1.0 - x) / B; elseif (F <= -2.9e-126) tmp = (F * sqrt(0.5)) / B; elseif (F <= 2.1e-121) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4e-68], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -2.9e-126], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.1e-121], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4 \cdot 10^{-68}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -2.9 \cdot 10^{-126}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-121}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.00000000000000027e-68Initial program 63.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6434.3
Simplified34.3%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6447.6
Simplified47.6%
if -4.00000000000000027e-68 < F < -2.89999999999999988e-126Initial program 99.2%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6472.8
Simplified72.8%
Taylor expanded in x around 0
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6468.1
Simplified68.1%
Taylor expanded in F around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6468.1
Simplified68.1%
if -2.89999999999999988e-126 < F < 2.0999999999999999e-121Initial program 99.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6440.3
Simplified40.3%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f6433.1
Simplified33.1%
if 2.0999999999999999e-121 < F Initial program 63.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6442.6
Simplified42.6%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6449.4
Simplified49.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) B)))
(if (<= F -9e-183)
(/ (- -1.0 x) B)
(if (<= F 360000.0) t_0 (if (<= F 2.5e+199) (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (F <= -9e-183) {
tmp = (-1.0 - x) / B;
} else if (F <= 360000.0) {
tmp = t_0;
} else if (F <= 2.5e+199) {
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 <= (-9d-183)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 360000.0d0) then
tmp = t_0
else if (f <= 2.5d+199) 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 <= -9e-183) {
tmp = (-1.0 - x) / B;
} else if (F <= 360000.0) {
tmp = t_0;
} else if (F <= 2.5e+199) {
tmp = 1.0 / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = -x / B tmp = 0 if F <= -9e-183: tmp = (-1.0 - x) / B elif F <= 360000.0: tmp = t_0 elif F <= 2.5e+199: 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 <= -9e-183) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 360000.0) tmp = t_0; elseif (F <= 2.5e+199) 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 <= -9e-183) tmp = (-1.0 - x) / B; elseif (F <= 360000.0) tmp = t_0; elseif (F <= 2.5e+199) 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, -9e-183], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 360000.0], t$95$0, If[LessEqual[F, 2.5e+199], N[(1.0 / B), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{B}\\
\mathbf{if}\;F \leq -9 \cdot 10^{-183}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 360000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{+199}:\\
\;\;\;\;\frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -8.99999999999999942e-183Initial program 70.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6437.2
Simplified37.2%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6443.3
Simplified43.3%
if -8.99999999999999942e-183 < F < 3.6e5 or 2.4999999999999999e199 < F Initial program 81.9%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6438.8
Simplified38.8%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f6433.3
Simplified33.3%
if 3.6e5 < F < 2.4999999999999999e199Initial program 66.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6449.9
Simplified49.9%
Taylor expanded in x around 0
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6431.2
Simplified31.2%
Taylor expanded in F around inf
/-lowering-/.f6438.1
Simplified38.1%
(FPCore (F B x) :precision binary64 (if (<= F -9e-183) (/ (- -1.0 x) B) (if (<= F 2.1e-121) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9e-183) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.1e-121) {
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 <= (-9d-183)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.1d-121) 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 <= -9e-183) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.1e-121) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9e-183: tmp = (-1.0 - x) / B elif F <= 2.1e-121: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9e-183) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.1e-121) 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 <= -9e-183) tmp = (-1.0 - x) / B; elseif (F <= 2.1e-121) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9e-183], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.1e-121], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9 \cdot 10^{-183}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-121}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -8.99999999999999942e-183Initial program 70.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6437.2
Simplified37.2%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6443.3
Simplified43.3%
if -8.99999999999999942e-183 < F < 2.0999999999999999e-121Initial program 99.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6441.1
Simplified41.1%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f6432.6
Simplified32.6%
if 2.0999999999999999e-121 < F Initial program 63.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6442.6
Simplified42.6%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6449.4
Simplified49.4%
(FPCore (F B x) :precision binary64 (let* ((t_0 (/ (- x) B))) (if (<= x -4e-217) t_0 (if (<= x 5.6e-27) (/ 1.0 B) t_0))))
double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (x <= -4e-217) {
tmp = t_0;
} else if (x <= 5.6e-27) {
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 <= (-4d-217)) then
tmp = t_0
else if (x <= 5.6d-27) 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 <= -4e-217) {
tmp = t_0;
} else if (x <= 5.6e-27) {
tmp = 1.0 / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = -x / B tmp = 0 if x <= -4e-217: tmp = t_0 elif x <= 5.6e-27: 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 <= -4e-217) tmp = t_0; elseif (x <= 5.6e-27) 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 <= -4e-217) tmp = t_0; elseif (x <= 5.6e-27) 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, -4e-217], t$95$0, If[LessEqual[x, 5.6e-27], N[(1.0 / B), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{B}\\
\mathbf{if}\;x \leq -4 \cdot 10^{-217}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{-27}:\\
\;\;\;\;\frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -4.00000000000000033e-217 or 5.5999999999999999e-27 < x Initial program 77.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6443.3
Simplified43.3%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f6436.6
Simplified36.6%
if -4.00000000000000033e-217 < x < 5.5999999999999999e-27Initial program 67.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6433.2
Simplified33.2%
Taylor expanded in x around 0
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6427.7
Simplified27.7%
Taylor expanded in F around inf
/-lowering-/.f6421.8
Simplified21.8%
(FPCore (F B x) :precision binary64 (if (<= F -3.05e-282) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.05e-282) {
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 <= (-3.05d-282)) 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 <= -3.05e-282) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.05e-282: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.05e-282) 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 <= -3.05e-282) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.05e-282], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.05 \cdot 10^{-282}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -3.0499999999999999e-282Initial program 75.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6440.9
Simplified40.9%
Taylor expanded in x around 0
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6412.9
Simplified12.9%
Taylor expanded in F around -inf
/-lowering-/.f6417.4
Simplified17.4%
if -3.0499999999999999e-282 < F Initial program 74.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6439.6
Simplified39.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6416.0
Simplified16.0%
Taylor expanded in F around inf
/-lowering-/.f6418.0
Simplified18.0%
(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 74.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6440.2
Simplified40.2%
Taylor expanded in x around 0
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6414.6
Simplified14.6%
Taylor expanded in F around -inf
/-lowering-/.f649.5
Simplified9.5%
herbie shell --seed 2024204
(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))))))