Average Error: 30.9 → 30.9
Time: 1.2s
Precision: binary64
\[\sqrt{\alpha \cdot \alpha + \left(\left(\frac{1}{27} \cdot tmp\right) \cdot tmp\right) \cdot tmp}\]
\[\sqrt{\alpha \cdot \alpha + \left(\left(\frac{1}{27} \cdot tmp\right) \cdot tmp\right) \cdot tmp}\]
\sqrt{\alpha \cdot \alpha + \left(\left(\frac{1}{27} \cdot tmp\right) \cdot tmp\right) \cdot tmp}
\sqrt{\alpha \cdot \alpha + \left(\left(\frac{1}{27} \cdot tmp\right) \cdot tmp\right) \cdot tmp}
double code(double alpha, double tmp) {
	return ((double) sqrt(((double) (((double) (alpha * alpha)) + ((double) (((double) (((double) (((double) (1.0 / 27.0)) * tmp)) * tmp)) * tmp))))));
}
double code(double alpha, double tmp) {
	return ((double) sqrt(((double) (((double) (alpha * alpha)) + ((double) (((double) (((double) (((double) (1.0 / 27.0)) * tmp)) * tmp)) * tmp))))));
}

Error

Bits error versus alpha

Bits error versus tmp

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 30.9

    \[\sqrt{\alpha \cdot \alpha + \left(\left(\frac{1}{27} \cdot tmp\right) \cdot tmp\right) \cdot tmp}\]
  2. Final simplification30.9

    \[\leadsto \sqrt{\alpha \cdot \alpha + \left(\left(\frac{1}{27} \cdot tmp\right) \cdot tmp\right) \cdot tmp}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (alpha tmp)
  :name "(sqrt (+ (* alpha alpha) (* (* (* (/ 1.0 27.0) tmp) tmp) tmp)))"
  :precision binary64
  (sqrt (+ (* alpha alpha) (* (* (* (/ 1.0 27.0) tmp) tmp) tmp))))