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

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

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

Alternatives

Alternative 1
Error24.1
Cost972
\[\begin{array}{l} t_0 := \frac{y \cdot x}{y}\\ \mathbf{if}\;y \leq -96000:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;x \ne 0:\\ \;\;\;\;\frac{y}{\frac{y}{x}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array}\\ \mathbf{elif}\;y \leq 12.5:\\ \;\;\;\;x \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\ \mathbf{elif}\;y \cdot x \ne 0:\\ \;\;\;\;\frac{1}{\frac{\frac{y}{x}}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 2
Error24.3
Cost840
\[\begin{array}{l} \mathbf{if}\;y \leq -96000:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;x \ne 0:\\ \;\;\;\;\frac{y}{\frac{y}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{y}\\ \end{array}\\ \mathbf{elif}\;y \leq 12.5:\\ \;\;\;\;x \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \end{array} \]
Alternative 3
Error24.5
Cost716
\[\begin{array}{l} t_0 := \begin{array}{l} \mathbf{if}\;x \ne 0:\\ \;\;\;\;\frac{y}{\frac{y}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{y}\\ \end{array}\\ \mathbf{if}\;y \leq -5 \cdot 10^{+72}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 10^{-29}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error25.0
Cost584
\[\begin{array}{l} t_0 := y \cdot \frac{x}{y}\\ \mathbf{if}\;y \leq -4 \cdot 10^{+80}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{-11}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error31.6
Cost64
\[x \]

Error

Reproduce

herbie shell --seed 2023010 
(FPCore (x y)
  :name "Linear.Quaternion:$cexp from linear-1.19.1.3"
  :precision binary64
  (* x (/ (sin y) y)))