
(FPCore (x y) :precision binary64 (* (cosh x) (/ (sin y) y)))
double code(double x, double y) {
return cosh(x) * (sin(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cosh(x) * (sin(y) / y)
end function
public static double code(double x, double y) {
return Math.cosh(x) * (Math.sin(y) / y);
}
def code(x, y): return math.cosh(x) * (math.sin(y) / y)
function code(x, y) return Float64(cosh(x) * Float64(sin(y) / y)) end
function tmp = code(x, y) tmp = cosh(x) * (sin(y) / y); end
code[x_, y_] := N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cosh x \cdot \frac{\sin y}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (* (cosh x) (/ (sin y) y)))
double code(double x, double y) {
return cosh(x) * (sin(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cosh(x) * (sin(y) / y)
end function
public static double code(double x, double y) {
return Math.cosh(x) * (Math.sin(y) / y);
}
def code(x, y): return math.cosh(x) * (math.sin(y) / y)
function code(x, y) return Float64(cosh(x) * Float64(sin(y) / y)) end
function tmp = code(x, y) tmp = cosh(x) * (sin(y) / y); end
code[x_, y_] := N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cosh x \cdot \frac{\sin y}{y}
\end{array}
(FPCore (x y) :precision binary64 (/ (sin y) (/ y (cosh x))))
double code(double x, double y) {
return sin(y) / (y / cosh(x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(y) / (y / cosh(x))
end function
public static double code(double x, double y) {
return Math.sin(y) / (y / Math.cosh(x));
}
def code(x, y): return math.sin(y) / (y / math.cosh(x))
function code(x, y) return Float64(sin(y) / Float64(y / cosh(x))) end
function tmp = code(x, y) tmp = sin(y) / (y / cosh(x)); end
code[x_, y_] := N[(N[Sin[y], $MachinePrecision] / N[(y / N[Cosh[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin y}{\frac{y}{\cosh x}}
\end{array}
Initial program 99.9%
*-commutative99.9%
associate-/r/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y) :precision binary64 (* (cosh x) (/ (sin y) y)))
double code(double x, double y) {
return cosh(x) * (sin(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cosh(x) * (sin(y) / y)
end function
public static double code(double x, double y) {
return Math.cosh(x) * (Math.sin(y) / y);
}
def code(x, y): return math.cosh(x) * (math.sin(y) / y)
function code(x, y) return Float64(cosh(x) * Float64(sin(y) / y)) end
function tmp = code(x, y) tmp = cosh(x) * (sin(y) / y); end
code[x_, y_] := N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cosh x \cdot \frac{\sin y}{y}
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y)
:precision binary64
(if (<= x 1.3)
(/ (sin y) (+ y (* y (* -0.5 (* x x)))))
(if (<= x 1.05e+170)
(* (/ (sin y) (* y y)) (+ y (* 0.5 (* y (* x x)))))
(+ 1.0 (* (* x x) 0.5)))))
double code(double x, double y) {
double tmp;
if (x <= 1.3) {
tmp = sin(y) / (y + (y * (-0.5 * (x * x))));
} else if (x <= 1.05e+170) {
tmp = (sin(y) / (y * y)) * (y + (0.5 * (y * (x * x))));
} else {
tmp = 1.0 + ((x * x) * 0.5);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 1.3d0) then
tmp = sin(y) / (y + (y * ((-0.5d0) * (x * x))))
else if (x <= 1.05d+170) then
tmp = (sin(y) / (y * y)) * (y + (0.5d0 * (y * (x * x))))
else
tmp = 1.0d0 + ((x * x) * 0.5d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.3) {
tmp = Math.sin(y) / (y + (y * (-0.5 * (x * x))));
} else if (x <= 1.05e+170) {
tmp = (Math.sin(y) / (y * y)) * (y + (0.5 * (y * (x * x))));
} else {
tmp = 1.0 + ((x * x) * 0.5);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.3: tmp = math.sin(y) / (y + (y * (-0.5 * (x * x)))) elif x <= 1.05e+170: tmp = (math.sin(y) / (y * y)) * (y + (0.5 * (y * (x * x)))) else: tmp = 1.0 + ((x * x) * 0.5) return tmp
function code(x, y) tmp = 0.0 if (x <= 1.3) tmp = Float64(sin(y) / Float64(y + Float64(y * Float64(-0.5 * Float64(x * x))))); elseif (x <= 1.05e+170) tmp = Float64(Float64(sin(y) / Float64(y * y)) * Float64(y + Float64(0.5 * Float64(y * Float64(x * x))))); else tmp = Float64(1.0 + Float64(Float64(x * x) * 0.5)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.3) tmp = sin(y) / (y + (y * (-0.5 * (x * x)))); elseif (x <= 1.05e+170) tmp = (sin(y) / (y * y)) * (y + (0.5 * (y * (x * x)))); else tmp = 1.0 + ((x * x) * 0.5); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.3], N[(N[Sin[y], $MachinePrecision] / N[(y + N[(y * N[(-0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e+170], N[(N[(N[Sin[y], $MachinePrecision] / N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(y + N[(0.5 * N[(y * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.3:\\
\;\;\;\;\frac{\sin y}{y + y \cdot \left(-0.5 \cdot \left(x \cdot x\right)\right)}\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{+170}:\\
\;\;\;\;\frac{\sin y}{y \cdot y} \cdot \left(y + 0.5 \cdot \left(y \cdot \left(x \cdot x\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot 0.5\\
\end{array}
\end{array}
if x < 1.30000000000000004Initial program 99.9%
*-commutative99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around 0 67.2%
associate-*r*67.2%
unpow267.2%
Simplified67.2%
if 1.30000000000000004 < x < 1.04999999999999999e170Initial program 100.0%
*-commutative100.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in x around 0 1.2%
associate-*r*1.2%
unpow21.2%
Simplified1.2%
flip-+3.9%
associate-/r/3.9%
*-commutative3.9%
*-commutative3.9%
swap-sqr16.7%
swap-sqr16.7%
metadata-eval16.7%
pow216.7%
pow216.7%
pow-prod-up16.7%
metadata-eval16.7%
Applied egg-rr16.7%
associate-*l*4.0%
distribute-lft-out--0.9%
*-commutative0.9%
associate-*r*0.9%
*-commutative0.9%
associate-*r*0.9%
unpow20.9%
*-commutative0.9%
associate-*r*0.9%
cancel-sign-sub-inv0.9%
metadata-eval0.9%
*-commutative0.9%
unpow20.9%
Simplified0.9%
Taylor expanded in x around 0 34.4%
unpow234.4%
Simplified34.4%
if 1.04999999999999999e170 < x Initial program 100.0%
*-commutative100.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in x around 0 1.6%
associate-*r*1.6%
unpow21.6%
Simplified1.6%
Taylor expanded in y around 0 1.6%
+-commutative1.6%
unpow21.6%
associate-*r*1.6%
*-commutative1.6%
fma-udef1.6%
Simplified1.6%
Taylor expanded in x around 0 78.6%
unpow278.6%
Simplified78.6%
Final simplification64.5%
(FPCore (x y)
:precision binary64
(if (<= x 6200.0)
(/ (sin y) (+ y (* y (* -0.5 (* x x)))))
(if (<= x 6.9e+131)
(+ 1.0 (* (* y y) (fabs -0.16666666666666666)))
(+ 1.0 (* (* x x) 0.5)))))
double code(double x, double y) {
double tmp;
if (x <= 6200.0) {
tmp = sin(y) / (y + (y * (-0.5 * (x * x))));
} else if (x <= 6.9e+131) {
tmp = 1.0 + ((y * y) * fabs(-0.16666666666666666));
} else {
tmp = 1.0 + ((x * x) * 0.5);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 6200.0d0) then
tmp = sin(y) / (y + (y * ((-0.5d0) * (x * x))))
else if (x <= 6.9d+131) then
tmp = 1.0d0 + ((y * y) * abs((-0.16666666666666666d0)))
else
tmp = 1.0d0 + ((x * x) * 0.5d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 6200.0) {
tmp = Math.sin(y) / (y + (y * (-0.5 * (x * x))));
} else if (x <= 6.9e+131) {
tmp = 1.0 + ((y * y) * Math.abs(-0.16666666666666666));
} else {
tmp = 1.0 + ((x * x) * 0.5);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 6200.0: tmp = math.sin(y) / (y + (y * (-0.5 * (x * x)))) elif x <= 6.9e+131: tmp = 1.0 + ((y * y) * math.fabs(-0.16666666666666666)) else: tmp = 1.0 + ((x * x) * 0.5) return tmp
function code(x, y) tmp = 0.0 if (x <= 6200.0) tmp = Float64(sin(y) / Float64(y + Float64(y * Float64(-0.5 * Float64(x * x))))); elseif (x <= 6.9e+131) tmp = Float64(1.0 + Float64(Float64(y * y) * abs(-0.16666666666666666))); else tmp = Float64(1.0 + Float64(Float64(x * x) * 0.5)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 6200.0) tmp = sin(y) / (y + (y * (-0.5 * (x * x)))); elseif (x <= 6.9e+131) tmp = 1.0 + ((y * y) * abs(-0.16666666666666666)); else tmp = 1.0 + ((x * x) * 0.5); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 6200.0], N[(N[Sin[y], $MachinePrecision] / N[(y + N[(y * N[(-0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.9e+131], N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[Abs[-0.16666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 6200:\\
\;\;\;\;\frac{\sin y}{y + y \cdot \left(-0.5 \cdot \left(x \cdot x\right)\right)}\\
\mathbf{elif}\;x \leq 6.9 \cdot 10^{+131}:\\
\;\;\;\;1 + \left(y \cdot y\right) \cdot \left|-0.16666666666666666\right|\\
\mathbf{else}:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot 0.5\\
\end{array}
\end{array}
if x < 6200Initial program 99.9%
*-commutative99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around 0 66.9%
associate-*r*66.9%
unpow266.9%
Simplified66.9%
if 6200 < x < 6.9000000000000001e131Initial program 100.0%
*-commutative100.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in x around 0 2.8%
Taylor expanded in y around 0 9.9%
*-commutative9.9%
unpow29.9%
Simplified9.9%
Taylor expanded in y around 0 9.9%
*-commutative9.9%
unpow29.9%
associate-*r*9.9%
Simplified9.9%
add-sqr-sqrt0.8%
sqrt-unprod21.3%
pow221.3%
associate-*r*21.3%
Applied egg-rr21.3%
unpow221.3%
rem-sqrt-square14.1%
unpow214.1%
*-commutative14.1%
unpow214.1%
Simplified14.1%
if 6.9000000000000001e131 < x Initial program 100.0%
*-commutative100.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in x around 0 1.6%
associate-*r*1.6%
unpow21.6%
Simplified1.6%
Taylor expanded in y around 0 1.6%
+-commutative1.6%
unpow21.6%
associate-*r*1.6%
*-commutative1.6%
fma-udef1.6%
Simplified1.6%
Taylor expanded in x around 0 81.3%
unpow281.3%
Simplified81.3%
Final simplification63.3%
(FPCore (x y)
:precision binary64
(if (<= x 6400.0)
(/ (sin y) y)
(if (<= x 2.4e+133)
(+ 1.0 (* (* y y) (fabs -0.16666666666666666)))
(+ 1.0 (* (* x x) 0.5)))))
double code(double x, double y) {
double tmp;
if (x <= 6400.0) {
tmp = sin(y) / y;
} else if (x <= 2.4e+133) {
tmp = 1.0 + ((y * y) * fabs(-0.16666666666666666));
} else {
tmp = 1.0 + ((x * x) * 0.5);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 6400.0d0) then
tmp = sin(y) / y
else if (x <= 2.4d+133) then
tmp = 1.0d0 + ((y * y) * abs((-0.16666666666666666d0)))
else
tmp = 1.0d0 + ((x * x) * 0.5d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 6400.0) {
tmp = Math.sin(y) / y;
} else if (x <= 2.4e+133) {
tmp = 1.0 + ((y * y) * Math.abs(-0.16666666666666666));
} else {
tmp = 1.0 + ((x * x) * 0.5);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 6400.0: tmp = math.sin(y) / y elif x <= 2.4e+133: tmp = 1.0 + ((y * y) * math.fabs(-0.16666666666666666)) else: tmp = 1.0 + ((x * x) * 0.5) return tmp
function code(x, y) tmp = 0.0 if (x <= 6400.0) tmp = Float64(sin(y) / y); elseif (x <= 2.4e+133) tmp = Float64(1.0 + Float64(Float64(y * y) * abs(-0.16666666666666666))); else tmp = Float64(1.0 + Float64(Float64(x * x) * 0.5)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 6400.0) tmp = sin(y) / y; elseif (x <= 2.4e+133) tmp = 1.0 + ((y * y) * abs(-0.16666666666666666)); else tmp = 1.0 + ((x * x) * 0.5); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 6400.0], N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision], If[LessEqual[x, 2.4e+133], N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[Abs[-0.16666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 6400:\\
\;\;\;\;\frac{\sin y}{y}\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{+133}:\\
\;\;\;\;1 + \left(y \cdot y\right) \cdot \left|-0.16666666666666666\right|\\
\mathbf{else}:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot 0.5\\
\end{array}
\end{array}
if x < 6400Initial program 99.9%
*-commutative99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around 0 67.2%
if 6400 < x < 2.3999999999999999e133Initial program 100.0%
*-commutative100.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in x around 0 2.8%
Taylor expanded in y around 0 9.9%
*-commutative9.9%
unpow29.9%
Simplified9.9%
Taylor expanded in y around 0 9.9%
*-commutative9.9%
unpow29.9%
associate-*r*9.9%
Simplified9.9%
add-sqr-sqrt0.8%
sqrt-unprod21.3%
pow221.3%
associate-*r*21.3%
Applied egg-rr21.3%
unpow221.3%
rem-sqrt-square14.1%
unpow214.1%
*-commutative14.1%
unpow214.1%
Simplified14.1%
if 2.3999999999999999e133 < x Initial program 100.0%
*-commutative100.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in x around 0 1.6%
associate-*r*1.6%
unpow21.6%
Simplified1.6%
Taylor expanded in y around 0 1.6%
+-commutative1.6%
unpow21.6%
associate-*r*1.6%
*-commutative1.6%
fma-udef1.6%
Simplified1.6%
Taylor expanded in x around 0 81.3%
unpow281.3%
Simplified81.3%
Final simplification63.5%
(FPCore (x y) :precision binary64 (if (<= x 1.2e-12) (/ (sin y) y) (+ 1.0 (* (* x x) 0.5))))
double code(double x, double y) {
double tmp;
if (x <= 1.2e-12) {
tmp = sin(y) / y;
} else {
tmp = 1.0 + ((x * x) * 0.5);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 1.2d-12) then
tmp = sin(y) / y
else
tmp = 1.0d0 + ((x * x) * 0.5d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.2e-12) {
tmp = Math.sin(y) / y;
} else {
tmp = 1.0 + ((x * x) * 0.5);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.2e-12: tmp = math.sin(y) / y else: tmp = 1.0 + ((x * x) * 0.5) return tmp
function code(x, y) tmp = 0.0 if (x <= 1.2e-12) tmp = Float64(sin(y) / y); else tmp = Float64(1.0 + Float64(Float64(x * x) * 0.5)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.2e-12) tmp = sin(y) / y; else tmp = 1.0 + ((x * x) * 0.5); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.2e-12], N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision], N[(1.0 + N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.2 \cdot 10^{-12}:\\
\;\;\;\;\frac{\sin y}{y}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot 0.5\\
\end{array}
\end{array}
if x < 1.19999999999999994e-12Initial program 99.9%
*-commutative99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around 0 67.5%
if 1.19999999999999994e-12 < x Initial program 100.0%
*-commutative100.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in x around 0 4.1%
associate-*r*4.1%
unpow24.1%
Simplified4.1%
Taylor expanded in y around 0 4.2%
+-commutative4.2%
unpow24.2%
associate-*r*4.2%
*-commutative4.2%
fma-udef4.2%
Simplified4.2%
Taylor expanded in x around 0 47.2%
unpow247.2%
Simplified47.2%
Final simplification62.6%
(FPCore (x y) :precision binary64 (+ 1.0 (* (* x x) 0.5)))
double code(double x, double y) {
return 1.0 + ((x * x) * 0.5);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((x * x) * 0.5d0)
end function
public static double code(double x, double y) {
return 1.0 + ((x * x) * 0.5);
}
def code(x, y): return 1.0 + ((x * x) * 0.5)
function code(x, y) return Float64(1.0 + Float64(Float64(x * x) * 0.5)) end
function tmp = code(x, y) tmp = 1.0 + ((x * x) * 0.5); end
code[x_, y_] := N[(1.0 + N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \left(x \cdot x\right) \cdot 0.5
\end{array}
Initial program 99.9%
*-commutative99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around 0 52.0%
associate-*r*52.0%
unpow252.0%
Simplified52.0%
Taylor expanded in y around 0 27.5%
+-commutative27.5%
unpow227.5%
associate-*r*27.5%
*-commutative27.5%
fma-udef27.5%
Simplified27.5%
Taylor expanded in x around 0 47.6%
unpow247.6%
Simplified47.6%
Final simplification47.6%
(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 99.9%
*-commutative99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around 0 52.6%
Taylor expanded in y around 0 27.9%
Final simplification27.9%
(FPCore (x y) :precision binary64 (/ (* (cosh x) (sin y)) y))
double code(double x, double y) {
return (cosh(x) * sin(y)) / y;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (cosh(x) * sin(y)) / y
end function
public static double code(double x, double y) {
return (Math.cosh(x) * Math.sin(y)) / y;
}
def code(x, y): return (math.cosh(x) * math.sin(y)) / y
function code(x, y) return Float64(Float64(cosh(x) * sin(y)) / y) end
function tmp = code(x, y) tmp = (cosh(x) * sin(y)) / y; end
code[x_, y_] := N[(N[(N[Cosh[x], $MachinePrecision] * N[Sin[y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{\cosh x \cdot \sin y}{y}
\end{array}
herbie shell --seed 2023279
(FPCore (x y)
:name "Linear.Quaternion:$csinh from linear-1.19.1.3"
:precision binary64
:herbie-target
(/ (* (cosh x) (sin y)) y)
(* (cosh x) (/ (sin y) y)))