
(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 21 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}
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= z_m 2.8e+53)
(/ (* (cosh x) (/ y z_m)) x)
(* y (/ (/ (cosh x) x) z_m)))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (z_m <= 2.8e+53) {
tmp = (cosh(x) * (y / z_m)) / x;
} else {
tmp = y * ((cosh(x) / x) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (z_m <= 2.8d+53) then
tmp = (cosh(x) * (y / z_m)) / x
else
tmp = y * ((cosh(x) / x) / z_m)
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (z_m <= 2.8e+53) {
tmp = (Math.cosh(x) * (y / z_m)) / x;
} else {
tmp = y * ((Math.cosh(x) / x) / z_m);
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if z_m <= 2.8e+53: tmp = (math.cosh(x) * (y / z_m)) / x else: tmp = y * ((math.cosh(x) / x) / z_m) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (z_m <= 2.8e+53) tmp = Float64(Float64(cosh(x) * Float64(y / z_m)) / x); else tmp = Float64(y * Float64(Float64(cosh(x) / x) / z_m)); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (z_m <= 2.8e+53) tmp = (cosh(x) * (y / z_m)) / x; else tmp = y * ((cosh(x) / x) / z_m); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[z$95$m, 2.8e+53], N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / z$95$m), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(y * N[(N[(N[Cosh[x], $MachinePrecision] / x), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 2.8 \cdot 10^{+53}:\\
\;\;\;\;\frac{\cosh x \cdot \frac{y}{z\_m}}{x}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{\frac{\cosh x}{x}}{z\_m}\\
\end{array}
\end{array}
if z < 2.8e53Initial program 84.6%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
associate-*l*N/A
div-invN/A
*-lowering-*.f64N/A
cosh-lowering-cosh.f64N/A
/-lowering-/.f6491.4
Applied egg-rr91.4%
if 2.8e53 < z Initial program 71.8%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f6499.8
Applied egg-rr99.8%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= (* (cosh x) (/ y x)) 2e+285)
(/ (cosh x) (* z_m (/ x y)))
(* y (/ (/ (cosh x) x) z_m)))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if ((cosh(x) * (y / x)) <= 2e+285) {
tmp = cosh(x) / (z_m * (x / y));
} else {
tmp = y * ((cosh(x) / x) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if ((cosh(x) * (y / x)) <= 2d+285) then
tmp = cosh(x) / (z_m * (x / y))
else
tmp = y * ((cosh(x) / x) / z_m)
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if ((Math.cosh(x) * (y / x)) <= 2e+285) {
tmp = Math.cosh(x) / (z_m * (x / y));
} else {
tmp = y * ((Math.cosh(x) / x) / z_m);
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if (math.cosh(x) * (y / x)) <= 2e+285: tmp = math.cosh(x) / (z_m * (x / y)) else: tmp = y * ((math.cosh(x) / x) / z_m) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (Float64(cosh(x) * Float64(y / x)) <= 2e+285) tmp = Float64(cosh(x) / Float64(z_m * Float64(x / y))); else tmp = Float64(y * Float64(Float64(cosh(x) / x) / z_m)); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if ((cosh(x) * (y / x)) <= 2e+285) tmp = cosh(x) / (z_m * (x / y)); else tmp = y * ((cosh(x) / x) / z_m); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], 2e+285], N[(N[Cosh[x], $MachinePrecision] / N[(z$95$m * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[Cosh[x], $MachinePrecision] / x), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq 2 \cdot 10^{+285}:\\
\;\;\;\;\frac{\cosh x}{z\_m \cdot \frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{\frac{\cosh x}{x}}{z\_m}\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 y x)) < 2e285Initial program 96.8%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64N/A
div-invN/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f6493.0
Applied egg-rr93.0%
if 2e285 < (*.f64 (cosh.f64 x) (/.f64 y x)) Initial program 59.1%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64100.0
Applied egg-rr100.0%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= (* (cosh x) (/ y x)) 2e+285)
(/ (* (/ y x) (fma 0.5 (fma x x 0.0) 1.0)) z_m)
(* y (/ (/ (cosh x) x) z_m)))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if ((cosh(x) * (y / x)) <= 2e+285) {
tmp = ((y / x) * fma(0.5, fma(x, x, 0.0), 1.0)) / z_m;
} else {
tmp = y * ((cosh(x) / x) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (Float64(cosh(x) * Float64(y / x)) <= 2e+285) tmp = Float64(Float64(Float64(y / x) * fma(0.5, fma(x, x, 0.0), 1.0)) / z_m); else tmp = Float64(y * Float64(Float64(cosh(x) / x) / z_m)); end return Float64(z_s * tmp) end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], 2e+285], N[(N[(N[(y / x), $MachinePrecision] * N[(0.5 * N[(x * x + 0.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision], N[(y * N[(N[(N[Cosh[x], $MachinePrecision] / x), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq 2 \cdot 10^{+285}:\\
\;\;\;\;\frac{\frac{y}{x} \cdot \mathsf{fma}\left(0.5, \mathsf{fma}\left(x, x, 0\right), 1\right)}{z\_m}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{\frac{\cosh x}{x}}{z\_m}\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 y x)) < 2e285Initial program 96.8%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
unpow2N/A
accelerator-lowering-fma.f6483.4
Simplified83.4%
if 2e285 < (*.f64 (cosh.f64 x) (/.f64 y x)) Initial program 59.1%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64100.0
Applied egg-rr100.0%
Final simplification89.7%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= (* (cosh x) (/ y x)) 2e+285)
(/ (* (/ y x) (fma 0.5 (fma x x 0.0) 1.0)) z_m)
(*
y
(/
(/
(fma
(* x x)
(fma
x
(* x (fma (* x x) 0.001388888888888889 0.041666666666666664))
0.5)
1.0)
x)
z_m)))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if ((cosh(x) * (y / x)) <= 2e+285) {
tmp = ((y / x) * fma(0.5, fma(x, x, 0.0), 1.0)) / z_m;
} else {
tmp = y * ((fma((x * x), fma(x, (x * fma((x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0) / x) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (Float64(cosh(x) * Float64(y / x)) <= 2e+285) tmp = Float64(Float64(Float64(y / x) * fma(0.5, fma(x, x, 0.0), 1.0)) / z_m); else tmp = Float64(y * Float64(Float64(fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0) / x) / z_m)); end return Float64(z_s * tmp) end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], 2e+285], N[(N[(N[(y / x), $MachinePrecision] * N[(0.5 * N[(x * x + 0.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision], N[(y * N[(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] / x), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq 2 \cdot 10^{+285}:\\
\;\;\;\;\frac{\frac{y}{x} \cdot \mathsf{fma}\left(0.5, \mathsf{fma}\left(x, x, 0\right), 1\right)}{z\_m}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{\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}}{z\_m}\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 y x)) < 2e285Initial program 96.8%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
unpow2N/A
accelerator-lowering-fma.f6483.4
Simplified83.4%
if 2e285 < (*.f64 (cosh.f64 x) (/.f64 y x)) Initial program 59.1%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64100.0
Applied egg-rr100.0%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified93.0%
Final simplification87.0%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= (* (cosh x) (/ y x)) INFINITY)
(*
(/ y x)
(/ (fma x (* x (fma x (* x 0.041666666666666664) 0.5)) 1.0) z_m))
(* y (/ (* x (* x (* x 0.041666666666666664))) z_m)))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if ((cosh(x) * (y / x)) <= ((double) INFINITY)) {
tmp = (y / x) * (fma(x, (x * fma(x, (x * 0.041666666666666664), 0.5)), 1.0) / z_m);
} else {
tmp = y * ((x * (x * (x * 0.041666666666666664))) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (Float64(cosh(x) * Float64(y / x)) <= Inf) tmp = Float64(Float64(y / x) * Float64(fma(x, Float64(x * fma(x, Float64(x * 0.041666666666666664), 0.5)), 1.0) / z_m)); else tmp = Float64(y * Float64(Float64(x * Float64(x * Float64(x * 0.041666666666666664))) / z_m)); end return Float64(z_s * tmp) end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(y / x), $MachinePrecision] * N[(N[(x * N[(x * N[(x * N[(x * 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(x * N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq \infty:\\
\;\;\;\;\frac{y}{x} \cdot \frac{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.041666666666666664, 0.5\right), 1\right)}{z\_m}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x \cdot \left(x \cdot \left(x \cdot 0.041666666666666664\right)\right)}{z\_m}\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 y x)) < +inf.0Initial program 95.6%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f6494.7
Applied egg-rr94.7%
Taylor expanded in x around 0
Simplified77.6%
*-commutativeN/A
times-fracN/A
*-lowering-*.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-/.f6485.0
Applied egg-rr85.0%
if +inf.0 < (*.f64 (cosh.f64 x) (/.f64 y x)) Initial program 0.0%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f640.1
Simplified0.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6472.6
Simplified72.6%
Taylor expanded in x around 0
*-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
cube-multN/A
unpow2N/A
associate-/l*N/A
*-rgt-identityN/A
associate-*r/N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
*-commutativeN/A
associate-*r/N/A
Simplified91.6%
Final simplification85.9%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= x 4.5e+50)
(* y (/ (cosh x) (* z_m x)))
(*
y
(/
(/
(fma
(* x x)
(fma
x
(* x (fma (* x x) 0.001388888888888889 0.041666666666666664))
0.5)
1.0)
x)
z_m)))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 4.5e+50) {
tmp = y * (cosh(x) / (z_m * x));
} else {
tmp = y * ((fma((x * x), fma(x, (x * fma((x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0) / x) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (x <= 4.5e+50) tmp = Float64(y * Float64(cosh(x) / Float64(z_m * x))); else tmp = Float64(y * Float64(Float64(fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0) / x) / z_m)); end return Float64(z_s * tmp) end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 4.5e+50], N[(y * N[(N[Cosh[x], $MachinePrecision] / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(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] / x), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 4.5 \cdot 10^{+50}:\\
\;\;\;\;y \cdot \frac{\cosh x}{z\_m \cdot x}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{\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}}{z\_m}\\
\end{array}
\end{array}
if x < 4.50000000000000014e50Initial program 86.6%
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-*.f6489.6
Applied egg-rr89.6%
if 4.50000000000000014e50 < x Initial program 67.9%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64100.0
Applied egg-rr100.0%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified100.0%
Final simplification91.9%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= x 5.7e+102)
(/
(*
y
(fma
(* x x)
(fma
(* x x)
(fma (* x x) 0.001388888888888889 0.041666666666666664)
0.5)
1.0))
(* z_m x))
(* 0.041666666666666664 (/ (* y (* x (* x x))) z_m)))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 5.7e+102) {
tmp = (y * fma((x * x), fma((x * x), fma((x * x), 0.001388888888888889, 0.041666666666666664), 0.5), 1.0)) / (z_m * x);
} else {
tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (x <= 5.7e+102) tmp = Float64(Float64(y * fma(Float64(x * x), fma(Float64(x * x), fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664), 0.5), 1.0)) / Float64(z_m * x)); else tmp = Float64(0.041666666666666664 * Float64(Float64(y * Float64(x * Float64(x * x))) / z_m)); end return Float64(z_s * tmp) end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 5.7e+102], N[(N[(y * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(y * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 5.7 \cdot 10^{+102}:\\
\;\;\;\;\frac{y \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{z\_m \cdot x}\\
\mathbf{else}:\\
\;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\
\end{array}
\end{array}
if x < 5.6999999999999999e102Initial program 85.5%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f6494.5
Applied egg-rr94.5%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified85.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-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
accelerator-lowering-fma.f64N/A
*-lowering-*.f6485.9
Simplified85.9%
Taylor expanded in y around 0
/-lowering-/.f64N/A
Simplified82.2%
if 5.6999999999999999e102 < x Initial program 67.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6467.4
Simplified67.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.0
Simplified91.0%
associate-*r*N/A
associate-*r*N/A
cube-unmultN/A
*-lowering-*.f64N/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Final simplification85.2%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= x 1e+103)
(*
y
(/
(fma
(* x x)
(fma
x
(* x (fma (* x x) 0.001388888888888889 0.041666666666666664))
0.5)
1.0)
(* z_m x)))
(* 0.041666666666666664 (/ (* y (* x (* x x))) z_m)))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 1e+103) {
tmp = y * (fma((x * x), fma(x, (x * fma((x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0) / (z_m * x));
} else {
tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (x <= 1e+103) tmp = Float64(y * Float64(fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0) / Float64(z_m * x))); else tmp = Float64(0.041666666666666664 * Float64(Float64(y * Float64(x * Float64(x * x))) / z_m)); end return Float64(z_s * tmp) end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 1e+103], N[(y * 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[(z$95$m * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(y * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 10^{+103}:\\
\;\;\;\;y \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)}{z\_m \cdot x}\\
\mathbf{else}:\\
\;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\
\end{array}
\end{array}
if x < 1e103Initial program 85.5%
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-*.f6489.8
Applied egg-rr89.8%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6481.2
Simplified81.2%
if 1e103 < x Initial program 67.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6467.4
Simplified67.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.0
Simplified91.0%
associate-*r*N/A
associate-*r*N/A
cube-unmultN/A
*-lowering-*.f64N/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Final simplification84.3%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= x 1e+103)
(*
y
(/
(fma (* x x) (fma x (* x (* (* x x) 0.001388888888888889)) 0.5) 1.0)
(* z_m x)))
(* 0.041666666666666664 (/ (* y (* x (* x x))) z_m)))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 1e+103) {
tmp = y * (fma((x * x), fma(x, (x * ((x * x) * 0.001388888888888889)), 0.5), 1.0) / (z_m * x));
} else {
tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (x <= 1e+103) tmp = Float64(y * Float64(fma(Float64(x * x), fma(x, Float64(x * Float64(Float64(x * x) * 0.001388888888888889)), 0.5), 1.0) / Float64(z_m * x))); else tmp = Float64(0.041666666666666664 * Float64(Float64(y * Float64(x * Float64(x * x))) / z_m)); end return Float64(z_s * tmp) end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 1e+103], N[(y * N[(N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(y * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 10^{+103}:\\
\;\;\;\;y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right), 0.5\right), 1\right)}{z\_m \cdot x}\\
\mathbf{else}:\\
\;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\
\end{array}
\end{array}
if x < 1e103Initial program 85.5%
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-*.f6489.8
Applied egg-rr89.8%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6481.2
Simplified81.2%
Taylor expanded in x around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.2
Simplified81.2%
if 1e103 < x Initial program 67.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6467.4
Simplified67.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.0
Simplified91.0%
associate-*r*N/A
associate-*r*N/A
cube-unmultN/A
*-lowering-*.f64N/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Final simplification84.3%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(let* ((t_0 (* x (* x x))))
(*
z_s
(if (<= x 5.7e+102)
(* y (/ (fma (* x x) (* 0.001388888888888889 (* x t_0)) 1.0) (* z_m x)))
(* 0.041666666666666664 (/ (* y t_0) z_m))))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double t_0 = x * (x * x);
double tmp;
if (x <= 5.7e+102) {
tmp = y * (fma((x * x), (0.001388888888888889 * (x * t_0)), 1.0) / (z_m * x));
} else {
tmp = 0.041666666666666664 * ((y * t_0) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) t_0 = Float64(x * Float64(x * x)) tmp = 0.0 if (x <= 5.7e+102) tmp = Float64(y * Float64(fma(Float64(x * x), Float64(0.001388888888888889 * Float64(x * t_0)), 1.0) / Float64(z_m * x))); else tmp = Float64(0.041666666666666664 * Float64(Float64(y * t_0) / z_m)); end return Float64(z_s * tmp) end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * If[LessEqual[x, 5.7e+102], N[(y * N[(N[(N[(x * x), $MachinePrecision] * N[(0.001388888888888889 * N[(x * t$95$0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(y * t$95$0), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 5.7 \cdot 10^{+102}:\\
\;\;\;\;y \cdot \frac{\mathsf{fma}\left(x \cdot x, 0.001388888888888889 \cdot \left(x \cdot t\_0\right), 1\right)}{z\_m \cdot x}\\
\mathbf{else}:\\
\;\;\;\;0.041666666666666664 \cdot \frac{y \cdot t\_0}{z\_m}\\
\end{array}
\end{array}
\end{array}
if x < 5.6999999999999999e102Initial program 85.5%
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-*.f6489.8
Applied egg-rr89.8%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6481.2
Simplified81.2%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
unpow2N/A
associate-*l*N/A
unpow2N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.0
Simplified81.0%
if 5.6999999999999999e102 < x Initial program 67.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6467.4
Simplified67.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.0
Simplified91.0%
associate-*r*N/A
associate-*r*N/A
cube-unmultN/A
*-lowering-*.f64N/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Final simplification84.2%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= x 6e+102)
(/
(* y (fma x (* x (fma (* x x) 0.041666666666666664 0.5)) 1.0))
(* z_m x))
(* 0.041666666666666664 (/ (* y (* x (* x x))) z_m)))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 6e+102) {
tmp = (y * fma(x, (x * fma((x * x), 0.041666666666666664, 0.5)), 1.0)) / (z_m * x);
} else {
tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (x <= 6e+102) tmp = Float64(Float64(y * fma(x, Float64(x * fma(Float64(x * x), 0.041666666666666664, 0.5)), 1.0)) / Float64(z_m * x)); else tmp = Float64(0.041666666666666664 * Float64(Float64(y * Float64(x * Float64(x * x))) / z_m)); end return Float64(z_s * tmp) end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 6e+102], N[(N[(y * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(y * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 6 \cdot 10^{+102}:\\
\;\;\;\;\frac{y \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)}{z\_m \cdot x}\\
\mathbf{else}:\\
\;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\
\end{array}
\end{array}
if x < 5.9999999999999996e102Initial program 85.5%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f6494.5
Applied egg-rr94.5%
Taylor expanded in x around 0
Simplified77.2%
if 5.9999999999999996e102 < x Initial program 67.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6467.4
Simplified67.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.0
Simplified91.0%
associate-*r*N/A
associate-*r*N/A
cube-unmultN/A
*-lowering-*.f64N/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Final simplification81.0%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= x 5.4e+102)
(*
y
(/ (fma x (* x (fma (* x x) 0.041666666666666664 0.5)) 1.0) (* z_m x)))
(* 0.041666666666666664 (/ (* y (* x (* x x))) z_m)))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 5.4e+102) {
tmp = y * (fma(x, (x * fma((x * x), 0.041666666666666664, 0.5)), 1.0) / (z_m * x));
} else {
tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (x <= 5.4e+102) tmp = Float64(y * Float64(fma(x, Float64(x * fma(Float64(x * x), 0.041666666666666664, 0.5)), 1.0) / Float64(z_m * x))); else tmp = Float64(0.041666666666666664 * Float64(Float64(y * Float64(x * Float64(x * x))) / z_m)); end return Float64(z_s * tmp) end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 5.4e+102], N[(y * N[(N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(y * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 5.4 \cdot 10^{+102}:\\
\;\;\;\;y \cdot \frac{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)}{z\_m \cdot x}\\
\mathbf{else}:\\
\;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\
\end{array}
\end{array}
if x < 5.4000000000000002e102Initial program 85.5%
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-*.f6489.8
Applied egg-rr89.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
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6476.7
Simplified76.7%
if 5.4000000000000002e102 < x Initial program 67.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6467.4
Simplified67.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.0
Simplified91.0%
associate-*r*N/A
associate-*r*N/A
cube-unmultN/A
*-lowering-*.f64N/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Final simplification80.6%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= x 0.0009)
(/ (* y (fma x (* x 0.5) 1.0)) (* z_m x))
(* y (/ (* x (* x (* x 0.041666666666666664))) z_m)))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 0.0009) {
tmp = (y * fma(x, (x * 0.5), 1.0)) / (z_m * x);
} else {
tmp = y * ((x * (x * (x * 0.041666666666666664))) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (x <= 0.0009) tmp = Float64(Float64(y * fma(x, Float64(x * 0.5), 1.0)) / Float64(z_m * x)); else tmp = Float64(y * Float64(Float64(x * Float64(x * Float64(x * 0.041666666666666664))) / z_m)); end return Float64(z_s * tmp) end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 0.0009], N[(N[(y * N[(x * N[(x * 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(x * N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 0.0009:\\
\;\;\;\;\frac{y \cdot \mathsf{fma}\left(x, x \cdot 0.5, 1\right)}{z\_m \cdot x}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x \cdot \left(x \cdot \left(x \cdot 0.041666666666666664\right)\right)}{z\_m}\\
\end{array}
\end{array}
if x < 8.9999999999999998e-4Initial program 85.8%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f6493.8
Applied egg-rr93.8%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-inN/A
associate-*r/N/A
times-fracN/A
*-commutativeN/A
/-lowering-/.f64N/A
Simplified79.5%
if 8.9999999999999998e-4 < x Initial program 73.1%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6453.0
Simplified53.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6468.3
Simplified68.3%
Taylor expanded in x around 0
*-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
cube-multN/A
unpow2N/A
associate-/l*N/A
*-rgt-identityN/A
associate-*r/N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
*-commutativeN/A
associate-*r/N/A
Simplified76.9%
Final simplification78.8%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= x 0.0009)
(/ y (* z_m x))
(* y (/ (* x (* x (* x 0.041666666666666664))) z_m)))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 0.0009) {
tmp = y / (z_m * x);
} else {
tmp = y * ((x * (x * (x * 0.041666666666666664))) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (x <= 0.0009d0) then
tmp = y / (z_m * x)
else
tmp = y * ((x * (x * (x * 0.041666666666666664d0))) / z_m)
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 0.0009) {
tmp = y / (z_m * x);
} else {
tmp = y * ((x * (x * (x * 0.041666666666666664))) / z_m);
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if x <= 0.0009: tmp = y / (z_m * x) else: tmp = y * ((x * (x * (x * 0.041666666666666664))) / z_m) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (x <= 0.0009) tmp = Float64(y / Float64(z_m * x)); else tmp = Float64(y * Float64(Float64(x * Float64(x * Float64(x * 0.041666666666666664))) / z_m)); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (x <= 0.0009) tmp = y / (z_m * x); else tmp = y * ((x * (x * (x * 0.041666666666666664))) / z_m); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 0.0009], N[(y / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(x * N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 0.0009:\\
\;\;\;\;\frac{y}{z\_m \cdot x}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x \cdot \left(x \cdot \left(x \cdot 0.041666666666666664\right)\right)}{z\_m}\\
\end{array}
\end{array}
if x < 8.9999999999999998e-4Initial program 85.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6463.4
Simplified63.4%
+-rgt-identityN/A
*-commutativeN/A
*-lowering-*.f6463.4
Applied egg-rr63.4%
if 8.9999999999999998e-4 < x Initial program 73.1%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6453.0
Simplified53.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6468.3
Simplified68.3%
Taylor expanded in x around 0
*-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
cube-multN/A
unpow2N/A
associate-/l*N/A
*-rgt-identityN/A
associate-*r/N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
*-commutativeN/A
associate-*r/N/A
Simplified76.9%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= x 0.0009)
(/ y (* z_m x))
(* 0.041666666666666664 (/ (* y (* x (* x x))) z_m)))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 0.0009) {
tmp = y / (z_m * x);
} else {
tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (x <= 0.0009d0) then
tmp = y / (z_m * x)
else
tmp = 0.041666666666666664d0 * ((y * (x * (x * x))) / z_m)
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 0.0009) {
tmp = y / (z_m * x);
} else {
tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m);
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if x <= 0.0009: tmp = y / (z_m * x) else: tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (x <= 0.0009) tmp = Float64(y / Float64(z_m * x)); else tmp = Float64(0.041666666666666664 * Float64(Float64(y * Float64(x * Float64(x * x))) / z_m)); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (x <= 0.0009) tmp = y / (z_m * x); else tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 0.0009], N[(y / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(y * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 0.0009:\\
\;\;\;\;\frac{y}{z\_m \cdot x}\\
\mathbf{else}:\\
\;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\
\end{array}
\end{array}
if x < 8.9999999999999998e-4Initial program 85.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6463.4
Simplified63.4%
+-rgt-identityN/A
*-commutativeN/A
*-lowering-*.f6463.4
Applied egg-rr63.4%
if 8.9999999999999998e-4 < x Initial program 73.1%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6453.0
Simplified53.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6468.3
Simplified68.3%
associate-*r*N/A
associate-*r*N/A
cube-unmultN/A
*-lowering-*.f64N/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f6474.1
Applied egg-rr74.1%
Final simplification66.2%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= x 0.0009)
(/ y (* z_m x))
(* 0.041666666666666664 (/ (* x (* x (* x y))) z_m)))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 0.0009) {
tmp = y / (z_m * x);
} else {
tmp = 0.041666666666666664 * ((x * (x * (x * y))) / z_m);
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (x <= 0.0009d0) then
tmp = y / (z_m * x)
else
tmp = 0.041666666666666664d0 * ((x * (x * (x * y))) / z_m)
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 0.0009) {
tmp = y / (z_m * x);
} else {
tmp = 0.041666666666666664 * ((x * (x * (x * y))) / z_m);
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if x <= 0.0009: tmp = y / (z_m * x) else: tmp = 0.041666666666666664 * ((x * (x * (x * y))) / z_m) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (x <= 0.0009) tmp = Float64(y / Float64(z_m * x)); else tmp = Float64(0.041666666666666664 * Float64(Float64(x * Float64(x * Float64(x * y))) / z_m)); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (x <= 0.0009) tmp = y / (z_m * x); else tmp = 0.041666666666666664 * ((x * (x * (x * y))) / z_m); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 0.0009], N[(y / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(x * N[(x * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 0.0009:\\
\;\;\;\;\frac{y}{z\_m \cdot x}\\
\mathbf{else}:\\
\;\;\;\;0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \left(x \cdot y\right)\right)}{z\_m}\\
\end{array}
\end{array}
if x < 8.9999999999999998e-4Initial program 85.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6463.4
Simplified63.4%
+-rgt-identityN/A
*-commutativeN/A
*-lowering-*.f6463.4
Applied egg-rr63.4%
if 8.9999999999999998e-4 < x Initial program 73.1%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6453.0
Simplified53.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6468.3
Simplified68.3%
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
:precision binary64
(*
z_s
(if (<= x 0.0009)
(/ y (* z_m x))
(* 0.041666666666666664 (* (* x x) (/ (* x y) z_m))))))z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 0.0009) {
tmp = y / (z_m * x);
} else {
tmp = 0.041666666666666664 * ((x * x) * ((x * y) / z_m));
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (x <= 0.0009d0) then
tmp = y / (z_m * x)
else
tmp = 0.041666666666666664d0 * ((x * x) * ((x * y) / z_m))
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 0.0009) {
tmp = y / (z_m * x);
} else {
tmp = 0.041666666666666664 * ((x * x) * ((x * y) / z_m));
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if x <= 0.0009: tmp = y / (z_m * x) else: tmp = 0.041666666666666664 * ((x * x) * ((x * y) / z_m)) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (x <= 0.0009) tmp = Float64(y / Float64(z_m * x)); else tmp = Float64(0.041666666666666664 * Float64(Float64(x * x) * Float64(Float64(x * y) / z_m))); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (x <= 0.0009) tmp = y / (z_m * x); else tmp = 0.041666666666666664 * ((x * x) * ((x * y) / z_m)); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 0.0009], N[(y / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(x * x), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 0.0009:\\
\;\;\;\;\frac{y}{z\_m \cdot x}\\
\mathbf{else}:\\
\;\;\;\;0.041666666666666664 \cdot \left(\left(x \cdot x\right) \cdot \frac{x \cdot y}{z\_m}\right)\\
\end{array}
\end{array}
if x < 8.9999999999999998e-4Initial program 85.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6463.4
Simplified63.4%
+-rgt-identityN/A
*-commutativeN/A
*-lowering-*.f6463.4
Applied egg-rr63.4%
if 8.9999999999999998e-4 < x Initial program 73.1%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6453.0
Simplified53.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6468.3
Simplified68.3%
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6465.5
Applied egg-rr65.5%
z\_m = (fabs.f64 z) z\_s = (copysign.f64 #s(literal 1 binary64) z) (FPCore (z_s x y z_m) :precision binary64 (* z_s (if (<= x 0.0009) (/ y (* z_m x)) (* 0.5 (* y (* x (/ 1.0 z_m)))))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 0.0009) {
tmp = y / (z_m * x);
} else {
tmp = 0.5 * (y * (x * (1.0 / z_m)));
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (x <= 0.0009d0) then
tmp = y / (z_m * x)
else
tmp = 0.5d0 * (y * (x * (1.0d0 / z_m)))
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 0.0009) {
tmp = y / (z_m * x);
} else {
tmp = 0.5 * (y * (x * (1.0 / z_m)));
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if x <= 0.0009: tmp = y / (z_m * x) else: tmp = 0.5 * (y * (x * (1.0 / z_m))) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (x <= 0.0009) tmp = Float64(y / Float64(z_m * x)); else tmp = Float64(0.5 * Float64(y * Float64(x * Float64(1.0 / z_m)))); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (x <= 0.0009) tmp = y / (z_m * x); else tmp = 0.5 * (y * (x * (1.0 / z_m))); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 0.0009], N[(y / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(y * N[(x * N[(1.0 / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 0.0009:\\
\;\;\;\;\frac{y}{z\_m \cdot x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(y \cdot \left(x \cdot \frac{1}{z\_m}\right)\right)\\
\end{array}
\end{array}
if x < 8.9999999999999998e-4Initial program 85.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6463.4
Simplified63.4%
+-rgt-identityN/A
*-commutativeN/A
*-lowering-*.f6463.4
Applied egg-rr63.4%
if 8.9999999999999998e-4 < x Initial program 73.1%
Taylor expanded in x around 0
*-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
associate-*l/N/A
times-fracN/A
+-commutativeN/A
distribute-rgt1-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
/-lowering-/.f64N/A
Simplified44.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6426.7
Simplified26.7%
*-commutativeN/A
div-invN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6437.9
Applied egg-rr37.9%
Final simplification56.7%
z\_m = (fabs.f64 z) z\_s = (copysign.f64 #s(literal 1 binary64) z) (FPCore (z_s x y z_m) :precision binary64 (* z_s (if (<= x 0.0009) (/ y (* z_m x)) (/ (* 0.5 (* x y)) z_m))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 0.0009) {
tmp = y / (z_m * x);
} else {
tmp = (0.5 * (x * y)) / z_m;
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (x <= 0.0009d0) then
tmp = y / (z_m * x)
else
tmp = (0.5d0 * (x * y)) / z_m
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 0.0009) {
tmp = y / (z_m * x);
} else {
tmp = (0.5 * (x * y)) / z_m;
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if x <= 0.0009: tmp = y / (z_m * x) else: tmp = (0.5 * (x * y)) / z_m return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (x <= 0.0009) tmp = Float64(y / Float64(z_m * x)); else tmp = Float64(Float64(0.5 * Float64(x * y)) / z_m); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (x <= 0.0009) tmp = y / (z_m * x); else tmp = (0.5 * (x * y)) / z_m; end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 0.0009], N[(y / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 * N[(x * y), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 0.0009:\\
\;\;\;\;\frac{y}{z\_m \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5 \cdot \left(x \cdot y\right)}{z\_m}\\
\end{array}
\end{array}
if x < 8.9999999999999998e-4Initial program 85.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6463.4
Simplified63.4%
+-rgt-identityN/A
*-commutativeN/A
*-lowering-*.f6463.4
Applied egg-rr63.4%
if 8.9999999999999998e-4 < x Initial program 73.1%
Taylor expanded in x around 0
*-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
associate-*l/N/A
times-fracN/A
+-commutativeN/A
distribute-rgt1-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
/-lowering-/.f64N/A
Simplified44.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6426.7
Simplified26.7%
*-commutativeN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6435.2
Applied egg-rr35.2%
Final simplification56.0%
z\_m = (fabs.f64 z) z\_s = (copysign.f64 #s(literal 1 binary64) z) (FPCore (z_s x y z_m) :precision binary64 (* z_s (if (<= x 0.0009) (/ y (* z_m x)) (* 0.5 (* x (/ y z_m))))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 0.0009) {
tmp = y / (z_m * x);
} else {
tmp = 0.5 * (x * (y / z_m));
}
return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8) :: tmp
if (x <= 0.0009d0) then
tmp = y / (z_m * x)
else
tmp = 0.5d0 * (x * (y / z_m))
end if
code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
double tmp;
if (x <= 0.0009) {
tmp = y / (z_m * x);
} else {
tmp = 0.5 * (x * (y / z_m));
}
return z_s * tmp;
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): tmp = 0 if x <= 0.0009: tmp = y / (z_m * x) else: tmp = 0.5 * (x * (y / z_m)) return z_s * tmp
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) tmp = 0.0 if (x <= 0.0009) tmp = Float64(y / Float64(z_m * x)); else tmp = Float64(0.5 * Float64(x * Float64(y / z_m))); end return Float64(z_s * tmp) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m) tmp = 0.0; if (x <= 0.0009) tmp = y / (z_m * x); else tmp = 0.5 * (x * (y / z_m)); end tmp_2 = z_s * tmp; end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 0.0009], N[(y / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * N[(y / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 0.0009:\\
\;\;\;\;\frac{y}{z\_m \cdot x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{z\_m}\right)\\
\end{array}
\end{array}
if x < 8.9999999999999998e-4Initial program 85.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6463.4
Simplified63.4%
+-rgt-identityN/A
*-commutativeN/A
*-lowering-*.f6463.4
Applied egg-rr63.4%
if 8.9999999999999998e-4 < x Initial program 73.1%
Taylor expanded in x around 0
*-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
associate-*l/N/A
times-fracN/A
+-commutativeN/A
distribute-rgt1-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
/-lowering-/.f64N/A
Simplified44.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6426.7
Simplified26.7%
z\_m = (fabs.f64 z) z\_s = (copysign.f64 #s(literal 1 binary64) z) (FPCore (z_s x y z_m) :precision binary64 (* z_s (/ y (* z_m x))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
return z_s * (y / (z_m * x));
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
code = z_s * (y / (z_m * x))
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
return z_s * (y / (z_m * x));
}
z\_m = math.fabs(z) z\_s = math.copysign(1.0, z) def code(z_s, x, y, z_m): return z_s * (y / (z_m * x))
z\_m = abs(z) z\_s = copysign(1.0, z) function code(z_s, x, y, z_m) return Float64(z_s * Float64(y / Float64(z_m * x))) end
z\_m = abs(z); z\_s = sign(z) * abs(1.0); function tmp = code(z_s, x, y, z_m) tmp = z_s * (y / (z_m * x)); end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * N[(y / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
z\_s \cdot \frac{y}{z\_m \cdot x}
\end{array}
Initial program 82.5%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f6447.9
Simplified47.9%
+-rgt-identityN/A
*-commutativeN/A
*-lowering-*.f6447.9
Applied egg-rr47.9%
(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 2024195
(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))