Average Error: 0.1 → 0.1
Time: 2.5s
Precision: binary64
\[x \cdot \frac{\sin y}{y} \]
\[\frac{\sin y}{y} \cdot x \]
(FPCore (x y) :precision binary64 (* x (/ (sin y) y)))
(FPCore (x y) :precision binary64 (* (/ (sin y) y) x))
double code(double x, double y) {
	return x * (sin(y) / y);
}
double code(double x, double y) {
	return (sin(y) / y) * x;
}
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 = (sin(y) / y) * x
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 (Math.sin(y) / y) * x;
}
def code(x, y):
	return x * (math.sin(y) / y)
def code(x, y):
	return (math.sin(y) / y) * x
function code(x, y)
	return Float64(x * Float64(sin(y) / y))
end
function code(x, y)
	return Float64(Float64(sin(y) / y) * x)
end
function tmp = code(x, y)
	tmp = x * (sin(y) / y);
end
function tmp = code(x, y)
	tmp = (sin(y) / y) * x;
end
code[x_, y_] := N[(x * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := N[(N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]
x \cdot \frac{\sin y}{y}
\frac{\sin y}{y} \cdot x

Error

Bits error versus x

Bits error versus y

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} \]
  2. Taylor expanded in x around 0 7.0

    \[\leadsto \color{blue}{\frac{\sin y \cdot x}{y}} \]
  3. Applied egg-rr0.1

    \[\leadsto \color{blue}{1 \cdot \left(\frac{\sin y}{y} \cdot x\right)} \]
  4. Final simplification0.1

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

Reproduce

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