
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y)))
double code(double x, double y) {
return cos(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cos(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.cos(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.cos(x) * (math.sinh(y) / y)
function code(x, y) return Float64(cos(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = cos(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos x \cdot \frac{\sinh y}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y)))
double code(double x, double y) {
return cos(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cos(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.cos(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.cos(x) * (math.sinh(y) / y)
function code(x, y) return Float64(cos(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = cos(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos x \cdot \frac{\sinh y}{y}
\end{array}
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y)))
double code(double x, double y) {
return cos(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cos(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.cos(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.cos(x) * (math.sinh(y) / y)
function code(x, y) return Float64(cos(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = cos(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos x \cdot \frac{\sinh y}{y}
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 1.0 (* (* x x) -0.5))) (t_1 (* 0.16666666666666666 (* y y))))
(if (<= y 370.0)
(* (cos x) (+ 1.0 t_1))
(if (<= y 1.5e+77)
(* (/ (+ 1.0 (pow t_1 3.0)) (+ (* t_1 t_1) (- 1.0 t_1))) t_0)
(if (<= y 1.32e+154)
(* t_0 (/ (+ (* 0.027777777777777776 (pow y 4.0)) -1.0) (+ t_1 -1.0)))
(* 0.16666666666666666 (* y (* (cos x) y))))))))
double code(double x, double y) {
double t_0 = 1.0 + ((x * x) * -0.5);
double t_1 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= 370.0) {
tmp = cos(x) * (1.0 + t_1);
} else if (y <= 1.5e+77) {
tmp = ((1.0 + pow(t_1, 3.0)) / ((t_1 * t_1) + (1.0 - t_1))) * t_0;
} else if (y <= 1.32e+154) {
tmp = t_0 * (((0.027777777777777776 * pow(y, 4.0)) + -1.0) / (t_1 + -1.0));
} else {
tmp = 0.16666666666666666 * (y * (cos(x) * y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 + ((x * x) * (-0.5d0))
t_1 = 0.16666666666666666d0 * (y * y)
if (y <= 370.0d0) then
tmp = cos(x) * (1.0d0 + t_1)
else if (y <= 1.5d+77) then
tmp = ((1.0d0 + (t_1 ** 3.0d0)) / ((t_1 * t_1) + (1.0d0 - t_1))) * t_0
else if (y <= 1.32d+154) then
tmp = t_0 * (((0.027777777777777776d0 * (y ** 4.0d0)) + (-1.0d0)) / (t_1 + (-1.0d0)))
else
tmp = 0.16666666666666666d0 * (y * (cos(x) * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + ((x * x) * -0.5);
double t_1 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= 370.0) {
tmp = Math.cos(x) * (1.0 + t_1);
} else if (y <= 1.5e+77) {
tmp = ((1.0 + Math.pow(t_1, 3.0)) / ((t_1 * t_1) + (1.0 - t_1))) * t_0;
} else if (y <= 1.32e+154) {
tmp = t_0 * (((0.027777777777777776 * Math.pow(y, 4.0)) + -1.0) / (t_1 + -1.0));
} else {
tmp = 0.16666666666666666 * (y * (Math.cos(x) * y));
}
return tmp;
}
def code(x, y): t_0 = 1.0 + ((x * x) * -0.5) t_1 = 0.16666666666666666 * (y * y) tmp = 0 if y <= 370.0: tmp = math.cos(x) * (1.0 + t_1) elif y <= 1.5e+77: tmp = ((1.0 + math.pow(t_1, 3.0)) / ((t_1 * t_1) + (1.0 - t_1))) * t_0 elif y <= 1.32e+154: tmp = t_0 * (((0.027777777777777776 * math.pow(y, 4.0)) + -1.0) / (t_1 + -1.0)) else: tmp = 0.16666666666666666 * (y * (math.cos(x) * y)) return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(Float64(x * x) * -0.5)) t_1 = Float64(0.16666666666666666 * Float64(y * y)) tmp = 0.0 if (y <= 370.0) tmp = Float64(cos(x) * Float64(1.0 + t_1)); elseif (y <= 1.5e+77) tmp = Float64(Float64(Float64(1.0 + (t_1 ^ 3.0)) / Float64(Float64(t_1 * t_1) + Float64(1.0 - t_1))) * t_0); elseif (y <= 1.32e+154) tmp = Float64(t_0 * Float64(Float64(Float64(0.027777777777777776 * (y ^ 4.0)) + -1.0) / Float64(t_1 + -1.0))); else tmp = Float64(0.16666666666666666 * Float64(y * Float64(cos(x) * y))); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + ((x * x) * -0.5); t_1 = 0.16666666666666666 * (y * y); tmp = 0.0; if (y <= 370.0) tmp = cos(x) * (1.0 + t_1); elseif (y <= 1.5e+77) tmp = ((1.0 + (t_1 ^ 3.0)) / ((t_1 * t_1) + (1.0 - t_1))) * t_0; elseif (y <= 1.32e+154) tmp = t_0 * (((0.027777777777777776 * (y ^ 4.0)) + -1.0) / (t_1 + -1.0)); else tmp = 0.16666666666666666 * (y * (cos(x) * y)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 370.0], N[(N[Cos[x], $MachinePrecision] * N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+77], N[(N[(N[(1.0 + N[Power[t$95$1, 3.0], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$1 * t$95$1), $MachinePrecision] + N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y, 1.32e+154], N[(t$95$0 * N[(N[(N[(0.027777777777777776 * N[Power[y, 4.0], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] / N[(t$95$1 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(y * N[(N[Cos[x], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \left(x \cdot x\right) \cdot -0.5\\
t_1 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq 370:\\
\;\;\;\;\cos x \cdot \left(1 + t_1\right)\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+77}:\\
\;\;\;\;\frac{1 + {t_1}^{3}}{t_1 \cdot t_1 + \left(1 - t_1\right)} \cdot t_0\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;t_0 \cdot \frac{0.027777777777777776 \cdot {y}^{4} + -1}{t_1 + -1}\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(\cos x \cdot y\right)\right)\\
\end{array}
\end{array}
if y < 370Initial program 100.0%
Taylor expanded in y around 0 84.6%
unpow284.6%
Simplified84.6%
if 370 < y < 1.4999999999999999e77Initial program 100.0%
Taylor expanded in y around 0 3.8%
unpow23.8%
Simplified3.8%
Taylor expanded in x around 0 27.6%
+-commutative27.6%
unpow227.6%
associate-+l+27.6%
*-commutative27.6%
associate-*l*27.6%
+-commutative27.6%
unpow227.6%
associate-*r*27.6%
*-commutative27.6%
fma-udef27.6%
associate-*r*27.6%
*-commutative27.6%
fma-udef27.6%
*-rgt-identity27.6%
distribute-lft-out27.6%
Simplified27.6%
fma-udef27.6%
flip3-+39.6%
metadata-eval39.6%
metadata-eval39.6%
Applied egg-rr39.6%
if 1.4999999999999999e77 < y < 1.31999999999999998e154Initial program 100.0%
Taylor expanded in y around 0 6.7%
unpow26.7%
Simplified6.7%
Taylor expanded in x around 0 40.7%
+-commutative40.7%
unpow240.7%
associate-+l+40.7%
*-commutative40.7%
associate-*l*40.7%
+-commutative40.7%
unpow240.7%
associate-*r*40.7%
*-commutative40.7%
fma-udef40.7%
associate-*r*40.7%
*-commutative40.7%
fma-udef40.7%
*-rgt-identity40.7%
distribute-lft-out40.7%
Simplified40.7%
fma-udef40.7%
flip-+81.5%
metadata-eval81.5%
Applied egg-rr81.5%
Taylor expanded in y around 0 87.5%
if 1.31999999999999998e154 < y Initial program 100.0%
Taylor expanded in y around 0 100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
unpow2100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification83.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 0.16666666666666666 (* y y))))
(if (<= y 440.0)
(* (cos x) (+ 1.0 t_0))
(if (<= y 1.32e+154)
(*
(+ 1.0 (* (* x x) -0.5))
(/ (+ (* 0.027777777777777776 (pow y 4.0)) -1.0) (+ t_0 -1.0)))
(* 0.16666666666666666 (* y (* (cos x) y)))))))
double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= 440.0) {
tmp = cos(x) * (1.0 + t_0);
} else if (y <= 1.32e+154) {
tmp = (1.0 + ((x * x) * -0.5)) * (((0.027777777777777776 * pow(y, 4.0)) + -1.0) / (t_0 + -1.0));
} else {
tmp = 0.16666666666666666 * (y * (cos(x) * y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 0.16666666666666666d0 * (y * y)
if (y <= 440.0d0) then
tmp = cos(x) * (1.0d0 + t_0)
else if (y <= 1.32d+154) then
tmp = (1.0d0 + ((x * x) * (-0.5d0))) * (((0.027777777777777776d0 * (y ** 4.0d0)) + (-1.0d0)) / (t_0 + (-1.0d0)))
else
tmp = 0.16666666666666666d0 * (y * (cos(x) * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= 440.0) {
tmp = Math.cos(x) * (1.0 + t_0);
} else if (y <= 1.32e+154) {
tmp = (1.0 + ((x * x) * -0.5)) * (((0.027777777777777776 * Math.pow(y, 4.0)) + -1.0) / (t_0 + -1.0));
} else {
tmp = 0.16666666666666666 * (y * (Math.cos(x) * y));
}
return tmp;
}
def code(x, y): t_0 = 0.16666666666666666 * (y * y) tmp = 0 if y <= 440.0: tmp = math.cos(x) * (1.0 + t_0) elif y <= 1.32e+154: tmp = (1.0 + ((x * x) * -0.5)) * (((0.027777777777777776 * math.pow(y, 4.0)) + -1.0) / (t_0 + -1.0)) else: tmp = 0.16666666666666666 * (y * (math.cos(x) * y)) return tmp
function code(x, y) t_0 = Float64(0.16666666666666666 * Float64(y * y)) tmp = 0.0 if (y <= 440.0) tmp = Float64(cos(x) * Float64(1.0 + t_0)); elseif (y <= 1.32e+154) tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * -0.5)) * Float64(Float64(Float64(0.027777777777777776 * (y ^ 4.0)) + -1.0) / Float64(t_0 + -1.0))); else tmp = Float64(0.16666666666666666 * Float64(y * Float64(cos(x) * y))); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.16666666666666666 * (y * y); tmp = 0.0; if (y <= 440.0) tmp = cos(x) * (1.0 + t_0); elseif (y <= 1.32e+154) tmp = (1.0 + ((x * x) * -0.5)) * (((0.027777777777777776 * (y ^ 4.0)) + -1.0) / (t_0 + -1.0)); else tmp = 0.16666666666666666 * (y * (cos(x) * y)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 440.0], N[(N[Cos[x], $MachinePrecision] * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.32e+154], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(0.027777777777777776 * N[Power[y, 4.0], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] / N[(t$95$0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(y * N[(N[Cos[x], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq 440:\\
\;\;\;\;\cos x \cdot \left(1 + t_0\right)\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot -0.5\right) \cdot \frac{0.027777777777777776 \cdot {y}^{4} + -1}{t_0 + -1}\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(\cos x \cdot y\right)\right)\\
\end{array}
\end{array}
if y < 440Initial program 100.0%
Taylor expanded in y around 0 84.6%
unpow284.6%
Simplified84.6%
if 440 < y < 1.31999999999999998e154Initial program 100.0%
Taylor expanded in y around 0 5.2%
unpow25.2%
Simplified5.2%
Taylor expanded in x around 0 34.2%
+-commutative34.2%
unpow234.2%
associate-+l+34.2%
*-commutative34.2%
associate-*l*34.2%
+-commutative34.2%
unpow234.2%
associate-*r*34.2%
*-commutative34.2%
fma-udef34.2%
associate-*r*34.2%
*-commutative34.2%
fma-udef34.2%
*-rgt-identity34.2%
distribute-lft-out34.2%
Simplified34.2%
fma-udef34.2%
flip-+54.6%
metadata-eval54.6%
Applied egg-rr54.6%
Taylor expanded in y around 0 57.5%
if 1.31999999999999998e154 < y Initial program 100.0%
Taylor expanded in y around 0 100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
unpow2100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification82.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 0.16666666666666666 (* y y))))
(if (<= y 66.0)
(cos x)
(if (<= y 1.32e+154)
(* (+ 1.0 (* (* x x) -0.5)) (/ (+ (* t_0 t_0) -1.0) (+ t_0 -1.0)))
(* 0.16666666666666666 (* y (* (cos x) y)))))))
double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= 66.0) {
tmp = cos(x);
} else if (y <= 1.32e+154) {
tmp = (1.0 + ((x * x) * -0.5)) * (((t_0 * t_0) + -1.0) / (t_0 + -1.0));
} else {
tmp = 0.16666666666666666 * (y * (cos(x) * y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 0.16666666666666666d0 * (y * y)
if (y <= 66.0d0) then
tmp = cos(x)
else if (y <= 1.32d+154) then
tmp = (1.0d0 + ((x * x) * (-0.5d0))) * (((t_0 * t_0) + (-1.0d0)) / (t_0 + (-1.0d0)))
else
tmp = 0.16666666666666666d0 * (y * (cos(x) * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= 66.0) {
tmp = Math.cos(x);
} else if (y <= 1.32e+154) {
tmp = (1.0 + ((x * x) * -0.5)) * (((t_0 * t_0) + -1.0) / (t_0 + -1.0));
} else {
tmp = 0.16666666666666666 * (y * (Math.cos(x) * y));
}
return tmp;
}
def code(x, y): t_0 = 0.16666666666666666 * (y * y) tmp = 0 if y <= 66.0: tmp = math.cos(x) elif y <= 1.32e+154: tmp = (1.0 + ((x * x) * -0.5)) * (((t_0 * t_0) + -1.0) / (t_0 + -1.0)) else: tmp = 0.16666666666666666 * (y * (math.cos(x) * y)) return tmp
function code(x, y) t_0 = Float64(0.16666666666666666 * Float64(y * y)) tmp = 0.0 if (y <= 66.0) tmp = cos(x); elseif (y <= 1.32e+154) tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * -0.5)) * Float64(Float64(Float64(t_0 * t_0) + -1.0) / Float64(t_0 + -1.0))); else tmp = Float64(0.16666666666666666 * Float64(y * Float64(cos(x) * y))); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.16666666666666666 * (y * y); tmp = 0.0; if (y <= 66.0) tmp = cos(x); elseif (y <= 1.32e+154) tmp = (1.0 + ((x * x) * -0.5)) * (((t_0 * t_0) + -1.0) / (t_0 + -1.0)); else tmp = 0.16666666666666666 * (y * (cos(x) * y)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 66.0], N[Cos[x], $MachinePrecision], If[LessEqual[y, 1.32e+154], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] + -1.0), $MachinePrecision] / N[(t$95$0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(y * N[(N[Cos[x], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq 66:\\
\;\;\;\;\cos x\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot -0.5\right) \cdot \frac{t_0 \cdot t_0 + -1}{t_0 + -1}\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(\cos x \cdot y\right)\right)\\
\end{array}
\end{array}
if y < 66Initial program 100.0%
Taylor expanded in y around 0 65.9%
if 66 < y < 1.31999999999999998e154Initial program 100.0%
Taylor expanded in y around 0 5.2%
unpow25.2%
Simplified5.2%
Taylor expanded in x around 0 34.2%
+-commutative34.2%
unpow234.2%
associate-+l+34.2%
*-commutative34.2%
associate-*l*34.2%
+-commutative34.2%
unpow234.2%
associate-*r*34.2%
*-commutative34.2%
fma-udef34.2%
associate-*r*34.2%
*-commutative34.2%
fma-udef34.2%
*-rgt-identity34.2%
distribute-lft-out34.2%
Simplified34.2%
fma-udef34.2%
flip-+54.6%
metadata-eval54.6%
Applied egg-rr54.6%
if 1.31999999999999998e154 < y Initial program 100.0%
Taylor expanded in y around 0 100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
unpow2100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification68.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 0.16666666666666666 (* y y))))
(if (<= y 370.0)
(* (cos x) (+ 1.0 t_0))
(if (<= y 1.32e+154)
(* (+ 1.0 (* (* x x) -0.5)) (/ (+ (* t_0 t_0) -1.0) (+ t_0 -1.0)))
(* 0.16666666666666666 (* y (* (cos x) y)))))))
double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= 370.0) {
tmp = cos(x) * (1.0 + t_0);
} else if (y <= 1.32e+154) {
tmp = (1.0 + ((x * x) * -0.5)) * (((t_0 * t_0) + -1.0) / (t_0 + -1.0));
} else {
tmp = 0.16666666666666666 * (y * (cos(x) * y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 0.16666666666666666d0 * (y * y)
if (y <= 370.0d0) then
tmp = cos(x) * (1.0d0 + t_0)
else if (y <= 1.32d+154) then
tmp = (1.0d0 + ((x * x) * (-0.5d0))) * (((t_0 * t_0) + (-1.0d0)) / (t_0 + (-1.0d0)))
else
tmp = 0.16666666666666666d0 * (y * (cos(x) * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= 370.0) {
tmp = Math.cos(x) * (1.0 + t_0);
} else if (y <= 1.32e+154) {
tmp = (1.0 + ((x * x) * -0.5)) * (((t_0 * t_0) + -1.0) / (t_0 + -1.0));
} else {
tmp = 0.16666666666666666 * (y * (Math.cos(x) * y));
}
return tmp;
}
def code(x, y): t_0 = 0.16666666666666666 * (y * y) tmp = 0 if y <= 370.0: tmp = math.cos(x) * (1.0 + t_0) elif y <= 1.32e+154: tmp = (1.0 + ((x * x) * -0.5)) * (((t_0 * t_0) + -1.0) / (t_0 + -1.0)) else: tmp = 0.16666666666666666 * (y * (math.cos(x) * y)) return tmp
function code(x, y) t_0 = Float64(0.16666666666666666 * Float64(y * y)) tmp = 0.0 if (y <= 370.0) tmp = Float64(cos(x) * Float64(1.0 + t_0)); elseif (y <= 1.32e+154) tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * -0.5)) * Float64(Float64(Float64(t_0 * t_0) + -1.0) / Float64(t_0 + -1.0))); else tmp = Float64(0.16666666666666666 * Float64(y * Float64(cos(x) * y))); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.16666666666666666 * (y * y); tmp = 0.0; if (y <= 370.0) tmp = cos(x) * (1.0 + t_0); elseif (y <= 1.32e+154) tmp = (1.0 + ((x * x) * -0.5)) * (((t_0 * t_0) + -1.0) / (t_0 + -1.0)); else tmp = 0.16666666666666666 * (y * (cos(x) * y)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 370.0], N[(N[Cos[x], $MachinePrecision] * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.32e+154], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] + -1.0), $MachinePrecision] / N[(t$95$0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(y * N[(N[Cos[x], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq 370:\\
\;\;\;\;\cos x \cdot \left(1 + t_0\right)\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot -0.5\right) \cdot \frac{t_0 \cdot t_0 + -1}{t_0 + -1}\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(\cos x \cdot y\right)\right)\\
\end{array}
\end{array}
if y < 370Initial program 100.0%
Taylor expanded in y around 0 84.6%
unpow284.6%
Simplified84.6%
if 370 < y < 1.31999999999999998e154Initial program 100.0%
Taylor expanded in y around 0 5.2%
unpow25.2%
Simplified5.2%
Taylor expanded in x around 0 34.2%
+-commutative34.2%
unpow234.2%
associate-+l+34.2%
*-commutative34.2%
associate-*l*34.2%
+-commutative34.2%
unpow234.2%
associate-*r*34.2%
*-commutative34.2%
fma-udef34.2%
associate-*r*34.2%
*-commutative34.2%
fma-udef34.2%
*-rgt-identity34.2%
distribute-lft-out34.2%
Simplified34.2%
fma-udef34.2%
flip-+54.6%
metadata-eval54.6%
Applied egg-rr54.6%
if 1.31999999999999998e154 < y Initial program 100.0%
Taylor expanded in y around 0 100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
unpow2100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification82.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 0.16666666666666666 (* y y))))
(if (<= y 66.0)
(cos x)
(if (<= y 1.32e+154)
(* (+ 1.0 (* (* x x) -0.5)) (/ (+ (* t_0 t_0) -1.0) (+ t_0 -1.0)))
(+ 1.0 t_0)))))
double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= 66.0) {
tmp = cos(x);
} else if (y <= 1.32e+154) {
tmp = (1.0 + ((x * x) * -0.5)) * (((t_0 * t_0) + -1.0) / (t_0 + -1.0));
} else {
tmp = 1.0 + t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 0.16666666666666666d0 * (y * y)
if (y <= 66.0d0) then
tmp = cos(x)
else if (y <= 1.32d+154) then
tmp = (1.0d0 + ((x * x) * (-0.5d0))) * (((t_0 * t_0) + (-1.0d0)) / (t_0 + (-1.0d0)))
else
tmp = 1.0d0 + t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= 66.0) {
tmp = Math.cos(x);
} else if (y <= 1.32e+154) {
tmp = (1.0 + ((x * x) * -0.5)) * (((t_0 * t_0) + -1.0) / (t_0 + -1.0));
} else {
tmp = 1.0 + t_0;
}
return tmp;
}
def code(x, y): t_0 = 0.16666666666666666 * (y * y) tmp = 0 if y <= 66.0: tmp = math.cos(x) elif y <= 1.32e+154: tmp = (1.0 + ((x * x) * -0.5)) * (((t_0 * t_0) + -1.0) / (t_0 + -1.0)) else: tmp = 1.0 + t_0 return tmp
function code(x, y) t_0 = Float64(0.16666666666666666 * Float64(y * y)) tmp = 0.0 if (y <= 66.0) tmp = cos(x); elseif (y <= 1.32e+154) tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * -0.5)) * Float64(Float64(Float64(t_0 * t_0) + -1.0) / Float64(t_0 + -1.0))); else tmp = Float64(1.0 + t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.16666666666666666 * (y * y); tmp = 0.0; if (y <= 66.0) tmp = cos(x); elseif (y <= 1.32e+154) tmp = (1.0 + ((x * x) * -0.5)) * (((t_0 * t_0) + -1.0) / (t_0 + -1.0)); else tmp = 1.0 + t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 66.0], N[Cos[x], $MachinePrecision], If[LessEqual[y, 1.32e+154], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] + -1.0), $MachinePrecision] / N[(t$95$0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq 66:\\
\;\;\;\;\cos x\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot -0.5\right) \cdot \frac{t_0 \cdot t_0 + -1}{t_0 + -1}\\
\mathbf{else}:\\
\;\;\;\;1 + t_0\\
\end{array}
\end{array}
if y < 66Initial program 100.0%
Taylor expanded in y around 0 65.9%
if 66 < y < 1.31999999999999998e154Initial program 100.0%
Taylor expanded in y around 0 5.2%
unpow25.2%
Simplified5.2%
Taylor expanded in x around 0 34.2%
+-commutative34.2%
unpow234.2%
associate-+l+34.2%
*-commutative34.2%
associate-*l*34.2%
+-commutative34.2%
unpow234.2%
associate-*r*34.2%
*-commutative34.2%
fma-udef34.2%
associate-*r*34.2%
*-commutative34.2%
fma-udef34.2%
*-rgt-identity34.2%
distribute-lft-out34.2%
Simplified34.2%
fma-udef34.2%
flip-+54.6%
metadata-eval54.6%
Applied egg-rr54.6%
if 1.31999999999999998e154 < y Initial program 100.0%
Taylor expanded in y around 0 100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in x around 0 72.4%
unpow272.4%
Simplified72.4%
Final simplification65.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 0.16666666666666666 (* y y))))
(if (or (<= y 0.21) (not (<= y 1.32e+154)))
(+ 1.0 t_0)
(* (+ 1.0 (* (* x x) -0.5)) (/ (+ (* t_0 t_0) -1.0) (+ t_0 -1.0))))))
double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double tmp;
if ((y <= 0.21) || !(y <= 1.32e+154)) {
tmp = 1.0 + t_0;
} else {
tmp = (1.0 + ((x * x) * -0.5)) * (((t_0 * t_0) + -1.0) / (t_0 + -1.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 0.16666666666666666d0 * (y * y)
if ((y <= 0.21d0) .or. (.not. (y <= 1.32d+154))) then
tmp = 1.0d0 + t_0
else
tmp = (1.0d0 + ((x * x) * (-0.5d0))) * (((t_0 * t_0) + (-1.0d0)) / (t_0 + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double tmp;
if ((y <= 0.21) || !(y <= 1.32e+154)) {
tmp = 1.0 + t_0;
} else {
tmp = (1.0 + ((x * x) * -0.5)) * (((t_0 * t_0) + -1.0) / (t_0 + -1.0));
}
return tmp;
}
def code(x, y): t_0 = 0.16666666666666666 * (y * y) tmp = 0 if (y <= 0.21) or not (y <= 1.32e+154): tmp = 1.0 + t_0 else: tmp = (1.0 + ((x * x) * -0.5)) * (((t_0 * t_0) + -1.0) / (t_0 + -1.0)) return tmp
function code(x, y) t_0 = Float64(0.16666666666666666 * Float64(y * y)) tmp = 0.0 if ((y <= 0.21) || !(y <= 1.32e+154)) tmp = Float64(1.0 + t_0); else tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * -0.5)) * Float64(Float64(Float64(t_0 * t_0) + -1.0) / Float64(t_0 + -1.0))); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.16666666666666666 * (y * y); tmp = 0.0; if ((y <= 0.21) || ~((y <= 1.32e+154))) tmp = 1.0 + t_0; else tmp = (1.0 + ((x * x) * -0.5)) * (((t_0 * t_0) + -1.0) / (t_0 + -1.0)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y, 0.21], N[Not[LessEqual[y, 1.32e+154]], $MachinePrecision]], N[(1.0 + t$95$0), $MachinePrecision], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] + -1.0), $MachinePrecision] / N[(t$95$0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq 0.21 \lor \neg \left(y \leq 1.32 \cdot 10^{+154}\right):\\
\;\;\;\;1 + t_0\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot -0.5\right) \cdot \frac{t_0 \cdot t_0 + -1}{t_0 + -1}\\
\end{array}
\end{array}
if y < 0.209999999999999992 or 1.31999999999999998e154 < y Initial program 100.0%
Taylor expanded in y around 0 86.8%
unpow286.8%
Simplified86.8%
Taylor expanded in x around 0 51.5%
unpow251.5%
Simplified51.5%
if 0.209999999999999992 < y < 1.31999999999999998e154Initial program 100.0%
Taylor expanded in y around 0 6.1%
unpow26.1%
Simplified6.1%
Taylor expanded in x around 0 33.3%
+-commutative33.3%
unpow233.3%
associate-+l+33.3%
*-commutative33.3%
associate-*l*33.3%
+-commutative33.3%
unpow233.3%
associate-*r*33.3%
*-commutative33.3%
fma-udef33.3%
associate-*r*33.3%
*-commutative33.3%
fma-udef33.3%
*-rgt-identity33.3%
distribute-lft-out33.3%
Simplified33.3%
fma-udef33.3%
flip-+53.1%
metadata-eval53.1%
Applied egg-rr53.1%
Final simplification51.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 0.16666666666666666 (* y y))) (t_1 (+ 1.0 t_0)))
(if (<= y 0.62)
t_1
(if (<= y 2e+221) (* t_1 (+ 1.0 (* (* x x) -0.5))) t_0))))
double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double t_1 = 1.0 + t_0;
double tmp;
if (y <= 0.62) {
tmp = t_1;
} else if (y <= 2e+221) {
tmp = t_1 * (1.0 + ((x * x) * -0.5));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 0.16666666666666666d0 * (y * y)
t_1 = 1.0d0 + t_0
if (y <= 0.62d0) then
tmp = t_1
else if (y <= 2d+221) then
tmp = t_1 * (1.0d0 + ((x * x) * (-0.5d0)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double t_1 = 1.0 + t_0;
double tmp;
if (y <= 0.62) {
tmp = t_1;
} else if (y <= 2e+221) {
tmp = t_1 * (1.0 + ((x * x) * -0.5));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = 0.16666666666666666 * (y * y) t_1 = 1.0 + t_0 tmp = 0 if y <= 0.62: tmp = t_1 elif y <= 2e+221: tmp = t_1 * (1.0 + ((x * x) * -0.5)) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(0.16666666666666666 * Float64(y * y)) t_1 = Float64(1.0 + t_0) tmp = 0.0 if (y <= 0.62) tmp = t_1; elseif (y <= 2e+221) tmp = Float64(t_1 * Float64(1.0 + Float64(Float64(x * x) * -0.5))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = 0.16666666666666666 * (y * y); t_1 = 1.0 + t_0; tmp = 0.0; if (y <= 0.62) tmp = t_1; elseif (y <= 2e+221) tmp = t_1 * (1.0 + ((x * x) * -0.5)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + t$95$0), $MachinePrecision]}, If[LessEqual[y, 0.62], t$95$1, If[LessEqual[y, 2e+221], N[(t$95$1 * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
t_1 := 1 + t_0\\
\mathbf{if}\;y \leq 0.62:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+221}:\\
\;\;\;\;t_1 \cdot \left(1 + \left(x \cdot x\right) \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y < 0.619999999999999996Initial program 100.0%
Taylor expanded in y around 0 84.8%
unpow284.8%
Simplified84.8%
Taylor expanded in x around 0 48.3%
unpow248.3%
Simplified48.3%
if 0.619999999999999996 < y < 2.0000000000000001e221Initial program 100.0%
Taylor expanded in y around 0 34.0%
unpow234.0%
Simplified34.0%
Taylor expanded in x around 0 23.4%
+-commutative23.4%
unpow223.4%
associate-+l+23.4%
*-commutative23.4%
associate-*l*23.4%
+-commutative23.4%
unpow223.4%
associate-*r*23.4%
*-commutative23.4%
fma-udef23.4%
associate-*r*23.4%
*-commutative23.4%
fma-udef23.4%
*-rgt-identity23.4%
distribute-lft-out44.7%
Simplified44.7%
fma-udef44.7%
Applied egg-rr44.7%
if 2.0000000000000001e221 < y Initial program 100.0%
Taylor expanded in y around 0 100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
unpow2100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in x around 0 73.3%
unpow273.3%
Simplified73.3%
Final simplification49.1%
(FPCore (x y) :precision binary64 (if (<= y 0.62) 1.0 (* 0.16666666666666666 (* y y))))
double code(double x, double y) {
double tmp;
if (y <= 0.62) {
tmp = 1.0;
} else {
tmp = 0.16666666666666666 * (y * y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 0.62d0) then
tmp = 1.0d0
else
tmp = 0.16666666666666666d0 * (y * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 0.62) {
tmp = 1.0;
} else {
tmp = 0.16666666666666666 * (y * y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 0.62: tmp = 1.0 else: tmp = 0.16666666666666666 * (y * y) return tmp
function code(x, y) tmp = 0.0 if (y <= 0.62) tmp = 1.0; else tmp = Float64(0.16666666666666666 * Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 0.62) tmp = 1.0; else tmp = 0.16666666666666666 * (y * y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 0.62], 1.0, N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.62:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot y\right)\\
\end{array}
\end{array}
if y < 0.619999999999999996Initial program 100.0%
associate-*r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 66.0%
Taylor expanded in x around 0 33.9%
if 0.619999999999999996 < y Initial program 100.0%
Taylor expanded in y around 0 50.0%
unpow250.0%
Simplified50.0%
Taylor expanded in y around inf 49.7%
unpow249.7%
*-commutative49.7%
associate-*l*49.7%
Simplified49.7%
Taylor expanded in x around 0 35.6%
unpow235.6%
Simplified35.6%
Final simplification34.3%
(FPCore (x y) :precision binary64 (+ 1.0 (* 0.16666666666666666 (* y y))))
double code(double x, double y) {
return 1.0 + (0.16666666666666666 * (y * y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + (0.16666666666666666d0 * (y * y))
end function
public static double code(double x, double y) {
return 1.0 + (0.16666666666666666 * (y * y));
}
def code(x, y): return 1.0 + (0.16666666666666666 * (y * y))
function code(x, y) return Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y))) end
function tmp = code(x, y) tmp = 1.0 + (0.16666666666666666 * (y * y)); end
code[x_, y_] := N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + 0.16666666666666666 \cdot \left(y \cdot y\right)
\end{array}
Initial program 100.0%
Taylor expanded in y around 0 76.4%
unpow276.4%
Simplified76.4%
Taylor expanded in x around 0 45.3%
unpow245.3%
Simplified45.3%
Final simplification45.3%
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 100.0%
associate-*r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 50.9%
Taylor expanded in x around 0 26.3%
Final simplification26.3%
herbie shell --seed 2023200
(FPCore (x y)
:name "Linear.Quaternion:$csin from linear-1.19.1.3"
:precision binary64
(* (cos x) (/ (sinh y) y)))