Average Error: 0.1 → 0.1
Time: 7.4s
Precision: 64
\[\left(\left(x \cdot \log y - y\right) - z\right) + \log t\]
\[\mathsf{fma}\left(\log y, x, \log \left(\sqrt{t}\right) + \left(\log \left(\sqrt{t}\right) - \left(y + z\right)\right)\right)\]
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\mathsf{fma}\left(\log y, x, \log \left(\sqrt{t}\right) + \left(\log \left(\sqrt{t}\right) - \left(y + z\right)\right)\right)
double code(double x, double y, double z, double t) {
	return ((((x * log(y)) - y) - z) + log(t));
}
double code(double x, double y, double z, double t) {
	return fma(log(y), x, (log(sqrt(t)) + (log(sqrt(t)) - (y + z))));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\left(\left(x \cdot \log y - y\right) - z\right) + \log t\]
  2. Simplified0.1

    \[\leadsto \color{blue}{\mathsf{fma}\left(\log y, x, \log t - \left(y + z\right)\right)}\]
  3. Using strategy rm
  4. Applied add-sqr-sqrt0.1

    \[\leadsto \mathsf{fma}\left(\log y, x, \log \color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)} - \left(y + z\right)\right)\]
  5. Applied log-prod0.1

    \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{\left(\log \left(\sqrt{t}\right) + \log \left(\sqrt{t}\right)\right)} - \left(y + z\right)\right)\]
  6. Applied associate--l+0.1

    \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{\log \left(\sqrt{t}\right) + \left(\log \left(\sqrt{t}\right) - \left(y + z\right)\right)}\right)\]
  7. Final simplification0.1

    \[\leadsto \mathsf{fma}\left(\log y, x, \log \left(\sqrt{t}\right) + \left(\log \left(\sqrt{t}\right) - \left(y + z\right)\right)\right)\]

Reproduce

herbie shell --seed 2020058 +o rules:numerics
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, A"
  :precision binary64
  (+ (- (- (* x (log y)) y) z) (log t)))