?

Average Error: 0.02% → 0.02%
Time: 8.3s
Precision: binary64
Cost: 13120

?

\[\cos x \cdot \frac{\sinh y}{y} \]
\[\frac{\cos x}{\frac{y}{\sinh y}} \]
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y)))
(FPCore (x y) :precision binary64 (/ (cos x) (/ y (sinh y))))
double code(double x, double y) {
	return cos(x) * (sinh(y) / y);
}
double code(double x, double y) {
	return cos(x) / (y / 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) / (y / 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) / (y / Math.sinh(y));
}
def code(x, y):
	return math.cos(x) * (math.sinh(y) / y)
def code(x, y):
	return math.cos(x) / (y / 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(y / sinh(y)))
end
function tmp = code(x, y)
	tmp = cos(x) * (sinh(y) / y);
end
function tmp = code(x, y)
	tmp = cos(x) / (y / 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[(y / N[Sinh[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\cos x \cdot \frac{\sinh y}{y}
\frac{\cos x}{\frac{y}{\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-rr0.02

    \[\leadsto \color{blue}{\frac{\cos x}{\frac{y}{\sinh y}}} \]
  3. Final simplification0.02

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

Alternatives

Alternative 1
Error0.92%
Cost13636
\[\begin{array}{l} t_0 := \frac{\sinh y}{y}\\ \mathbf{if}\;t_0 \leq 1.0000002:\\ \;\;\;\;\cos x \cdot \left(1 + \left(y \cdot y\right) \cdot 0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 2
Error1.28%
Cost13508
\[\begin{array}{l} \mathbf{if}\;\cos x \leq 1:\\ \;\;\;\;\frac{\cos x}{1 + \left(y \cdot y\right) \cdot -0.16666666666666666}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sinh y}{y}\\ \end{array} \]
Alternative 3
Error1.79%
Cost13124
\[\begin{array}{l} \mathbf{if}\;\cos x \leq 1:\\ \;\;\;\;\cos x\\ \mathbf{else}:\\ \;\;\;\;\frac{\sinh y}{y}\\ \end{array} \]
Alternative 4
Error0.02%
Cost13120
\[\cos x \cdot \frac{\sinh y}{y} \]
Alternative 5
Error0.97%
Cost7360
\[\cos x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(\left(y \cdot y\right) \cdot 0.008333333333333333 + 0.16666666666666666\right)\right) \]
Alternative 6
Error1.79%
Cost6464
\[\cos x \]
Alternative 7
Error45.71%
Cost448
\[1 + \left(y \cdot y\right) \cdot 0.16666666666666666 \]
Alternative 8
Error46.02%
Cost64
\[1 \]

Error

Reproduce?

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