Average Error: 0.1 → 0.3
Time: 2.8s
Precision: binary64
\[x \cdot \frac{\sin y}{y}\]
\[x \cdot \frac{1}{y \cdot \frac{1}{\sin y}}\]
x \cdot \frac{\sin y}{y}
x \cdot \frac{1}{y \cdot \frac{1}{\sin y}}
double code(double x, double y) {
	return ((double) (x * ((double) (((double) sin(y)) / y))));
}
double code(double x, double y) {
	return ((double) (x * ((double) (1.0 / ((double) (y * ((double) (1.0 / ((double) sin(y))))))))));
}

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. Using strategy rm
  3. Applied clear-num0.2

    \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{y}{\sin y}}}\]
  4. Using strategy rm
  5. Applied div-inv0.3

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

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

Reproduce

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