Average Error: 0.3 → 0.3
Time: 1.4s
Precision: binary64
\[y_i - \frac{2}{3} \cdot \left(\tan y_i - x\right)\]
\[y_i - \frac{2}{3} \cdot \left(\tan y_i - x\right)\]
y_i - \frac{2}{3} \cdot \left(\tan y_i - x\right)
y_i - \frac{2}{3} \cdot \left(\tan y_i - x\right)
double code(double y_i, double x) {
	return ((double) (y_i - ((double) (((double) (2.0 / 3.0)) * ((double) (((double) tan(y_i)) - x))))));
}
double code(double y_i, double x) {
	return ((double) (y_i - ((double) (((double) (2.0 / 3.0)) * ((double) (((double) tan(y_i)) - x))))));
}

Error

Bits error versus y_i

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.3

    \[y_i - \frac{2}{3} \cdot \left(\tan y_i - x\right)\]
  2. Final simplification0.3

    \[\leadsto y_i - \frac{2}{3} \cdot \left(\tan y_i - x\right)\]

Reproduce

herbie shell --seed 2020153 
(FPCore (y_i x)
  :name "(- y_i (* (/ 2 3) (- (tan y_i) x)))"
  :precision binary64
  (- y_i (* (/ 2.0 3.0) (- (tan y_i) x))))