?

Average Error: 0.1 → 0.7
Time: 21.1s
Precision: binary64
Cost: 46720

?

\[\cosh x \cdot \frac{\sin y}{y} \]
\[\begin{array}{l} t_0 := \frac{\sin y}{y}\\ t_0 + \left(0.5 \cdot \left({x}^{2} \cdot t_0\right) + \left(0.041666666666666664 \cdot \left({x}^{4} \cdot t_0\right) + 0.001388888888888889 \cdot \left({x}^{6} \cdot t_0\right)\right)\right) \end{array} \]
(FPCore (x y) :precision binary64 (* (cosh x) (/ (sin y) y)))
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ (sin y) y)))
   (+
    t_0
    (+
     (* 0.5 (* (pow x 2.0) t_0))
     (+
      (* 0.041666666666666664 (* (pow x 4.0) t_0))
      (* 0.001388888888888889 (* (pow x 6.0) t_0)))))))
double code(double x, double y) {
	return cosh(x) * (sin(y) / y);
}
double code(double x, double y) {
	double t_0 = sin(y) / y;
	return t_0 + ((0.5 * (pow(x, 2.0) * t_0)) + ((0.041666666666666664 * (pow(x, 4.0) * t_0)) + (0.001388888888888889 * (pow(x, 6.0) * t_0))));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = cosh(x) * (sin(y) / y)
end function
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    t_0 = sin(y) / y
    code = t_0 + ((0.5d0 * ((x ** 2.0d0) * t_0)) + ((0.041666666666666664d0 * ((x ** 4.0d0) * t_0)) + (0.001388888888888889d0 * ((x ** 6.0d0) * t_0))))
end function
public static double code(double x, double y) {
	return Math.cosh(x) * (Math.sin(y) / y);
}
public static double code(double x, double y) {
	double t_0 = Math.sin(y) / y;
	return t_0 + ((0.5 * (Math.pow(x, 2.0) * t_0)) + ((0.041666666666666664 * (Math.pow(x, 4.0) * t_0)) + (0.001388888888888889 * (Math.pow(x, 6.0) * t_0))));
}
def code(x, y):
	return math.cosh(x) * (math.sin(y) / y)
def code(x, y):
	t_0 = math.sin(y) / y
	return t_0 + ((0.5 * (math.pow(x, 2.0) * t_0)) + ((0.041666666666666664 * (math.pow(x, 4.0) * t_0)) + (0.001388888888888889 * (math.pow(x, 6.0) * t_0))))
function code(x, y)
	return Float64(cosh(x) * Float64(sin(y) / y))
end
function code(x, y)
	t_0 = Float64(sin(y) / y)
	return Float64(t_0 + Float64(Float64(0.5 * Float64((x ^ 2.0) * t_0)) + Float64(Float64(0.041666666666666664 * Float64((x ^ 4.0) * t_0)) + Float64(0.001388888888888889 * Float64((x ^ 6.0) * t_0)))))
end
function tmp = code(x, y)
	tmp = cosh(x) * (sin(y) / y);
end
function tmp = code(x, y)
	t_0 = sin(y) / y;
	tmp = t_0 + ((0.5 * ((x ^ 2.0) * t_0)) + ((0.041666666666666664 * ((x ^ 4.0) * t_0)) + (0.001388888888888889 * ((x ^ 6.0) * t_0))));
end
code[x_, y_] := N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := Block[{t$95$0 = N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]}, N[(t$95$0 + N[(N[(0.5 * N[(N[Power[x, 2.0], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.041666666666666664 * N[(N[Power[x, 4.0], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(0.001388888888888889 * N[(N[Power[x, 6.0], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\cosh x \cdot \frac{\sin y}{y}
\begin{array}{l}
t_0 := \frac{\sin y}{y}\\
t_0 + \left(0.5 \cdot \left({x}^{2} \cdot t_0\right) + \left(0.041666666666666664 \cdot \left({x}^{4} \cdot t_0\right) + 0.001388888888888889 \cdot \left({x}^{6} \cdot t_0\right)\right)\right)
\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.1
Target0.1
Herbie0.7
\[\frac{\cosh x \cdot \sin y}{y} \]

Derivation?

  1. Initial program 0.1

    \[\cosh x \cdot \frac{\sin y}{y} \]
  2. Taylor expanded in x around 0 0.7

    \[\leadsto \color{blue}{\frac{\sin y}{y} + \left(0.5 \cdot \frac{\sin y \cdot {x}^{2}}{y} + \left(0.041666666666666664 \cdot \frac{\sin y \cdot {x}^{4}}{y} + 0.001388888888888889 \cdot \frac{\sin y \cdot {x}^{6}}{y}\right)\right)} \]
  3. Simplified0.7

    \[\leadsto \color{blue}{\frac{\sin y}{y} + \left(0.5 \cdot \left({x}^{2} \cdot \frac{\sin y}{y}\right) + \left(0.041666666666666664 \cdot \left({x}^{4} \cdot \frac{\sin y}{y}\right) + 0.001388888888888889 \cdot \left({x}^{6} \cdot \frac{\sin y}{y}\right)\right)\right)} \]
    Proof

    [Start]0.7

    \[ \frac{\sin y}{y} + \left(0.5 \cdot \frac{\sin y \cdot {x}^{2}}{y} + \left(0.041666666666666664 \cdot \frac{\sin y \cdot {x}^{4}}{y} + 0.001388888888888889 \cdot \frac{\sin y \cdot {x}^{6}}{y}\right)\right) \]

    rational.json-simplify-49 [=>]0.7

    \[ \frac{\sin y}{y} + \left(0.5 \cdot \color{blue}{\left({x}^{2} \cdot \frac{\sin y}{y}\right)} + \left(0.041666666666666664 \cdot \frac{\sin y \cdot {x}^{4}}{y} + 0.001388888888888889 \cdot \frac{\sin y \cdot {x}^{6}}{y}\right)\right) \]

    rational.json-simplify-49 [=>]0.7

    \[ \frac{\sin y}{y} + \left(0.5 \cdot \left({x}^{2} \cdot \frac{\sin y}{y}\right) + \left(0.041666666666666664 \cdot \color{blue}{\left({x}^{4} \cdot \frac{\sin y}{y}\right)} + 0.001388888888888889 \cdot \frac{\sin y \cdot {x}^{6}}{y}\right)\right) \]

    rational.json-simplify-49 [=>]0.7

    \[ \frac{\sin y}{y} + \left(0.5 \cdot \left({x}^{2} \cdot \frac{\sin y}{y}\right) + \left(0.041666666666666664 \cdot \left({x}^{4} \cdot \frac{\sin y}{y}\right) + 0.001388888888888889 \cdot \color{blue}{\left({x}^{6} \cdot \frac{\sin y}{y}\right)}\right)\right) \]
  4. Final simplification0.7

    \[\leadsto \frac{\sin y}{y} + \left(0.5 \cdot \left({x}^{2} \cdot \frac{\sin y}{y}\right) + \left(0.041666666666666664 \cdot \left({x}^{4} \cdot \frac{\sin y}{y}\right) + 0.001388888888888889 \cdot \left({x}^{6} \cdot \frac{\sin y}{y}\right)\right)\right) \]

Alternatives

Alternative 1
Error0.1
Cost13120
\[\cosh x \cdot \frac{\sin y}{y} \]
Alternative 2
Error31.5
Cost6592
\[\cosh x \cdot 1 \]
Alternative 3
Error1.4
Cost6592
\[\frac{\sin y}{y} \]
Alternative 4
Error32.1
Cost64
\[1 \]

Error

Reproduce?

herbie shell --seed 2023075 
(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)))