
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.6e+160)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 20000000.0)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.6e+160) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 20000000.0) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.6e+160) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 20000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.6e+160], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 20000000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.6 \cdot 10^{+160}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 20000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.5999999999999999e160Initial program 40.4%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr53.3%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr53.3%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.7
Simplified99.7%
if -1.5999999999999999e160 < F < 2e7Initial program 98.1%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.6%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr99.8%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6499.8
Simplified99.8%
if 2e7 < F Initial program 40.9%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr70.4%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr70.4%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8
Simplified99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.8e+50)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000.0)
(fma x (/ -1.0 (tan B)) (/ F (* (sin B) (sqrt (fma F F 2.0)))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.8e+50) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = fma(x, (-1.0 / tan(B)), (F / (sin(B) * sqrt(fma(F, F, 2.0)))));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.8e+50) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000.0) tmp = fma(x, Float64(-1.0 / tan(B)), Float64(F / Float64(sin(B) * sqrt(fma(F, F, 2.0))))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.8e+50], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision] + N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.8 \cdot 10^{+50}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{-1}{\tan B}, \frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.79999999999999993e50Initial program 64.0%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr74.3%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr74.3%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8
Simplified99.8%
if -1.79999999999999993e50 < F < 1e8Initial program 99.4%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.5%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr99.7%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6499.7
Simplified99.7%
sub-negN/A
+-commutativeN/A
div-invN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f64N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
accelerator-lowering-fma.f64N/A
sin-lowering-sin.f6499.4
Applied egg-rr99.4%
if 1e8 < F Initial program 40.9%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr70.4%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr70.4%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8
Simplified99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -115000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.42)
(- (/ (/ F (sqrt 2.0)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -115000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = ((F / sqrt(2.0)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-115000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.42d0) then
tmp = ((f / sqrt(2.0d0)) / sin(b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -115000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = ((F / Math.sqrt(2.0)) / Math.sin(B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -115000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.42: tmp = ((F / math.sqrt(2.0)) / math.sin(B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -115000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.42) tmp = Float64(Float64(Float64(F / sqrt(2.0)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -115000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.42) tmp = ((F / sqrt(2.0)) / sin(B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -115000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(N[(F / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -115000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.15e11Initial program 68.9%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr77.8%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr77.9%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8
Simplified99.8%
if -1.15e11 < F < 1.4199999999999999Initial program 99.4%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.5%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr99.7%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6499.7
Simplified99.7%
Taylor expanded in F around 0
sqrt-lowering-sqrt.f6499.2
Simplified99.2%
if 1.4199999999999999 < F Initial program 41.7%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr70.8%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr70.8%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.1
Simplified99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -115000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.42)
(- (/ (* F (sqrt 0.5)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -115000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = ((F * sqrt(0.5)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-115000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.42d0) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -115000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -115000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.42: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -115000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.42) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -115000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.42) tmp = ((F * sqrt(0.5)) / sin(B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -115000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -115000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.15e11Initial program 68.9%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr77.8%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr77.9%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8
Simplified99.8%
if -1.15e11 < F < 1.4199999999999999Initial program 99.4%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.5%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr99.7%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6499.7
Simplified99.7%
Taylor expanded in F around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sin-lowering-sin.f6499.0
Simplified99.0%
if 1.4199999999999999 < F Initial program 41.7%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr70.8%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr70.8%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.1
Simplified99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.4e-17)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.2e-134)
(- (* (/ F B) (sqrt (/ 1.0 (fma F F 2.0)))) t_0)
(if (<= F 2050000.0)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) (/ x 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 <= -2.4e-17) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.2e-134) {
tmp = ((F / B) * sqrt((1.0 / fma(F, F, 2.0)))) - t_0;
} else if (F <= 2050000.0) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - (x / 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 <= -2.4e-17) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.2e-134) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / fma(F, F, 2.0)))) - t_0); elseif (F <= 2050000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - Float64(x / 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, -2.4e-17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.2e-134], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2050000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.4 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-134}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} - t\_0\\
\mathbf{elif}\;F \leq 2050000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.39999999999999986e-17Initial program 70.6%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr79.0%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr79.0%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6498.6
Simplified98.6%
if -2.39999999999999986e-17 < F < 2.2e-134Initial program 99.4%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.5%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr99.7%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6499.7
Simplified99.7%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6484.8
Simplified84.8%
if 2.2e-134 < F < 2.05e6Initial program 99.4%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.4%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr99.7%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6499.7
Simplified99.7%
Taylor expanded in B around 0
/-lowering-/.f6484.7
Simplified84.7%
if 2.05e6 < F Initial program 40.9%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr70.4%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr70.4%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8
Simplified99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.4e-17)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6e-133)
(- (* (/ F B) (sqrt (/ 1.0 (fma F F 2.0)))) t_0)
(if (<= F 20000000.0)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) (/ x B))
(- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.4e-17) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6e-133) {
tmp = ((F / B) * sqrt((1.0 / fma(F, F, 2.0)))) - t_0;
} else if (F <= 20000000.0) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.4e-17) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6e-133) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / fma(F, F, 2.0)))) - t_0); elseif (F <= 20000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.4e-17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6e-133], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 20000000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.4 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-133}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} - t\_0\\
\mathbf{elif}\;F \leq 20000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.39999999999999986e-17Initial program 70.6%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr79.0%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr79.0%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6498.6
Simplified98.6%
if -2.39999999999999986e-17 < F < 6.00000000000000038e-133Initial program 99.4%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.5%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr99.7%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6499.7
Simplified99.7%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6484.8
Simplified84.8%
if 6.00000000000000038e-133 < F < 2e7Initial program 99.4%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.4%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr99.7%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6499.7
Simplified99.7%
Taylor expanded in B around 0
/-lowering-/.f6484.7
Simplified84.7%
if 2e7 < F Initial program 40.9%
Taylor expanded in B around 0
/-lowering-/.f6427.3
Simplified27.3%
Taylor expanded in F around inf
--lowering--.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f6486.2
Simplified86.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(+
(* x (/ -1.0 (tan B)))
(/ (* F (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0))))) B))))
(if (<= x -5.8e-171)
t_0
(if (<= x 1.36e-111)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) (/ x B))
t_0))))
double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / tan(B))) + ((F * sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0))))) / B);
double tmp;
if (x <= -5.8e-171) {
tmp = t_0;
} else if (x <= 1.36e-111) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F * sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0))))) / B)) tmp = 0.0 if (x <= -5.8e-171) tmp = t_0; elseif (x <= 1.36e-111) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - Float64(x / B)); else tmp = t_0; end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F * N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.8e-171], t$95$0, If[LessEqual[x, 1.36e-111], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + \frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{B}\\
\mathbf{if}\;x \leq -5.8 \cdot 10^{-171}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.36 \cdot 10^{-111}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -5.7999999999999997e-171 or 1.3599999999999999e-111 < x Initial program 74.8%
Taylor expanded in B around 0
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
/-lowering-/.f64N/A
Simplified59.3%
Taylor expanded in B around 0
Simplified86.0%
if -5.7999999999999997e-171 < x < 1.3599999999999999e-111Initial program 70.9%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr76.4%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr76.6%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6476.6
Simplified76.6%
Taylor expanded in B around 0
/-lowering-/.f6471.1
Simplified71.1%
Final simplification80.9%
(FPCore (F B x)
:precision binary64
(if (<= F -3.95e+152)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 6e-138)
(- (* (/ F B) (sqrt (/ 1.0 (fma F F 2.0)))) (/ x (tan B)))
(if (<= F 20000000.0)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) (/ x B))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.95e+152) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 6e-138) {
tmp = ((F / B) * sqrt((1.0 / fma(F, F, 2.0)))) - (x / tan(B));
} else if (F <= 20000000.0) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -3.95e+152) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 6e-138) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / fma(F, F, 2.0)))) - Float64(x / tan(B))); elseif (F <= 20000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -3.95e+152], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e-138], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 20000000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.95 \cdot 10^{+152}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-138}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 20000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.95e152Initial program 43.7%
Taylor expanded in B around 0
/-lowering-/.f6411.5
Simplified11.5%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
--lowering--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f6467.8
Simplified67.8%
if -3.95e152 < F < 6.0000000000000001e-138Initial program 97.8%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.6%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr99.8%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6499.8
Simplified99.8%
Taylor expanded in B around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6481.7
Simplified81.7%
if 6.0000000000000001e-138 < F < 2e7Initial program 99.4%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.4%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr99.7%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6499.7
Simplified99.7%
Taylor expanded in B around 0
/-lowering-/.f6484.7
Simplified84.7%
if 2e7 < F Initial program 40.9%
Taylor expanded in B around 0
/-lowering-/.f6427.3
Simplified27.3%
Taylor expanded in F around inf
--lowering--.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f6486.2
Simplified86.2%
(FPCore (F B x)
:precision binary64
(if (<= F -2e+152)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 20000000.0)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) (/ x B))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2e+152) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 20000000.0) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -2e+152) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 20000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -2e+152], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 20000000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{+152}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 20000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.0000000000000001e152Initial program 45.2%
Taylor expanded in B around 0
/-lowering-/.f6411.2
Simplified11.2%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
--lowering--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f6466.0
Simplified66.0%
if -2.0000000000000001e152 < F < 2e7Initial program 98.1%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.6%
associate-+r-N/A
+-rgt-identityN/A
+-lft-identityN/A
--lowering--.f64N/A
Applied egg-rr99.7%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6499.7
Simplified99.7%
Taylor expanded in B around 0
/-lowering-/.f6463.3
Simplified63.3%
if 2e7 < F Initial program 40.9%
Taylor expanded in B around 0
/-lowering-/.f6427.3
Simplified27.3%
Taylor expanded in F around inf
--lowering--.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f6486.2
Simplified86.2%
(FPCore (F B x)
:precision binary64
(if (<= F -3.4e+51)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 100000000.0)
(- (/ F (* (sin B) (sqrt (fma F F (fma 2.0 x 2.0))))) (/ x B))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.4e+51) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 100000000.0) {
tmp = (F / (sin(B) * sqrt(fma(F, F, fma(2.0, x, 2.0))))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -3.4e+51) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 100000000.0) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(F, F, fma(2.0, x, 2.0))))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -3.4e+51], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.4 \cdot 10^{+51}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.39999999999999984e51Initial program 62.9%
Taylor expanded in B around 0
/-lowering-/.f6430.6
Simplified30.6%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
--lowering--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f6467.5
Simplified67.5%
if -3.39999999999999984e51 < F < 1e8Initial program 99.4%
Taylor expanded in B around 0
/-lowering-/.f6461.9
Simplified61.9%
pow-flipN/A
metadata-evalN/A
pow1/2N/A
*-commutativeN/A
+-commutativeN/A
/-lowering-/.f64N/A
+-commutativeN/A
*-commutativeN/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f6461.8
Applied egg-rr61.8%
associate-*l/N/A
div-invN/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr61.9%
if 1e8 < F Initial program 40.9%
Taylor expanded in B around 0
/-lowering-/.f6427.3
Simplified27.3%
Taylor expanded in F around inf
--lowering--.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f6486.2
Simplified86.2%
Final simplification70.5%
(FPCore (F B x)
:precision binary64
(if (<= F -9.5e-17)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.4e-210)
(* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B)))
(if (<= F 0.003)
(/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B)
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-17) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.4e-210) {
tmp = F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B));
} else if (F <= 0.003) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -9.5e-17) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.4e-210) tmp = Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))); elseif (F <= 0.003) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -9.5e-17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.4e-210], N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.003], 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 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.5 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.4 \cdot 10^{-210}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\
\mathbf{elif}\;F \leq 0.003:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.50000000000000029e-17Initial program 70.2%
Taylor expanded in B around 0
/-lowering-/.f6439.3
Simplified39.3%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
--lowering--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f6468.9
Simplified68.9%
if -9.50000000000000029e-17 < F < -4.39999999999999979e-210Initial program 99.2%
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.f6447.7
Simplified47.7%
if -4.39999999999999979e-210 < F < 0.0030000000000000001Initial program 99.4%
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-sub0N/A
--lowering--.f6447.6
Simplified47.6%
/-lowering-/.f64N/A
Applied egg-rr47.7%
if 0.0030000000000000001 < F Initial program 42.4%
Taylor expanded in B around 0
/-lowering-/.f6429.2
Simplified29.2%
Taylor expanded in F around inf
--lowering--.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f6484.8
Simplified84.8%
(FPCore (F B x)
:precision binary64
(if (<= F -2.4e-17)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 0.003)
(/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B)
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.4e-17) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.003) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -2.4e-17) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.003) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -2.4e-17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.003], 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 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.4 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.003:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.39999999999999986e-17Initial program 70.6%
Taylor expanded in B around 0
/-lowering-/.f6440.1
Simplified40.1%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
--lowering--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f6468.2
Simplified68.2%
if -2.39999999999999986e-17 < F < 0.0030000000000000001Initial program 99.4%
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-sub0N/A
--lowering--.f6441.6
Simplified41.6%
/-lowering-/.f64N/A
Applied egg-rr41.7%
if 0.0030000000000000001 < F Initial program 42.4%
Taylor expanded in B around 0
/-lowering-/.f6429.2
Simplified29.2%
Taylor expanded in F around inf
--lowering--.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f6484.8
Simplified84.8%
(FPCore (F B x)
:precision binary64
(if (<= F -2.4e-17)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1200000000.0)
(/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B)
(/
(- (fma (* B B) (fma x 0.3333333333333333 0.16666666666666666) 1.0) x)
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.4e-17) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1200000000.0) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
} else {
tmp = (fma((B * B), fma(x, 0.3333333333333333, 0.16666666666666666), 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -2.4e-17) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1200000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B); else tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, 0.16666666666666666), 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -2.4e-17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1200000000.0], 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[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.4 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1200000000:\\
\;\;\;\;\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(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -2.39999999999999986e-17Initial program 70.6%
Taylor expanded in B around 0
/-lowering-/.f6440.1
Simplified40.1%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
--lowering--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f6468.2
Simplified68.2%
if -2.39999999999999986e-17 < F < 1.2e9Initial program 99.4%
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-sub0N/A
--lowering--.f6440.9
Simplified40.9%
/-lowering-/.f64N/A
Applied egg-rr41.0%
if 1.2e9 < F Initial program 40.9%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr70.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified52.0%
Taylor expanded in F around inf
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6463.9
Simplified63.9%
(FPCore (F B x)
:precision binary64
(if (<= F -36000000000000.0)
(/ -1.0 (sin B))
(if (<= F 2800000000.0)
(/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B)
(/
(- (fma (* B B) (fma x 0.3333333333333333 0.16666666666666666) 1.0) x)
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -36000000000000.0) {
tmp = -1.0 / sin(B);
} else if (F <= 2800000000.0) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
} else {
tmp = (fma((B * B), fma(x, 0.3333333333333333, 0.16666666666666666), 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -36000000000000.0) tmp = Float64(-1.0 / sin(B)); elseif (F <= 2800000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B); else tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, 0.16666666666666666), 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -36000000000000.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2800000000.0], 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[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -36000000000000:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2800000000:\\
\;\;\;\;\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(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -3.6e13Initial program 68.9%
Taylor expanded in B around 0
/-lowering-/.f6436.8
Simplified36.8%
Taylor expanded in F around -inf
/-lowering-/.f6451.8
Simplified51.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6450.7
Simplified50.7%
if -3.6e13 < F < 2.8e9Initial program 99.4%
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-sub0N/A
--lowering--.f6442.1
Simplified42.1%
/-lowering-/.f64N/A
Applied egg-rr42.3%
if 2.8e9 < F Initial program 40.9%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr70.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified52.0%
Taylor expanded in F around inf
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6463.9
Simplified63.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (/ F B) (sqrt (/ 1.0 (fma F F 2.0))))))
(if (<= F -7.8e-70)
(/
(- (fma (* B B) (fma x 0.3333333333333333 -0.16666666666666666) -1.0) x)
B)
(if (<= F -8.8e-221)
t_0
(if (<= F 2.4e-58)
(/ (- 0.0 x) B)
(if (<= F 11500000.0)
t_0
(/
(-
(fma (* B B) (fma x 0.3333333333333333 0.16666666666666666) 1.0)
x)
B)))))))
double code(double F, double B, double x) {
double t_0 = (F / B) * sqrt((1.0 / fma(F, F, 2.0)));
double tmp;
if (F <= -7.8e-70) {
tmp = (fma((B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B;
} else if (F <= -8.8e-221) {
tmp = t_0;
} else if (F <= 2.4e-58) {
tmp = (0.0 - x) / B;
} else if (F <= 11500000.0) {
tmp = t_0;
} else {
tmp = (fma((B * B), fma(x, 0.3333333333333333, 0.16666666666666666), 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(Float64(F / B) * sqrt(Float64(1.0 / fma(F, F, 2.0)))) tmp = 0.0 if (F <= -7.8e-70) tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B); elseif (F <= -8.8e-221) tmp = t_0; elseif (F <= 2.4e-58) tmp = Float64(Float64(0.0 - x) / B); elseif (F <= 11500000.0) tmp = t_0; else tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, 0.16666666666666666), 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.8e-70], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + -0.16666666666666666), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -8.8e-221], t$95$0, If[LessEqual[F, 2.4e-58], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 11500000.0], t$95$0, N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}\\
\mathbf{if}\;F \leq -7.8 \cdot 10^{-70}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\
\mathbf{elif}\;F \leq -8.8 \cdot 10^{-221}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-58}:\\
\;\;\;\;\frac{0 - x}{B}\\
\mathbf{elif}\;F \leq 11500000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -7.80000000000000038e-70Initial program 73.6%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr81.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified36.6%
Taylor expanded in F around -inf
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f6446.4
Simplified46.4%
if -7.80000000000000038e-70 < F < -8.80000000000000005e-221 or 2.4000000000000001e-58 < F < 1.15e7Initial program 99.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-sub0N/A
--lowering--.f6439.1
Simplified39.1%
Taylor expanded in x around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6433.7
Simplified33.7%
if -8.80000000000000005e-221 < F < 2.4000000000000001e-58Initial program 99.4%
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-sub0N/A
--lowering--.f6444.6
Simplified44.6%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f6436.4
Simplified36.4%
if 1.15e7 < F Initial program 40.9%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr70.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified52.0%
Taylor expanded in F around inf
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6463.9
Simplified63.9%
Final simplification47.5%
(FPCore (F B x)
:precision binary64
(if (<= F -3.1e+93)
(/
(- (fma (* B B) (fma x 0.3333333333333333 -0.16666666666666666) -1.0) x)
B)
(if (<= F 126000000.0)
(/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B)
(/
(- (fma (* B B) (fma x 0.3333333333333333 0.16666666666666666) 1.0) x)
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e+93) {
tmp = (fma((B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B;
} else if (F <= 126000000.0) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
} else {
tmp = (fma((B * B), fma(x, 0.3333333333333333, 0.16666666666666666), 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -3.1e+93) tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B); elseif (F <= 126000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B); else tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, 0.16666666666666666), 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -3.1e+93], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + -0.16666666666666666), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 126000000.0], 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[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.1 \cdot 10^{+93}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\
\mathbf{elif}\;F \leq 126000000:\\
\;\;\;\;\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(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -3.10000000000000019e93Initial program 62.6%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr72.0%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified34.3%
Taylor expanded in F around -inf
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f6450.5
Simplified50.5%
if -3.10000000000000019e93 < F < 1.26e8Initial program 98.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-sub0N/A
--lowering--.f6442.2
Simplified42.2%
/-lowering-/.f64N/A
Applied egg-rr42.3%
if 1.26e8 < F Initial program 40.9%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr70.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified52.0%
Taylor expanded in F around inf
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6463.9
Simplified63.9%
(FPCore (F B x)
:precision binary64
(if (<= F -5.2e+28)
(/
(- (fma (* B B) (fma x 0.3333333333333333 -0.16666666666666666) -1.0) x)
B)
(if (<= F 450.0)
(* (/ 1.0 B) (- (/ F (sqrt (fma 2.0 x 2.0))) x))
(/
(- (fma (* B B) (fma x 0.3333333333333333 0.16666666666666666) 1.0) x)
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.2e+28) {
tmp = (fma((B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B;
} else if (F <= 450.0) {
tmp = (1.0 / B) * ((F / sqrt(fma(2.0, x, 2.0))) - x);
} else {
tmp = (fma((B * B), fma(x, 0.3333333333333333, 0.16666666666666666), 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -5.2e+28) tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B); elseif (F <= 450.0) tmp = Float64(Float64(1.0 / B) * Float64(Float64(F / sqrt(fma(2.0, x, 2.0))) - x)); else tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, 0.16666666666666666), 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -5.2e+28], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + -0.16666666666666666), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 450.0], N[(N[(1.0 / B), $MachinePrecision] * N[(N[(F / N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.2 \cdot 10^{+28}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\
\mathbf{elif}\;F \leq 450:\\
\;\;\;\;\frac{1}{B} \cdot \left(\frac{F}{\sqrt{\mathsf{fma}\left(2, x, 2\right)}} - x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -5.2000000000000004e28Initial program 67.1%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr76.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified36.4%
Taylor expanded in F around -inf
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f6450.0
Simplified50.0%
if -5.2000000000000004e28 < F < 450Initial program 99.4%
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-sub0N/A
--lowering--.f6441.7
Simplified41.7%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sub0-negN/A
unsub-negN/A
inv-powN/A
+-commutativeN/A
*-commutativeN/A
sqrt-pow1N/A
+-commutativeN/A
metadata-evalN/A
--lowering--.f64N/A
Applied egg-rr41.7%
Taylor expanded in F around 0
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6441.7
Simplified41.7%
if 450 < F Initial program 40.9%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr70.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified52.0%
Taylor expanded in F around inf
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6463.9
Simplified63.9%
(FPCore (F B x)
:precision binary64
(if (<= F -8.8e-150)
(/
(- (fma (* B B) (fma x 0.3333333333333333 -0.16666666666666666) -1.0) x)
B)
(if (<= F 7.2e-59)
(/ (- 0.0 x) B)
(/
(- (fma (* B B) (fma x 0.3333333333333333 0.16666666666666666) 1.0) x)
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e-150) {
tmp = (fma((B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B;
} else if (F <= 7.2e-59) {
tmp = (0.0 - x) / B;
} else {
tmp = (fma((B * B), fma(x, 0.3333333333333333, 0.16666666666666666), 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -8.8e-150) tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B); elseif (F <= 7.2e-59) tmp = Float64(Float64(0.0 - x) / B); else tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, 0.16666666666666666), 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -8.8e-150], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + -0.16666666666666666), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.2e-59], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.8 \cdot 10^{-150}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{-59}:\\
\;\;\;\;\frac{0 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -8.7999999999999997e-150Initial program 76.1%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr82.8%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified37.6%
Taylor expanded in F around -inf
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f6442.5
Simplified42.5%
if -8.7999999999999997e-150 < F < 7.20000000000000001e-59Initial program 99.4%
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-sub0N/A
--lowering--.f6439.4
Simplified39.4%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f6430.2
Simplified30.2%
if 7.20000000000000001e-59 < F Initial program 50.6%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr75.2%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified52.5%
Taylor expanded in F around inf
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6456.4
Simplified56.4%
Final simplification44.0%
(FPCore (F B x)
:precision binary64
(if (<= F -7.5e-150)
(/
(- (fma (* B B) (fma x 0.3333333333333333 -0.16666666666666666) -1.0) x)
B)
(if (<= F 7e-59) (/ (- 0.0 x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.5e-150) {
tmp = (fma((B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B;
} else if (F <= 7e-59) {
tmp = (0.0 - x) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -7.5e-150) tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B); elseif (F <= 7e-59) tmp = Float64(Float64(0.0 - x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -7.5e-150], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + -0.16666666666666666), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7e-59], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.5 \cdot 10^{-150}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-59}:\\
\;\;\;\;\frac{0 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.5000000000000004e-150Initial program 76.1%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr82.8%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified37.6%
Taylor expanded in F around -inf
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f6442.5
Simplified42.5%
if -7.5000000000000004e-150 < F < 7.0000000000000002e-59Initial program 99.4%
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-sub0N/A
--lowering--.f6439.4
Simplified39.4%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f6430.2
Simplified30.2%
if 7.0000000000000002e-59 < F Initial program 50.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-sub0N/A
--lowering--.f6452.0
Simplified52.0%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6456.0
Simplified56.0%
Final simplification43.9%
(FPCore (F B x) :precision binary64 (if (<= F -3e-90) (/ (fma B (* B -0.16666666666666666) (- -1.0 x)) B) (if (<= F 7.6e-59) (/ (- 0.0 x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3e-90) {
tmp = fma(B, (B * -0.16666666666666666), (-1.0 - x)) / B;
} else if (F <= 7.6e-59) {
tmp = (0.0 - x) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -3e-90) tmp = Float64(fma(B, Float64(B * -0.16666666666666666), Float64(-1.0 - x)) / B); elseif (F <= 7.6e-59) tmp = Float64(Float64(0.0 - x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -3e-90], N[(N[(B * N[(B * -0.16666666666666666), $MachinePrecision] + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.6e-59], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{-90}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B, B \cdot -0.16666666666666666, -1 - x\right)}{B}\\
\mathbf{elif}\;F \leq 7.6 \cdot 10^{-59}:\\
\;\;\;\;\frac{0 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.0000000000000002e-90Initial program 74.7%
Taylor expanded in B around 0
/-lowering-/.f6442.1
Simplified42.1%
Taylor expanded in F around -inf
/-lowering-/.f6447.0
Simplified47.0%
Taylor expanded in B around 0
/-lowering-/.f64N/A
associate--r+N/A
sub-negN/A
metadata-evalN/A
associate--l+N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
--lowering--.f6444.1
Simplified44.1%
if -3.0000000000000002e-90 < F < 7.59999999999999966e-59Initial program 99.4%
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-sub0N/A
--lowering--.f6439.5
Simplified39.5%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f6428.5
Simplified28.5%
if 7.59999999999999966e-59 < F Initial program 50.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-sub0N/A
--lowering--.f6452.0
Simplified52.0%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6456.0
Simplified56.0%
Final simplification43.7%
(FPCore (F B x) :precision binary64 (if (<= F -6.7e-93) (/ (- -1.0 x) B) (if (<= F 8.2e-59) (/ (- 0.0 x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.7e-93) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.2e-59) {
tmp = (0.0 - 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.7d-93)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 8.2d-59) then
tmp = (0.0d0 - 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.7e-93) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.2e-59) {
tmp = (0.0 - x) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.7e-93: tmp = (-1.0 - x) / B elif F <= 8.2e-59: tmp = (0.0 - x) / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.7e-93) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 8.2e-59) tmp = Float64(Float64(0.0 - 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.7e-93) tmp = (-1.0 - x) / B; elseif (F <= 8.2e-59) tmp = (0.0 - x) / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.7e-93], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.2e-59], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.7 \cdot 10^{-93}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-59}:\\
\;\;\;\;\frac{0 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6.69999999999999973e-93Initial program 74.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-sub0N/A
--lowering--.f6436.2
Simplified36.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.7
Simplified43.7%
if -6.69999999999999973e-93 < F < 8.1999999999999991e-59Initial program 99.4%
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-sub0N/A
--lowering--.f6439.5
Simplified39.5%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f6428.5
Simplified28.5%
if 8.1999999999999991e-59 < F Initial program 50.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-sub0N/A
--lowering--.f6452.0
Simplified52.0%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6456.0
Simplified56.0%
Final simplification43.6%
(FPCore (F B x) :precision binary64 (if (<= F -1.45e-90) (/ (- -1.0 x) B) (/ (- 0.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.45e-90) {
tmp = (-1.0 - x) / B;
} else {
tmp = (0.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.45d-90)) then
tmp = ((-1.0d0) - x) / b
else
tmp = (0.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.45e-90) {
tmp = (-1.0 - x) / B;
} else {
tmp = (0.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.45e-90: tmp = (-1.0 - x) / B else: tmp = (0.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.45e-90) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(0.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.45e-90) tmp = (-1.0 - x) / B; else tmp = (0.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.45e-90], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.45 \cdot 10^{-90}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{0 - x}{B}\\
\end{array}
\end{array}
if F < -1.44999999999999992e-90Initial program 74.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-sub0N/A
--lowering--.f6436.2
Simplified36.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.7
Simplified43.7%
if -1.44999999999999992e-90 < F Initial program 72.8%
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-sub0N/A
--lowering--.f6446.4
Simplified46.4%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f6429.7
Simplified29.7%
Final simplification34.6%
(FPCore (F B x) :precision binary64 (if (<= F -5.2e+28) (/ -1.0 B) (/ (- 0.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.2e+28) {
tmp = -1.0 / B;
} else {
tmp = (0.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5.2d+28)) then
tmp = (-1.0d0) / b
else
tmp = (0.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.2e+28) {
tmp = -1.0 / B;
} else {
tmp = (0.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.2e+28: tmp = -1.0 / B else: tmp = (0.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.2e+28) tmp = Float64(-1.0 / B); else tmp = Float64(Float64(0.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.2e+28) tmp = -1.0 / B; else tmp = (0.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.2e+28], N[(-1.0 / B), $MachinePrecision], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.2 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{0 - x}{B}\\
\end{array}
\end{array}
if F < -5.2000000000000004e28Initial program 67.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-sub0N/A
--lowering--.f6435.1
Simplified35.1%
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--.f6448.8
Simplified48.8%
Taylor expanded in x around 0
/-lowering-/.f6432.8
Simplified32.8%
if -5.2000000000000004e28 < F Initial program 75.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-sub0N/A
--lowering--.f6445.6
Simplified45.6%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f6429.3
Simplified29.3%
Final simplification30.2%
(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 73.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-sub0N/A
--lowering--.f6442.8
Simplified42.8%
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--.f6430.2
Simplified30.2%
Taylor expanded in x around 0
/-lowering-/.f6411.2
Simplified11.2%
herbie shell --seed 2024197
(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))))))