?

Average Error: 0.02% → 0.06%
Time: 6.0s
Precision: binary64
Cost: 13376

?

\[\cos x \cdot \frac{\sinh y}{y} \]
\[\cos x \cdot \frac{\frac{1}{y}}{\frac{1}{\sinh y}} \]
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y)))
(FPCore (x y) :precision binary64 (* (cos x) (/ (/ 1.0 y) (/ 1.0 (sinh y)))))
double code(double x, double y) {
	return cos(x) * (sinh(y) / y);
}
double code(double x, double y) {
	return cos(x) * ((1.0 / y) / (1.0 / sinh(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
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = cos(x) * ((1.0d0 / y) / (1.0d0 / sinh(y)))
end function
public static double code(double x, double y) {
	return Math.cos(x) * (Math.sinh(y) / y);
}
public static double code(double x, double y) {
	return Math.cos(x) * ((1.0 / y) / (1.0 / Math.sinh(y)));
}
def code(x, y):
	return math.cos(x) * (math.sinh(y) / y)
def code(x, y):
	return math.cos(x) * ((1.0 / y) / (1.0 / math.sinh(y)))
function code(x, y)
	return Float64(cos(x) * Float64(sinh(y) / y))
end
function code(x, y)
	return Float64(cos(x) * Float64(Float64(1.0 / y) / Float64(1.0 / sinh(y))))
end
function tmp = code(x, y)
	tmp = cos(x) * (sinh(y) / y);
end
function tmp = code(x, y)
	tmp = cos(x) * ((1.0 / y) / (1.0 / sinh(y)));
end
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[(1.0 / y), $MachinePrecision] / N[(1.0 / N[Sinh[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\cos x \cdot \frac{\sinh y}{y}
\cos x \cdot \frac{\frac{1}{y}}{\frac{1}{\sinh y}}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.02

    \[\cos x \cdot \frac{\sinh y}{y} \]
  2. Applied egg-rr50.12

    \[\leadsto \cos x \cdot \color{blue}{\left(\frac{1}{\sqrt{y}} \cdot \frac{\sinh y}{\sqrt{y}}\right)} \]
  3. Applied egg-rr0.06

    \[\leadsto \cos x \cdot \color{blue}{\frac{\frac{1}{y}}{\frac{1}{\sinh y}}} \]
  4. Final simplification0.06

    \[\leadsto \cos x \cdot \frac{\frac{1}{y}}{\frac{1}{\sinh y}} \]

Alternatives

Alternative 1
Error0.02%
Cost13120
\[\cos x \cdot \frac{\sinh y}{y} \]
Alternative 2
Error1.1%
Cost6976
\[\cos x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right) \]
Alternative 3
Error1.66%
Cost6464
\[\cos x \]

Error

Reproduce?

herbie shell --seed 2023103 
(FPCore (x y)
  :name "Linear.Quaternion:$csin from linear-1.19.1.3"
  :precision binary64
  (* (cos x) (/ (sinh y) y)))