Average Error: 0.1 → 0.1
Time: 12.6s
Precision: binary64
\[\left(\left(x \cdot \log y - y\right) - z\right) + \log t \]
\[\left(\log t - \log \left(\frac{1}{y}\right) \cdot x\right) - \left(y + z\right) \]
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\left(\log t - \log \left(\frac{1}{y}\right) \cdot x\right) - \left(y + z\right)
(FPCore (x y z t) :precision binary64 (+ (- (- (* x (log y)) y) z) (log t)))
(FPCore (x y z t)
 :precision binary64
 (- (- (log t) (* (log (/ 1.0 y)) x)) (+ y z)))
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 (log(t) - (log(1.0 / y) * x)) - (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(x, \log y, \log t\right) - \left(y + z\right)} \]
  3. Taylor expanded in y around inf 0.1

    \[\leadsto \color{blue}{\left(\log t - \log \left(\frac{1}{y}\right) \cdot x\right)} - \left(y + z\right) \]
  4. Final simplification0.1

    \[\leadsto \left(\log t - \log \left(\frac{1}{y}\right) \cdot x\right) - \left(y + z\right) \]

Reproduce

herbie shell --seed 2021307 
(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)))