Average Error: 10.3 → 10.3
Time: 959.0ms
Precision: binary64
\[\frac{\left(rotationN - 1\right) \cdot m_rotationOut + m_rotation}{rotationN}\]
\[\frac{\left(rotationN - 1\right) \cdot m_rotationOut + m_rotation}{rotationN}\]
\frac{\left(rotationN - 1\right) \cdot m_rotationOut + m_rotation}{rotationN}
\frac{\left(rotationN - 1\right) \cdot m_rotationOut + m_rotation}{rotationN}
double code(double rotationN, double m_rotationOut, double m_rotation) {
	return ((double) (((double) (((double) (((double) (rotationN - 1.0)) * m_rotationOut)) + m_rotation)) / rotationN));
}
double code(double rotationN, double m_rotationOut, double m_rotation) {
	return ((double) (((double) (((double) (((double) (rotationN - 1.0)) * m_rotationOut)) + m_rotation)) / rotationN));
}

Error

Bits error versus rotationN

Bits error versus m_rotationOut

Bits error versus m_rotation

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 10.3

    \[\frac{\left(rotationN - 1\right) \cdot m_rotationOut + m_rotation}{rotationN}\]
  2. Final simplification10.3

    \[\leadsto \frac{\left(rotationN - 1\right) \cdot m_rotationOut + m_rotation}{rotationN}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (rotationN m_rotationOut m_rotation)
  :name "(/ (+ (* (- rotationN 1) m_rotationOut) m_rotation) rotationN)"
  :precision binary64
  (/ (+ (* (- rotationN 1.0) m_rotationOut) m_rotation) rotationN))