Average Error: 14.0 → 0.1
Time: 4.8s
Precision: binary64
\[\frac{\sin x \cdot \sinh y}{x} \]
\[\frac{\sin x}{x} \cdot \sinh y \]
(FPCore (x y) :precision binary64 (/ (* (sin x) (sinh y)) x))
(FPCore (x y) :precision binary64 (* (/ (sin x) x) (sinh y)))
double code(double x, double y) {
	return (sin(x) * sinh(y)) / x;
}
double code(double x, double y) {
	return (sin(x) / x) * sinh(y);
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (sin(x) * sinh(y)) / x
end function
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (sin(x) / x) * sinh(y)
end function
public static double code(double x, double y) {
	return (Math.sin(x) * Math.sinh(y)) / x;
}
public static double code(double x, double y) {
	return (Math.sin(x) / x) * Math.sinh(y);
}
def code(x, y):
	return (math.sin(x) * math.sinh(y)) / x
def code(x, y):
	return (math.sin(x) / x) * math.sinh(y)
function code(x, y)
	return Float64(Float64(sin(x) * sinh(y)) / x)
end
function code(x, y)
	return Float64(Float64(sin(x) / x) * sinh(y))
end
function tmp = code(x, y)
	tmp = (sin(x) * sinh(y)) / x;
end
function tmp = code(x, y)
	tmp = (sin(x) / x) * sinh(y);
end
code[x_, y_] := N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
code[x_, y_] := N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision]
\frac{\sin x \cdot \sinh y}{x}
\frac{\sin x}{x} \cdot \sinh y

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original14.0
Target0.3
Herbie0.1
\[\sin x \cdot \frac{\sinh y}{x} \]

Derivation

  1. Initial program 14.0

    \[\frac{\sin x \cdot \sinh y}{x} \]
  2. Taylor expanded in x around inf 43.3

    \[\leadsto \color{blue}{\frac{0.5 \cdot \left(\sin x \cdot e^{y}\right) - 0.5 \cdot \frac{\sin x}{e^{y}}}{x}} \]
  3. Simplified0.3

    \[\leadsto \color{blue}{\frac{\sinh y}{x} \cdot \sin x} \]
  4. Applied div-inv_binary640.4

    \[\leadsto \color{blue}{\left(\sinh y \cdot \frac{1}{x}\right)} \cdot \sin x \]
  5. Applied associate-*l*_binary640.2

    \[\leadsto \color{blue}{\sinh y \cdot \left(\frac{1}{x} \cdot \sin x\right)} \]
  6. Simplified0.1

    \[\leadsto \sinh y \cdot \color{blue}{\frac{\sin x}{x}} \]
  7. Applied *-commutative_binary640.1

    \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
  8. Final simplification0.1

    \[\leadsto \frac{\sin x}{x} \cdot \sinh y \]

Reproduce

herbie shell --seed 2022131 
(FPCore (x y)
  :name "Linear.Quaternion:$ccosh from linear-1.19.1.3"
  :precision binary64

  :herbie-target
  (* (sin x) (/ (sinh y) x))

  (/ (* (sin x) (sinh y)) x))