Average Error: 0.1 → 0.1
Time: 9.3s
Precision: binary64
Cost: 13504
\[\left(\left(x \cdot \log y - y\right) - z\right) + \log t \]
\[\log t - \left(z + \left(y + \log \left(\frac{1}{y}\right) \cdot x\right)\right) \]
(FPCore (x y z t) :precision binary64 (+ (- (- (* x (log y)) y) z) (log t)))
(FPCore (x y z t)
 :precision binary64
 (- (log t) (+ z (+ y (* (log (/ 1.0 y)) x)))))
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) - (z + (y + (log((1.0 / y)) * x)));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (((x * log(y)) - y) - z) + log(t)
end function
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = log(t) - (z + (y + (log((1.0d0 / y)) * x)))
end function
public static double code(double x, double y, double z, double t) {
	return (((x * Math.log(y)) - y) - z) + Math.log(t);
}
public static double code(double x, double y, double z, double t) {
	return Math.log(t) - (z + (y + (Math.log((1.0 / y)) * x)));
}
def code(x, y, z, t):
	return (((x * math.log(y)) - y) - z) + math.log(t)
def code(x, y, z, t):
	return math.log(t) - (z + (y + (math.log((1.0 / y)) * x)))
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(x * log(y)) - y) - z) + log(t))
end
function code(x, y, z, t)
	return Float64(log(t) - Float64(z + Float64(y + Float64(log(Float64(1.0 / y)) * x))))
end
function tmp = code(x, y, z, t)
	tmp = (((x * log(y)) - y) - z) + log(t);
end
function tmp = code(x, y, z, t)
	tmp = log(t) - (z + (y + (log((1.0 / y)) * x)));
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision] + N[Log[t], $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_] := N[(N[Log[t], $MachinePrecision] - N[(z + N[(y + N[(N[Log[N[(1.0 / y), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\log t - \left(z + \left(y + \log \left(\frac{1}{y}\right) \cdot x\right)\right)

Error

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. Taylor expanded in y around inf 0.1

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

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

Alternatives

Alternative 1
Error0.1
Cost13376
\[\log t + \left(\left(x \cdot \log y - y\right) - z\right) \]
Alternative 2
Error6.6
Cost7176
\[\begin{array}{l} \mathbf{if}\;x \leq -1.846257783200069 \cdot 10^{+61}:\\ \;\;\;\;x \cdot \log y - z\\ \mathbf{elif}\;x \leq 5.507201646675897 \cdot 10^{+70}:\\ \;\;\;\;\log t - \left(y + z\right)\\ \mathbf{else}:\\ \;\;\;\;\log \left(\frac{1}{y}\right) \cdot \left(-x\right) - z\\ \end{array} \]
Alternative 3
Error18.9
Cost6984
\[\begin{array}{l} t_1 := x \cdot \log y - z\\ \mathbf{if}\;x \leq -450.5615195431847:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 5564.6116445703665:\\ \;\;\;\;\log t - z\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error6.6
Cost6984
\[\begin{array}{l} t_1 := x \cdot \log y - z\\ \mathbf{if}\;x \leq -1.846257783200069 \cdot 10^{+61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 5.507201646675897 \cdot 10^{+70}:\\ \;\;\;\;\log t - \left(y + z\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error25.2
Cost6856
\[\begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -3.6932264884508555 \cdot 10^{+118}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.7047202194922855 \cdot 10^{+92}:\\ \;\;\;\;\log t - z\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error36.4
Cost6592
\[\log t - z \]
Alternative 7
Error44.5
Cost128
\[-z \]

Error

Reproduce

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