Average Error: 0.1 → 0.1
Time: 16.0s
Precision: binary64
\[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\]
\[\left(\left(a + \left(z + \left(t + y \cdot i\right)\right)\right) + \log c \cdot \left(-0.5 + b\right)\right) - x \cdot \log \left(\frac{1}{y}\right)\]
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\left(\left(a + \left(z + \left(t + y \cdot i\right)\right)\right) + \log c \cdot \left(-0.5 + b\right)\right) - x \cdot \log \left(\frac{1}{y}\right)
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
(FPCore (x y z t a b c i)
 :precision binary64
 (-
  (+ (+ a (+ z (+ t (* y i)))) (* (log c) (+ -0.5 b)))
  (* x (log (/ 1.0 y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((a + (z + (t + (y * i)))) + (log(c) * (-0.5 + b))) - (x * log(1.0 / y));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus i

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\]
  2. Taylor expanded around 0 0.1

    \[\leadsto \color{blue}{\left(\log y \cdot x + \left(i \cdot y + \left(t + \left(z + \left(b \cdot \log c + a\right)\right)\right)\right)\right) - 0.5 \cdot \log c}\]
  3. Simplified0.1

    \[\leadsto \color{blue}{\log y \cdot x + \left(\left(a + \left(z + \left(t + y \cdot i\right)\right)\right) + \log c \cdot \left(-0.5 + b\right)\right)}\]
  4. Taylor expanded around inf 0.1

    \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \log \left(\frac{1}{y}\right)\right)} + \left(\left(a + \left(z + \left(t + y \cdot i\right)\right)\right) + \log c \cdot \left(-0.5 + b\right)\right)\]
  5. Final simplification0.1

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

Reproduce

herbie shell --seed 2021060 
(FPCore (x y z t a b c i)
  :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
  :precision binary64
  (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))