
(FPCore (x y z) :precision binary64 (/ (* (cosh x) (/ y x)) z))
double code(double x, double y, double z) {
return (cosh(x) * (y / x)) / z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (cosh(x) * (y / x)) / z
end function
public static double code(double x, double y, double z) {
return (Math.cosh(x) * (y / x)) / z;
}
def code(x, y, z): return (math.cosh(x) * (y / x)) / z
function code(x, y, z) return Float64(Float64(cosh(x) * Float64(y / x)) / z) end
function tmp = code(x, y, z) tmp = (cosh(x) * (y / x)) / z; end
code[x_, y_, z_] := N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{\cosh x \cdot \frac{y}{x}}{z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 27 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (* (cosh x) (/ y x)) z))
double code(double x, double y, double z) {
return (cosh(x) * (y / x)) / z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (cosh(x) * (y / x)) / z
end function
public static double code(double x, double y, double z) {
return (Math.cosh(x) * (y / x)) / z;
}
def code(x, y, z): return (math.cosh(x) * (y / x)) / z
function code(x, y, z) return Float64(Float64(cosh(x) * Float64(y / x)) / z) end
function tmp = code(x, y, z) tmp = (cosh(x) * (y / x)) / z; end
code[x_, y_, z_] := N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{\cosh x \cdot \frac{y}{x}}{z}
\end{array}
y\_m = (fabs.f64 y) y\_s = (copysign.f64 #s(literal 1 binary64) y) (FPCore (y_s x y_m z) :precision binary64 (let* ((t_0 (/ (cosh x) x))) (* y_s (if (<= y_m 5e-29) (/ (* y_m t_0) z) (* t_0 (/ y_m z))))))
y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double t_0 = cosh(x) / x;
double tmp;
if (y_m <= 5e-29) {
tmp = (y_m * t_0) / z;
} else {
tmp = t_0 * (y_m / z);
}
return y_s * tmp;
}
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
real(8) function code(y_s, x, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = cosh(x) / x
if (y_m <= 5d-29) then
tmp = (y_m * t_0) / z
else
tmp = t_0 * (y_m / z)
end if
code = y_s * tmp
end function
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
public static double code(double y_s, double x, double y_m, double z) {
double t_0 = Math.cosh(x) / x;
double tmp;
if (y_m <= 5e-29) {
tmp = (y_m * t_0) / z;
} else {
tmp = t_0 * (y_m / z);
}
return y_s * tmp;
}
y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) def code(y_s, x, y_m, z): t_0 = math.cosh(x) / x tmp = 0 if y_m <= 5e-29: tmp = (y_m * t_0) / z else: tmp = t_0 * (y_m / z) return y_s * tmp
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) t_0 = Float64(cosh(x) / x) tmp = 0.0 if (y_m <= 5e-29) tmp = Float64(Float64(y_m * t_0) / z); else tmp = Float64(t_0 * Float64(y_m / z)); end return Float64(y_s * tmp) end
y\_m = abs(y); y\_s = sign(y) * abs(1.0); function tmp_2 = code(y_s, x, y_m, z) t_0 = cosh(x) / x; tmp = 0.0; if (y_m <= 5e-29) tmp = (y_m * t_0) / z; else tmp = t_0 * (y_m / z); end tmp_2 = y_s * tmp; end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := Block[{t$95$0 = N[(N[Cosh[x], $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[y$95$m, 5e-29], N[(N[(y$95$m * t$95$0), $MachinePrecision] / z), $MachinePrecision], N[(t$95$0 * N[(y$95$m / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
\begin{array}{l}
t_0 := \frac{\cosh x}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;y\_m \leq 5 \cdot 10^{-29}:\\
\;\;\;\;\frac{y\_m \cdot t\_0}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \frac{y\_m}{z}\\
\end{array}
\end{array}
\end{array}
if y < 4.99999999999999986e-29Initial program 79.8%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f6497.3
Applied egg-rr97.3%
if 4.99999999999999986e-29 < y Initial program 95.8%
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
times-fracN/A
div-invN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f6499.8
Applied egg-rr99.8%
Final simplification98.0%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(let* ((t_0 (/ (* (cosh x) (/ y_m x)) z)))
(*
y_s
(if (<= t_0 2e+66)
t_0
(if (<= t_0 INFINITY)
(* (/ (cosh x) x) (/ y_m z))
(/
(*
y_m
(/ (fma (* x (* x (* x x))) (* (* x x) 0.001388888888888889) 1.0) z))
x))))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double t_0 = (cosh(x) * (y_m / x)) / z;
double tmp;
if (t_0 <= 2e+66) {
tmp = t_0;
} else if (t_0 <= ((double) INFINITY)) {
tmp = (cosh(x) / x) * (y_m / z);
} else {
tmp = (y_m * (fma((x * (x * (x * x))), ((x * x) * 0.001388888888888889), 1.0) / z)) / x;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) t_0 = Float64(Float64(cosh(x) * Float64(y_m / x)) / z) tmp = 0.0 if (t_0 <= 2e+66) tmp = t_0; elseif (t_0 <= Inf) tmp = Float64(Float64(cosh(x) / x) * Float64(y_m / z)); else tmp = Float64(Float64(y_m * Float64(fma(Float64(x * Float64(x * Float64(x * x))), Float64(Float64(x * x) * 0.001388888888888889), 1.0) / z)) / x); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := Block[{t$95$0 = N[(N[(N[Cosh[x], $MachinePrecision] * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, 2e+66], t$95$0, If[LessEqual[t$95$0, Infinity], N[(N[(N[Cosh[x], $MachinePrecision] / x), $MachinePrecision] * N[(y$95$m / z), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m * N[(N[(N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision] + 1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
\begin{array}{l}
t_0 := \frac{\cosh x \cdot \frac{y\_m}{x}}{z}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{+66}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;\frac{\cosh x}{x} \cdot \frac{y\_m}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m \cdot \frac{\mathsf{fma}\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right), \left(x \cdot x\right) \cdot 0.001388888888888889, 1\right)}{z}}{x}\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 1.99999999999999989e66Initial program 97.9%
if 1.99999999999999989e66 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < +inf.0Initial program 94.0%
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
times-fracN/A
div-invN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f6498.6
Applied egg-rr98.6%
if +inf.0 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 0.0%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f640.0
Simplified0.0%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr97.1%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6497.1
Simplified97.1%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
associate-*l*N/A
cube-unmultN/A
*-lowering-*.f64N/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Final simplification98.4%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= (/ (* (cosh x) (/ y_m x)) z) 2e+33)
(/
(*
(/ y_m x)
(fma
x
(*
x
(fma
(* x x)
(fma (* x x) 0.001388888888888889 0.041666666666666664)
0.5))
1.0))
z)
(/
(/
(* y_m (fma x (* x (* (* x x) (* (* x x) 0.001388888888888889))) 1.0))
z)
x))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (((cosh(x) * (y_m / x)) / z) <= 2e+33) {
tmp = ((y_m / x) * fma(x, (x * fma((x * x), fma((x * x), 0.001388888888888889, 0.041666666666666664), 0.5)), 1.0)) / z;
} else {
tmp = ((y_m * fma(x, (x * ((x * x) * ((x * x) * 0.001388888888888889))), 1.0)) / z) / x;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (Float64(Float64(cosh(x) * Float64(y_m / x)) / z) <= 2e+33) tmp = Float64(Float64(Float64(y_m / x) * fma(x, Float64(x * fma(Float64(x * x), fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664), 0.5)), 1.0)) / z); else tmp = Float64(Float64(Float64(y_m * fma(x, Float64(x * Float64(Float64(x * x) * Float64(Float64(x * x) * 0.001388888888888889))), 1.0)) / z) / x); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[N[(N[(N[Cosh[x], $MachinePrecision] * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 2e+33], N[(N[(N[(y$95$m / x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(y$95$m * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\cosh x \cdot \frac{y\_m}{x}}{z} \leq 2 \cdot 10^{+33}:\\
\;\;\;\;\frac{\frac{y\_m}{x} \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \mathsf{fma}\left(x, x \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right)\right), 1\right)}{z}}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 1.9999999999999999e33Initial program 97.8%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6493.3
Simplified93.3%
if 1.9999999999999999e33 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 67.4%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6460.8
Simplified60.8%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr93.3%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.3
Simplified93.3%
Final simplification93.3%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= (/ (* (cosh x) (/ y_m x)) z) 5e+57)
(/
(fma
x
(*
x
(*
y_m
(fma
(* x x)
(fma (* x x) 0.001388888888888889 0.041666666666666664)
0.5)))
y_m)
(* x z))
(/
(/
(* y_m (fma x (* x (* (* x x) (* (* x x) 0.001388888888888889))) 1.0))
z)
x))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (((cosh(x) * (y_m / x)) / z) <= 5e+57) {
tmp = fma(x, (x * (y_m * fma((x * x), fma((x * x), 0.001388888888888889, 0.041666666666666664), 0.5))), y_m) / (x * z);
} else {
tmp = ((y_m * fma(x, (x * ((x * x) * ((x * x) * 0.001388888888888889))), 1.0)) / z) / x;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (Float64(Float64(cosh(x) * Float64(y_m / x)) / z) <= 5e+57) tmp = Float64(fma(x, Float64(x * Float64(y_m * fma(Float64(x * x), fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664), 0.5))), y_m) / Float64(x * z)); else tmp = Float64(Float64(Float64(y_m * fma(x, Float64(x * Float64(Float64(x * x) * Float64(Float64(x * x) * 0.001388888888888889))), 1.0)) / z) / x); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[N[(N[(N[Cosh[x], $MachinePrecision] * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 5e+57], N[(N[(x * N[(x * N[(y$95$m * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y$95$m * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\cosh x \cdot \frac{y\_m}{x}}{z} \leq 5 \cdot 10^{+57}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, x \cdot \left(y\_m \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right)\right), y\_m\right)}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \mathsf{fma}\left(x, x \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right)\right), 1\right)}{z}}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 4.99999999999999972e57Initial program 97.8%
Taylor expanded in x around 0
Simplified85.8%
if 4.99999999999999972e57 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 67.2%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6460.4
Simplified60.4%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr93.2%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.2
Simplified93.2%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= (/ (* (cosh x) (/ y_m x)) z) 2e+60)
(/
(fma
x
(*
x
(*
y_m
(fma
(* x x)
(fma (* x x) 0.001388888888888889 0.041666666666666664)
0.5)))
y_m)
(* x z))
(/
(*
y_m
(/ (fma (* x (* x (* x x))) (* (* x x) 0.001388888888888889) 1.0) z))
x))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (((cosh(x) * (y_m / x)) / z) <= 2e+60) {
tmp = fma(x, (x * (y_m * fma((x * x), fma((x * x), 0.001388888888888889, 0.041666666666666664), 0.5))), y_m) / (x * z);
} else {
tmp = (y_m * (fma((x * (x * (x * x))), ((x * x) * 0.001388888888888889), 1.0) / z)) / x;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (Float64(Float64(cosh(x) * Float64(y_m / x)) / z) <= 2e+60) tmp = Float64(fma(x, Float64(x * Float64(y_m * fma(Float64(x * x), fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664), 0.5))), y_m) / Float64(x * z)); else tmp = Float64(Float64(y_m * Float64(fma(Float64(x * Float64(x * Float64(x * x))), Float64(Float64(x * x) * 0.001388888888888889), 1.0) / z)) / x); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[N[(N[(N[Cosh[x], $MachinePrecision] * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 2e+60], N[(N[(x * N[(x * N[(y$95$m * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m * N[(N[(N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision] + 1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\cosh x \cdot \frac{y\_m}{x}}{z} \leq 2 \cdot 10^{+60}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, x \cdot \left(y\_m \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right)\right), y\_m\right)}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m \cdot \frac{\mathsf{fma}\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right), \left(x \cdot x\right) \cdot 0.001388888888888889, 1\right)}{z}}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 1.9999999999999999e60Initial program 97.8%
Taylor expanded in x around 0
Simplified85.9%
if 1.9999999999999999e60 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 66.9%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6460.1
Simplified60.1%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr93.1%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.1
Simplified93.1%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
associate-*l*N/A
cube-unmultN/A
*-lowering-*.f64N/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6492.2
Applied egg-rr92.2%
Final simplification88.7%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= (/ (* (cosh x) (/ y_m x)) z) 5e+57)
(/
(fma
x
(*
x
(*
y_m
(fma
(* x x)
(fma (* x x) 0.001388888888888889 0.041666666666666664)
0.5)))
y_m)
(* x z))
(/
(/ (* y_m (fma x (* x (fma (* x x) 0.041666666666666664 0.5)) 1.0)) z)
x))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (((cosh(x) * (y_m / x)) / z) <= 5e+57) {
tmp = fma(x, (x * (y_m * fma((x * x), fma((x * x), 0.001388888888888889, 0.041666666666666664), 0.5))), y_m) / (x * z);
} else {
tmp = ((y_m * fma(x, (x * fma((x * x), 0.041666666666666664, 0.5)), 1.0)) / z) / x;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (Float64(Float64(cosh(x) * Float64(y_m / x)) / z) <= 5e+57) tmp = Float64(fma(x, Float64(x * Float64(y_m * fma(Float64(x * x), fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664), 0.5))), y_m) / Float64(x * z)); else tmp = Float64(Float64(Float64(y_m * fma(x, Float64(x * fma(Float64(x * x), 0.041666666666666664, 0.5)), 1.0)) / z) / x); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[N[(N[(N[Cosh[x], $MachinePrecision] * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 5e+57], N[(N[(x * N[(x * N[(y$95$m * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y$95$m * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\cosh x \cdot \frac{y\_m}{x}}{z} \leq 5 \cdot 10^{+57}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, x \cdot \left(y\_m \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right)\right), y\_m\right)}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)}{z}}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 4.99999999999999972e57Initial program 97.8%
Taylor expanded in x around 0
Simplified85.8%
if 4.99999999999999972e57 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 67.2%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6457.9
Simplified57.9%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr89.8%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= (/ (* (cosh x) (/ y_m x)) z) 5e+57)
(/
(*
y_m
(fma
x
(*
x
(fma
(* x x)
(fma x (* x 0.001388888888888889) 0.041666666666666664)
0.5))
1.0))
(* x z))
(/
(/ (* y_m (fma x (* x (fma (* x x) 0.041666666666666664 0.5)) 1.0)) z)
x))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (((cosh(x) * (y_m / x)) / z) <= 5e+57) {
tmp = (y_m * fma(x, (x * fma((x * x), fma(x, (x * 0.001388888888888889), 0.041666666666666664), 0.5)), 1.0)) / (x * z);
} else {
tmp = ((y_m * fma(x, (x * fma((x * x), 0.041666666666666664, 0.5)), 1.0)) / z) / x;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (Float64(Float64(cosh(x) * Float64(y_m / x)) / z) <= 5e+57) tmp = Float64(Float64(y_m * fma(x, Float64(x * fma(Float64(x * x), fma(x, Float64(x * 0.001388888888888889), 0.041666666666666664), 0.5)), 1.0)) / Float64(x * z)); else tmp = Float64(Float64(Float64(y_m * fma(x, Float64(x * fma(Float64(x * x), 0.041666666666666664, 0.5)), 1.0)) / z) / x); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[N[(N[(N[Cosh[x], $MachinePrecision] * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 5e+57], N[(N[(y$95$m * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * 0.001388888888888889), $MachinePrecision] + 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y$95$m * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\cosh x \cdot \frac{y\_m}{x}}{z} \leq 5 \cdot 10^{+57}:\\
\;\;\;\;\frac{y\_m \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)}{z}}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 4.99999999999999972e57Initial program 97.8%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6493.4
Simplified93.4%
associate-/l*N/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr87.2%
if 4.99999999999999972e57 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 67.2%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6457.9
Simplified57.9%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr89.8%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= (/ (* (cosh x) (/ y_m x)) z) 5e+57)
(*
(fma
x
(*
x
(fma
(* x x)
(fma x (* x 0.001388888888888889) 0.041666666666666664)
0.5))
1.0)
(/ y_m (* x z)))
(/
(/ (* y_m (fma x (* x (fma (* x x) 0.041666666666666664 0.5)) 1.0)) z)
x))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (((cosh(x) * (y_m / x)) / z) <= 5e+57) {
tmp = fma(x, (x * fma((x * x), fma(x, (x * 0.001388888888888889), 0.041666666666666664), 0.5)), 1.0) * (y_m / (x * z));
} else {
tmp = ((y_m * fma(x, (x * fma((x * x), 0.041666666666666664, 0.5)), 1.0)) / z) / x;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (Float64(Float64(cosh(x) * Float64(y_m / x)) / z) <= 5e+57) tmp = Float64(fma(x, Float64(x * fma(Float64(x * x), fma(x, Float64(x * 0.001388888888888889), 0.041666666666666664), 0.5)), 1.0) * Float64(y_m / Float64(x * z))); else tmp = Float64(Float64(Float64(y_m * fma(x, Float64(x * fma(Float64(x * x), 0.041666666666666664, 0.5)), 1.0)) / z) / x); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[N[(N[(N[Cosh[x], $MachinePrecision] * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 5e+57], N[(N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * 0.001388888888888889), $MachinePrecision] + 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y$95$m / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y$95$m * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\cosh x \cdot \frac{y\_m}{x}}{z} \leq 5 \cdot 10^{+57}:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right) \cdot \frac{y\_m}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)}{z}}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 4.99999999999999972e57Initial program 97.8%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6493.4
Simplified93.4%
associate-/l*N/A
associate-/r*N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6485.8
Applied egg-rr85.8%
if 4.99999999999999972e57 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 67.2%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6457.9
Simplified57.9%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr89.8%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= (/ (* (cosh x) (/ y_m x)) z) 2e+33)
(*
y_m
(/
(fma
(* x x)
(fma
x
(* x (fma (* x x) 0.001388888888888889 0.041666666666666664))
0.5)
1.0)
(* x z)))
(/
(/ (* y_m (fma x (* x (fma (* x x) 0.041666666666666664 0.5)) 1.0)) z)
x))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (((cosh(x) * (y_m / x)) / z) <= 2e+33) {
tmp = y_m * (fma((x * x), fma(x, (x * fma((x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0) / (x * z));
} else {
tmp = ((y_m * fma(x, (x * fma((x * x), 0.041666666666666664, 0.5)), 1.0)) / z) / x;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (Float64(Float64(cosh(x) * Float64(y_m / x)) / z) <= 2e+33) tmp = Float64(y_m * Float64(fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0) / Float64(x * z))); else tmp = Float64(Float64(Float64(y_m * fma(x, Float64(x * fma(Float64(x * x), 0.041666666666666664, 0.5)), 1.0)) / z) / x); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[N[(N[(N[Cosh[x], $MachinePrecision] * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 2e+33], N[(y$95$m * N[(N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y$95$m * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\cosh x \cdot \frac{y\_m}{x}}{z} \leq 2 \cdot 10^{+33}:\\
\;\;\;\;y\_m \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)}{z}}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 1.9999999999999999e33Initial program 97.8%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6493.3
Simplified93.3%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr88.4%
associate-/l/N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r/N/A
div-invN/A
*-commutativeN/A
associate-*r*N/A
Applied egg-rr85.7%
if 1.9999999999999999e33 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 67.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6458.3
Simplified58.3%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr89.9%
Final simplification87.6%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= (/ (* (cosh x) (/ y_m x)) z) 2e+33)
(/
(* (/ y_m x) (fma x (* x (fma x (* x 0.041666666666666664) 0.5)) 1.0))
z)
(/
(/ (* y_m (fma x (* x (fma (* x x) 0.041666666666666664 0.5)) 1.0)) z)
x))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (((cosh(x) * (y_m / x)) / z) <= 2e+33) {
tmp = ((y_m / x) * fma(x, (x * fma(x, (x * 0.041666666666666664), 0.5)), 1.0)) / z;
} else {
tmp = ((y_m * fma(x, (x * fma((x * x), 0.041666666666666664, 0.5)), 1.0)) / z) / x;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (Float64(Float64(cosh(x) * Float64(y_m / x)) / z) <= 2e+33) tmp = Float64(Float64(Float64(y_m / x) * fma(x, Float64(x * fma(x, Float64(x * 0.041666666666666664), 0.5)), 1.0)) / z); else tmp = Float64(Float64(Float64(y_m * fma(x, Float64(x * fma(Float64(x * x), 0.041666666666666664, 0.5)), 1.0)) / z) / x); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[N[(N[(N[Cosh[x], $MachinePrecision] * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 2e+33], N[(N[(N[(y$95$m / x), $MachinePrecision] * N[(x * N[(x * N[(x * N[(x * 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(y$95$m * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\cosh x \cdot \frac{y\_m}{x}}{z} \leq 2 \cdot 10^{+33}:\\
\;\;\;\;\frac{\frac{y\_m}{x} \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.041666666666666664, 0.5\right), 1\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)}{z}}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 1.9999999999999999e33Initial program 97.8%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6493.3
Simplified93.3%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6488.5
Simplified88.5%
if 1.9999999999999999e33 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 67.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6458.3
Simplified58.3%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr89.9%
Final simplification89.1%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= (/ (* (cosh x) (/ y_m x)) z) 5e+57)
(/
(fma x (* x (* y_m (fma x (* x 0.041666666666666664) 0.5))) y_m)
(* x z))
(/ (/ (fma (* y_m (* x x)) (* (* x x) 0.041666666666666664) y_m) z) x))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (((cosh(x) * (y_m / x)) / z) <= 5e+57) {
tmp = fma(x, (x * (y_m * fma(x, (x * 0.041666666666666664), 0.5))), y_m) / (x * z);
} else {
tmp = (fma((y_m * (x * x)), ((x * x) * 0.041666666666666664), y_m) / z) / x;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (Float64(Float64(cosh(x) * Float64(y_m / x)) / z) <= 5e+57) tmp = Float64(fma(x, Float64(x * Float64(y_m * fma(x, Float64(x * 0.041666666666666664), 0.5))), y_m) / Float64(x * z)); else tmp = Float64(Float64(fma(Float64(y_m * Float64(x * x)), Float64(Float64(x * x) * 0.041666666666666664), y_m) / z) / x); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[N[(N[(N[Cosh[x], $MachinePrecision] * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 5e+57], N[(N[(x * N[(x * N[(y$95$m * N[(x * N[(x * 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y$95$m * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision] + y$95$m), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\cosh x \cdot \frac{y\_m}{x}}{z} \leq 5 \cdot 10^{+57}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, x \cdot \left(y\_m \cdot \mathsf{fma}\left(x, x \cdot 0.041666666666666664, 0.5\right)\right), y\_m\right)}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(y\_m \cdot \left(x \cdot x\right), \left(x \cdot x\right) \cdot 0.041666666666666664, y\_m\right)}{z}}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 4.99999999999999972e57Initial program 97.8%
Taylor expanded in x around 0
Simplified83.0%
if 4.99999999999999972e57 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 67.2%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified81.6%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.6
Simplified81.6%
associate-/l/N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6486.5
Applied egg-rr86.5%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= x 1.35e-145)
(- (/ -1.0 (* z (/ x y_m))))
(if (<= x 7.2e+51)
(* y_m (/ (cosh x) (* x z)))
(/
(*
y_m
(/ (fma (* x (* x (* x x))) (* (* x x) 0.001388888888888889) 1.0) z))
x)))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (x <= 1.35e-145) {
tmp = -(-1.0 / (z * (x / y_m)));
} else if (x <= 7.2e+51) {
tmp = y_m * (cosh(x) / (x * z));
} else {
tmp = (y_m * (fma((x * (x * (x * x))), ((x * x) * 0.001388888888888889), 1.0) / z)) / x;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (x <= 1.35e-145) tmp = Float64(-Float64(-1.0 / Float64(z * Float64(x / y_m)))); elseif (x <= 7.2e+51) tmp = Float64(y_m * Float64(cosh(x) / Float64(x * z))); else tmp = Float64(Float64(y_m * Float64(fma(Float64(x * Float64(x * Float64(x * x))), Float64(Float64(x * x) * 0.001388888888888889), 1.0) / z)) / x); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[x, 1.35e-145], (-N[(-1.0 / N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), If[LessEqual[x, 7.2e+51], N[(y$95$m * N[(N[Cosh[x], $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m * N[(N[(N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision] + 1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{-145}:\\
\;\;\;\;-\frac{-1}{z \cdot \frac{x}{y\_m}}\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+51}:\\
\;\;\;\;y\_m \cdot \frac{\cosh x}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m \cdot \frac{\mathsf{fma}\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right), \left(x \cdot x\right) \cdot 0.001388888888888889, 1\right)}{z}}{x}\\
\end{array}
\end{array}
if x < 1.35e-145Initial program 84.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f6450.8
Simplified50.8%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6450.7
Applied egg-rr50.7%
associate-*l/N/A
*-commutativeN/A
times-fracN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6453.7
Applied egg-rr53.7%
frac-2negN/A
metadata-evalN/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6453.7
Applied egg-rr53.7%
if 1.35e-145 < x < 7.20000000000000022e51Initial program 93.7%
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64N/A
*-commutativeN/A
*-lowering-*.f6497.7
Applied egg-rr97.7%
if 7.20000000000000022e51 < x Initial program 73.1%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6473.1
Simplified73.1%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr100.0%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0
Simplified100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
associate-*l*N/A
cube-unmultN/A
*-lowering-*.f64N/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Final simplification71.2%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= y_m 3.3e-125)
(*
(/ 1.0 z)
(/
(/ 1.0 x)
(/
1.0
(fma
y_m
(* (* x (* x (* x x))) (* (* x x) 0.001388888888888889))
y_m))))
(* (/ (cosh x) x) (/ y_m z)))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (y_m <= 3.3e-125) {
tmp = (1.0 / z) * ((1.0 / x) / (1.0 / fma(y_m, ((x * (x * (x * x))) * ((x * x) * 0.001388888888888889)), y_m)));
} else {
tmp = (cosh(x) / x) * (y_m / z);
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (y_m <= 3.3e-125) tmp = Float64(Float64(1.0 / z) * Float64(Float64(1.0 / x) / Float64(1.0 / fma(y_m, Float64(Float64(x * Float64(x * Float64(x * x))) * Float64(Float64(x * x) * 0.001388888888888889)), y_m)))); else tmp = Float64(Float64(cosh(x) / x) * Float64(y_m / z)); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[y$95$m, 3.3e-125], N[(N[(1.0 / z), $MachinePrecision] * N[(N[(1.0 / x), $MachinePrecision] / N[(1.0 / N[(y$95$m * N[(N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Cosh[x], $MachinePrecision] / x), $MachinePrecision] * N[(y$95$m / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;y\_m \leq 3.3 \cdot 10^{-125}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{\frac{1}{x}}{\frac{1}{\mathsf{fma}\left(y\_m, \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right), y\_m\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\cosh x}{x} \cdot \frac{y\_m}{z}\\
\end{array}
\end{array}
if y < 3.3000000000000001e-125Initial program 78.7%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6473.0
Simplified73.0%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr87.8%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.6
Simplified87.6%
div-invN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
Applied egg-rr90.5%
if 3.3000000000000001e-125 < y Initial program 94.4%
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
times-fracN/A
div-invN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f6499.8
Applied egg-rr99.8%
Final simplification93.6%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= x 1e+52)
(/ (* y_m (cosh x)) (* x z))
(/
(*
y_m
(/ (fma (* x (* x (* x x))) (* (* x x) 0.001388888888888889) 1.0) z))
x))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (x <= 1e+52) {
tmp = (y_m * cosh(x)) / (x * z);
} else {
tmp = (y_m * (fma((x * (x * (x * x))), ((x * x) * 0.001388888888888889), 1.0) / z)) / x;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (x <= 1e+52) tmp = Float64(Float64(y_m * cosh(x)) / Float64(x * z)); else tmp = Float64(Float64(y_m * Float64(fma(Float64(x * Float64(x * Float64(x * x))), Float64(Float64(x * x) * 0.001388888888888889), 1.0) / z)) / x); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[x, 1e+52], N[(N[(y$95$m * N[Cosh[x], $MachinePrecision]), $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m * N[(N[(N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision] + 1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 10^{+52}:\\
\;\;\;\;\frac{y\_m \cdot \cosh x}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m \cdot \frac{\mathsf{fma}\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right), \left(x \cdot x\right) \cdot 0.001388888888888889, 1\right)}{z}}{x}\\
\end{array}
\end{array}
if x < 9.9999999999999999e51Initial program 86.8%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f6496.1
Applied egg-rr96.1%
associate-/l*N/A
frac-timesN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cosh-lowering-cosh.f64N/A
*-lowering-*.f6487.8
Applied egg-rr87.8%
if 9.9999999999999999e51 < x Initial program 73.1%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6473.1
Simplified73.1%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr100.0%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0
Simplified100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
associate-*l*N/A
cube-unmultN/A
*-lowering-*.f64N/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Final simplification90.3%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= y_m 17000.0)
(/
(* y_m (/ (fma (* x x) (fma x (* x 0.041666666666666664) 0.5) 1.0) x))
z)
(/ (/ (fma (* y_m (* x x)) (* (* x x) 0.041666666666666664) y_m) z) x))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (y_m <= 17000.0) {
tmp = (y_m * (fma((x * x), fma(x, (x * 0.041666666666666664), 0.5), 1.0) / x)) / z;
} else {
tmp = (fma((y_m * (x * x)), ((x * x) * 0.041666666666666664), y_m) / z) / x;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (y_m <= 17000.0) tmp = Float64(Float64(y_m * Float64(fma(Float64(x * x), fma(x, Float64(x * 0.041666666666666664), 0.5), 1.0) / x)) / z); else tmp = Float64(Float64(fma(Float64(y_m * Float64(x * x)), Float64(Float64(x * x) * 0.041666666666666664), y_m) / z) / x); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[y$95$m, 17000.0], N[(N[(y$95$m * N[(N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(N[(y$95$m * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision] + y$95$m), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;y\_m \leq 17000:\\
\;\;\;\;\frac{y\_m \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.041666666666666664, 0.5\right), 1\right)}{x}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(y\_m \cdot \left(x \cdot x\right), \left(x \cdot x\right) \cdot 0.041666666666666664, y\_m\right)}{z}}{x}\\
\end{array}
\end{array}
if y < 17000Initial program 80.5%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f6497.4
Applied egg-rr97.4%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6486.9
Simplified86.9%
if 17000 < y Initial program 95.3%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified89.8%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.5
Simplified89.5%
associate-/l/N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.5
Applied egg-rr95.5%
Final simplification89.0%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= x 3.7)
(/ (* (/ y_m x) (fma 0.5 (* x x) 1.0)) z)
(/ (/ (* y_m (* 0.041666666666666664 (* (* x x) (* x x)))) x) z))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (x <= 3.7) {
tmp = ((y_m / x) * fma(0.5, (x * x), 1.0)) / z;
} else {
tmp = ((y_m * (0.041666666666666664 * ((x * x) * (x * x)))) / x) / z;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (x <= 3.7) tmp = Float64(Float64(Float64(y_m / x) * fma(0.5, Float64(x * x), 1.0)) / z); else tmp = Float64(Float64(Float64(y_m * Float64(0.041666666666666664 * Float64(Float64(x * x) * Float64(x * x)))) / x) / z); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[x, 3.7], N[(N[(N[(y$95$m / x), $MachinePrecision] * N[(0.5 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(y$95$m * N[(0.041666666666666664 * N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 3.7:\\
\;\;\;\;\frac{\frac{y\_m}{x} \cdot \mathsf{fma}\left(0.5, x \cdot x, 1\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \left(0.041666666666666664 \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)}{x}}{z}\\
\end{array}
\end{array}
if x < 3.7000000000000002Initial program 86.5%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6471.8
Simplified71.8%
if 3.7000000000000002 < x Initial program 76.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified79.5%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6479.5
Simplified79.5%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6482.5
Simplified82.5%
Final simplification74.5%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= x 3.7)
(/ (* (/ y_m x) (fma 0.5 (* x x) 1.0)) z)
(/ (/ (* x (* 0.041666666666666664 (* y_m (* x (* x x))))) x) z))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (x <= 3.7) {
tmp = ((y_m / x) * fma(0.5, (x * x), 1.0)) / z;
} else {
tmp = ((x * (0.041666666666666664 * (y_m * (x * (x * x))))) / x) / z;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (x <= 3.7) tmp = Float64(Float64(Float64(y_m / x) * fma(0.5, Float64(x * x), 1.0)) / z); else tmp = Float64(Float64(Float64(x * Float64(0.041666666666666664 * Float64(y_m * Float64(x * Float64(x * x))))) / x) / z); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[x, 3.7], N[(N[(N[(y$95$m / x), $MachinePrecision] * N[(0.5 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(x * N[(0.041666666666666664 * N[(y$95$m * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 3.7:\\
\;\;\;\;\frac{\frac{y\_m}{x} \cdot \mathsf{fma}\left(0.5, x \cdot x, 1\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x \cdot \left(0.041666666666666664 \cdot \left(y\_m \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)}{x}}{z}\\
\end{array}
\end{array}
if x < 3.7000000000000002Initial program 86.5%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6471.8
Simplified71.8%
if 3.7000000000000002 < x Initial program 76.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified79.5%
Taylor expanded in x around inf
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
Simplified82.5%
Final simplification74.5%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= x 1.4e+58)
(/
(fma x (* x (* y_m (fma x (* x 0.041666666666666664) 0.5))) y_m)
(* x z))
(/ (* y_m (* x (fma (* x x) 0.041666666666666664 0.5))) z))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (x <= 1.4e+58) {
tmp = fma(x, (x * (y_m * fma(x, (x * 0.041666666666666664), 0.5))), y_m) / (x * z);
} else {
tmp = (y_m * (x * fma((x * x), 0.041666666666666664, 0.5))) / z;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (x <= 1.4e+58) tmp = Float64(fma(x, Float64(x * Float64(y_m * fma(x, Float64(x * 0.041666666666666664), 0.5))), y_m) / Float64(x * z)); else tmp = Float64(Float64(y_m * Float64(x * fma(Float64(x * x), 0.041666666666666664, 0.5))) / z); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[x, 1.4e+58], N[(N[(x * N[(x * N[(y$95$m * N[(x * N[(x * 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 1.4 \cdot 10^{+58}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, x \cdot \left(y\_m \cdot \mathsf{fma}\left(x, x \cdot 0.041666666666666664, 0.5\right)\right), y\_m\right)}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m \cdot \left(x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right)\right)}{z}\\
\end{array}
\end{array}
if x < 1.3999999999999999e58Initial program 86.9%
Taylor expanded in x around 0
Simplified75.4%
if 1.3999999999999999e58 < x Initial program 72.5%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified94.4%
Taylor expanded in x around inf
distribute-lft-inN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-/l*N/A
*-inversesN/A
metadata-evalN/A
*-commutativeN/A
Simplified98.1%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(let* ((t_0 (* x (fma (* x x) 0.041666666666666664 0.5))))
(*
y_s
(if (<= x 1.12e+58)
(/ (* y_m (fma x t_0 1.0)) (* x z))
(/ (* y_m t_0) z)))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double t_0 = x * fma((x * x), 0.041666666666666664, 0.5);
double tmp;
if (x <= 1.12e+58) {
tmp = (y_m * fma(x, t_0, 1.0)) / (x * z);
} else {
tmp = (y_m * t_0) / z;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) t_0 = Float64(x * fma(Float64(x * x), 0.041666666666666664, 0.5)) tmp = 0.0 if (x <= 1.12e+58) tmp = Float64(Float64(y_m * fma(x, t_0, 1.0)) / Float64(x * z)); else tmp = Float64(Float64(y_m * t_0) / z); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := Block[{t$95$0 = N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision]), $MachinePrecision]}, N[(y$95$s * If[LessEqual[x, 1.12e+58], N[(N[(y$95$m * N[(x * t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m * t$95$0), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
\begin{array}{l}
t_0 := x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right)\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 1.12 \cdot 10^{+58}:\\
\;\;\;\;\frac{y\_m \cdot \mathsf{fma}\left(x, t\_0, 1\right)}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m \cdot t\_0}{z}\\
\end{array}
\end{array}
\end{array}
if x < 1.12e58Initial program 86.9%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6475.8
Simplified75.8%
associate-/l*N/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6477.2
Applied egg-rr77.2%
if 1.12e58 < x Initial program 72.5%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified94.4%
Taylor expanded in x around inf
distribute-lft-inN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-/l*N/A
*-inversesN/A
metadata-evalN/A
*-commutativeN/A
Simplified98.1%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= x 2.25)
(/ (* (/ y_m x) (fma 0.5 (* x x) 1.0)) z)
(/ (* y_m (* x (fma (* x x) 0.041666666666666664 0.5))) z))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (x <= 2.25) {
tmp = ((y_m / x) * fma(0.5, (x * x), 1.0)) / z;
} else {
tmp = (y_m * (x * fma((x * x), 0.041666666666666664, 0.5))) / z;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (x <= 2.25) tmp = Float64(Float64(Float64(y_m / x) * fma(0.5, Float64(x * x), 1.0)) / z); else tmp = Float64(Float64(y_m * Float64(x * fma(Float64(x * x), 0.041666666666666664, 0.5))) / z); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[x, 2.25], N[(N[(N[(y$95$m / x), $MachinePrecision] * N[(0.5 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(y$95$m * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 2.25:\\
\;\;\;\;\frac{\frac{y\_m}{x} \cdot \mathsf{fma}\left(0.5, x \cdot x, 1\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m \cdot \left(x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right)\right)}{z}\\
\end{array}
\end{array}
if x < 2.25Initial program 86.5%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6471.8
Simplified71.8%
if 2.25 < x Initial program 76.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified79.5%
Taylor expanded in x around inf
distribute-lft-inN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-/l*N/A
*-inversesN/A
metadata-evalN/A
*-commutativeN/A
Simplified81.1%
Final simplification74.2%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= x 2.25)
(/ (fma y_m (* x 0.5) (/ y_m x)) z)
(/ (* y_m (* x (fma (* x x) 0.041666666666666664 0.5))) z))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (x <= 2.25) {
tmp = fma(y_m, (x * 0.5), (y_m / x)) / z;
} else {
tmp = (y_m * (x * fma((x * x), 0.041666666666666664, 0.5))) / z;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (x <= 2.25) tmp = Float64(fma(y_m, Float64(x * 0.5), Float64(y_m / x)) / z); else tmp = Float64(Float64(y_m * Float64(x * fma(Float64(x * x), 0.041666666666666664, 0.5))) / z); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[x, 2.25], N[(N[(y$95$m * N[(x * 0.5), $MachinePrecision] + N[(y$95$m / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(y$95$m * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 2.25:\\
\;\;\;\;\frac{\mathsf{fma}\left(y\_m, x \cdot 0.5, \frac{y\_m}{x}\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m \cdot \left(x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right)\right)}{z}\\
\end{array}
\end{array}
if x < 2.25Initial program 86.5%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-/l*N/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6470.6
Simplified70.6%
if 2.25 < x Initial program 76.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified79.5%
Taylor expanded in x around inf
distribute-lft-inN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-/l*N/A
*-inversesN/A
metadata-evalN/A
*-commutativeN/A
Simplified81.1%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= x 1.3)
(- (/ -1.0 (* z (/ x y_m))))
(/ (* y_m (* x (fma (* x x) 0.041666666666666664 0.5))) z))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (x <= 1.3) {
tmp = -(-1.0 / (z * (x / y_m)));
} else {
tmp = (y_m * (x * fma((x * x), 0.041666666666666664, 0.5))) / z;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (x <= 1.3) tmp = Float64(-Float64(-1.0 / Float64(z * Float64(x / y_m)))); else tmp = Float64(Float64(y_m * Float64(x * fma(Float64(x * x), 0.041666666666666664, 0.5))) / z); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[x, 1.3], (-N[(-1.0 / N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), N[(N[(y$95$m * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 1.3:\\
\;\;\;\;-\frac{-1}{z \cdot \frac{x}{y\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m \cdot \left(x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right)\right)}{z}\\
\end{array}
\end{array}
if x < 1.30000000000000004Initial program 86.5%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f6458.5
Simplified58.5%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6458.1
Applied egg-rr58.1%
associate-*l/N/A
*-commutativeN/A
times-fracN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6460.1
Applied egg-rr60.1%
frac-2negN/A
metadata-evalN/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6460.1
Applied egg-rr60.1%
if 1.30000000000000004 < x Initial program 76.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified79.5%
Taylor expanded in x around inf
distribute-lft-inN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-/l*N/A
*-inversesN/A
metadata-evalN/A
*-commutativeN/A
Simplified81.1%
Final simplification65.4%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m z)
:precision binary64
(*
y_s
(if (<= x 2.25)
(- (/ -1.0 (* z (/ x y_m))))
(/ (* 0.041666666666666664 (* y_m (* x (* x x)))) z))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (x <= 2.25) {
tmp = -(-1.0 / (z * (x / y_m)));
} else {
tmp = (0.041666666666666664 * (y_m * (x * (x * x)))) / z;
}
return y_s * tmp;
}
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
real(8) function code(y_s, x, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 2.25d0) then
tmp = -((-1.0d0) / (z * (x / y_m)))
else
tmp = (0.041666666666666664d0 * (y_m * (x * (x * x)))) / z
end if
code = y_s * tmp
end function
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
public static double code(double y_s, double x, double y_m, double z) {
double tmp;
if (x <= 2.25) {
tmp = -(-1.0 / (z * (x / y_m)));
} else {
tmp = (0.041666666666666664 * (y_m * (x * (x * x)))) / z;
}
return y_s * tmp;
}
y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) def code(y_s, x, y_m, z): tmp = 0 if x <= 2.25: tmp = -(-1.0 / (z * (x / y_m))) else: tmp = (0.041666666666666664 * (y_m * (x * (x * x)))) / z return y_s * tmp
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (x <= 2.25) tmp = Float64(-Float64(-1.0 / Float64(z * Float64(x / y_m)))); else tmp = Float64(Float64(0.041666666666666664 * Float64(y_m * Float64(x * Float64(x * x)))) / z); end return Float64(y_s * tmp) end
y\_m = abs(y); y\_s = sign(y) * abs(1.0); function tmp_2 = code(y_s, x, y_m, z) tmp = 0.0; if (x <= 2.25) tmp = -(-1.0 / (z * (x / y_m))); else tmp = (0.041666666666666664 * (y_m * (x * (x * x)))) / z; end tmp_2 = y_s * tmp; end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[x, 2.25], (-N[(-1.0 / N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), N[(N[(0.041666666666666664 * N[(y$95$m * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 2.25:\\
\;\;\;\;-\frac{-1}{z \cdot \frac{x}{y\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.041666666666666664 \cdot \left(y\_m \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)}{z}\\
\end{array}
\end{array}
if x < 2.25Initial program 86.5%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f6458.5
Simplified58.5%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6458.1
Applied egg-rr58.1%
associate-*l/N/A
*-commutativeN/A
times-fracN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6460.1
Applied egg-rr60.1%
frac-2negN/A
metadata-evalN/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6460.1
Applied egg-rr60.1%
if 2.25 < x Initial program 76.9%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6459.6
Simplified59.6%
associate-/l*N/A
associate-/r*N/A
*-lowering-*.f64N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6455.0
Applied egg-rr55.0%
Taylor expanded in x around inf
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.1
Simplified81.1%
Final simplification65.4%
y\_m = (fabs.f64 y) y\_s = (copysign.f64 #s(literal 1 binary64) y) (FPCore (y_s x y_m z) :precision binary64 (* y_s (if (<= x 1.4) (- (/ -1.0 (* z (/ x y_m)))) (* (* y_m x) (/ 0.5 z)))))
y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (x <= 1.4) {
tmp = -(-1.0 / (z * (x / y_m)));
} else {
tmp = (y_m * x) * (0.5 / z);
}
return y_s * tmp;
}
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
real(8) function code(y_s, x, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.4d0) then
tmp = -((-1.0d0) / (z * (x / y_m)))
else
tmp = (y_m * x) * (0.5d0 / z)
end if
code = y_s * tmp
end function
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
public static double code(double y_s, double x, double y_m, double z) {
double tmp;
if (x <= 1.4) {
tmp = -(-1.0 / (z * (x / y_m)));
} else {
tmp = (y_m * x) * (0.5 / z);
}
return y_s * tmp;
}
y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) def code(y_s, x, y_m, z): tmp = 0 if x <= 1.4: tmp = -(-1.0 / (z * (x / y_m))) else: tmp = (y_m * x) * (0.5 / z) return y_s * tmp
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (x <= 1.4) tmp = Float64(-Float64(-1.0 / Float64(z * Float64(x / y_m)))); else tmp = Float64(Float64(y_m * x) * Float64(0.5 / z)); end return Float64(y_s * tmp) end
y\_m = abs(y); y\_s = sign(y) * abs(1.0); function tmp_2 = code(y_s, x, y_m, z) tmp = 0.0; if (x <= 1.4) tmp = -(-1.0 / (z * (x / y_m))); else tmp = (y_m * x) * (0.5 / z); end tmp_2 = y_s * tmp; end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[x, 1.4], (-N[(-1.0 / N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), N[(N[(y$95$m * x), $MachinePrecision] * N[(0.5 / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 1.4:\\
\;\;\;\;-\frac{-1}{z \cdot \frac{x}{y\_m}}\\
\mathbf{else}:\\
\;\;\;\;\left(y\_m \cdot x\right) \cdot \frac{0.5}{z}\\
\end{array}
\end{array}
if x < 1.3999999999999999Initial program 86.5%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f6458.5
Simplified58.5%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6458.1
Applied egg-rr58.1%
associate-*l/N/A
*-commutativeN/A
times-fracN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6460.1
Applied egg-rr60.1%
frac-2negN/A
metadata-evalN/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6460.1
Applied egg-rr60.1%
if 1.3999999999999999 < x Initial program 76.9%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-/l*N/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6434.0
Simplified34.0%
Taylor expanded in x around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6434.0
Simplified34.0%
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6434.0
Applied egg-rr34.0%
Final simplification53.5%
y\_m = (fabs.f64 y) y\_s = (copysign.f64 #s(literal 1 binary64) y) (FPCore (y_s x y_m z) :precision binary64 (* y_s (if (<= x 1.4) (/ (/ y_m x) z) (* (* y_m x) (/ 0.5 z)))))
y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (x <= 1.4) {
tmp = (y_m / x) / z;
} else {
tmp = (y_m * x) * (0.5 / z);
}
return y_s * tmp;
}
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
real(8) function code(y_s, x, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.4d0) then
tmp = (y_m / x) / z
else
tmp = (y_m * x) * (0.5d0 / z)
end if
code = y_s * tmp
end function
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
public static double code(double y_s, double x, double y_m, double z) {
double tmp;
if (x <= 1.4) {
tmp = (y_m / x) / z;
} else {
tmp = (y_m * x) * (0.5 / z);
}
return y_s * tmp;
}
y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) def code(y_s, x, y_m, z): tmp = 0 if x <= 1.4: tmp = (y_m / x) / z else: tmp = (y_m * x) * (0.5 / z) return y_s * tmp
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (x <= 1.4) tmp = Float64(Float64(y_m / x) / z); else tmp = Float64(Float64(y_m * x) * Float64(0.5 / z)); end return Float64(y_s * tmp) end
y\_m = abs(y); y\_s = sign(y) * abs(1.0); function tmp_2 = code(y_s, x, y_m, z) tmp = 0.0; if (x <= 1.4) tmp = (y_m / x) / z; else tmp = (y_m * x) * (0.5 / z); end tmp_2 = y_s * tmp; end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[x, 1.4], N[(N[(y$95$m / x), $MachinePrecision] / z), $MachinePrecision], N[(N[(y$95$m * x), $MachinePrecision] * N[(0.5 / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 1.4:\\
\;\;\;\;\frac{\frac{y\_m}{x}}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(y\_m \cdot x\right) \cdot \frac{0.5}{z}\\
\end{array}
\end{array}
if x < 1.3999999999999999Initial program 86.5%
Taylor expanded in x around 0
/-lowering-/.f6459.5
Simplified59.5%
if 1.3999999999999999 < x Initial program 76.9%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-/l*N/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6434.0
Simplified34.0%
Taylor expanded in x around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6434.0
Simplified34.0%
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6434.0
Applied egg-rr34.0%
y\_m = (fabs.f64 y) y\_s = (copysign.f64 #s(literal 1 binary64) y) (FPCore (y_s x y_m z) :precision binary64 (* y_s (if (<= x 1.4) (/ y_m (* x z)) (* (* y_m x) (/ 0.5 z)))))
y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
double tmp;
if (x <= 1.4) {
tmp = y_m / (x * z);
} else {
tmp = (y_m * x) * (0.5 / z);
}
return y_s * tmp;
}
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
real(8) function code(y_s, x, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.4d0) then
tmp = y_m / (x * z)
else
tmp = (y_m * x) * (0.5d0 / z)
end if
code = y_s * tmp
end function
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
public static double code(double y_s, double x, double y_m, double z) {
double tmp;
if (x <= 1.4) {
tmp = y_m / (x * z);
} else {
tmp = (y_m * x) * (0.5 / z);
}
return y_s * tmp;
}
y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) def code(y_s, x, y_m, z): tmp = 0 if x <= 1.4: tmp = y_m / (x * z) else: tmp = (y_m * x) * (0.5 / z) return y_s * tmp
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) tmp = 0.0 if (x <= 1.4) tmp = Float64(y_m / Float64(x * z)); else tmp = Float64(Float64(y_m * x) * Float64(0.5 / z)); end return Float64(y_s * tmp) end
y\_m = abs(y); y\_s = sign(y) * abs(1.0); function tmp_2 = code(y_s, x, y_m, z) tmp = 0.0; if (x <= 1.4) tmp = y_m / (x * z); else tmp = (y_m * x) * (0.5 / z); end tmp_2 = y_s * tmp; end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * If[LessEqual[x, 1.4], N[(y$95$m / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m * x), $MachinePrecision] * N[(0.5 / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 1.4:\\
\;\;\;\;\frac{y\_m}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\left(y\_m \cdot x\right) \cdot \frac{0.5}{z}\\
\end{array}
\end{array}
if x < 1.3999999999999999Initial program 86.5%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f6458.5
Simplified58.5%
if 1.3999999999999999 < x Initial program 76.9%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-/l*N/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6434.0
Simplified34.0%
Taylor expanded in x around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6434.0
Simplified34.0%
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6434.0
Applied egg-rr34.0%
y\_m = (fabs.f64 y) y\_s = (copysign.f64 #s(literal 1 binary64) y) (FPCore (y_s x y_m z) :precision binary64 (* y_s (/ y_m (* x z))))
y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m, double z) {
return y_s * (y_m / (x * z));
}
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
real(8) function code(y_s, x, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
code = y_s * (y_m / (x * z))
end function
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
public static double code(double y_s, double x, double y_m, double z) {
return y_s * (y_m / (x * z));
}
y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) def code(y_s, x, y_m, z): return y_s * (y_m / (x * z))
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m, z) return Float64(y_s * Float64(y_m / Float64(x * z))) end
y\_m = abs(y); y\_s = sign(y) * abs(1.0); function tmp = code(y_s, x, y_m, z) tmp = y_s * (y_m / (x * z)); end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_, z_] := N[(y$95$s * N[(y$95$m / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \frac{y\_m}{x \cdot z}
\end{array}
Initial program 84.0%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f6445.6
Simplified45.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (/ (/ y z) x) (cosh x))))
(if (< y -4.618902267687042e-52)
t_0
(if (< y 1.038530535935153e-39) (/ (/ (* (cosh x) y) x) z) t_0))))
double code(double x, double y, double z) {
double t_0 = ((y / z) / x) * cosh(x);
double tmp;
if (y < -4.618902267687042e-52) {
tmp = t_0;
} else if (y < 1.038530535935153e-39) {
tmp = ((cosh(x) * y) / x) / z;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((y / z) / x) * cosh(x)
if (y < (-4.618902267687042d-52)) then
tmp = t_0
else if (y < 1.038530535935153d-39) then
tmp = ((cosh(x) * y) / x) / z
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y / z) / x) * Math.cosh(x);
double tmp;
if (y < -4.618902267687042e-52) {
tmp = t_0;
} else if (y < 1.038530535935153e-39) {
tmp = ((Math.cosh(x) * y) / x) / z;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y / z) / x) * math.cosh(x) tmp = 0 if y < -4.618902267687042e-52: tmp = t_0 elif y < 1.038530535935153e-39: tmp = ((math.cosh(x) * y) / x) / z else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y / z) / x) * cosh(x)) tmp = 0.0 if (y < -4.618902267687042e-52) tmp = t_0; elseif (y < 1.038530535935153e-39) tmp = Float64(Float64(Float64(cosh(x) * y) / x) / z); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y / z) / x) * cosh(x); tmp = 0.0; if (y < -4.618902267687042e-52) tmp = t_0; elseif (y < 1.038530535935153e-39) tmp = ((cosh(x) * y) / x) / z; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision] * N[Cosh[x], $MachinePrecision]), $MachinePrecision]}, If[Less[y, -4.618902267687042e-52], t$95$0, If[Less[y, 1.038530535935153e-39], N[(N[(N[(N[Cosh[x], $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision] / z), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{y}{z}}{x} \cdot \cosh x\\
\mathbf{if}\;y < -4.618902267687042 \cdot 10^{-52}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y < 1.038530535935153 \cdot 10^{-39}:\\
\;\;\;\;\frac{\frac{\cosh x \cdot y}{x}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
herbie shell --seed 2024204
(FPCore (x y z)
:name "Linear.Quaternion:$ctan from linear-1.19.1.3"
:precision binary64
:alt
(! :herbie-platform default (if (< y -2309451133843521/5000000000000000000000000000000000000000000000000000000000000000000) (* (/ (/ y z) x) (cosh x)) (if (< y 1038530535935153/1000000000000000000000000000000000000000000000000000000) (/ (/ (* (cosh x) y) x) z) (* (/ (/ y z) x) (cosh x)))))
(/ (* (cosh x) (/ y x)) z))