Average Error: 0.1 → 0.1
Time: 9.3s
Precision: binary64
Cost: 13376
\[\left(\left(x \cdot \log y - y\right) - z\right) + \log t \]
\[\left(\left(x \cdot \log y - y\right) - z\right) + \log t \]
(FPCore (x y z t) :precision binary64 (+ (- (- (* x (log y)) y) z) (log t)))
(FPCore (x y z t) :precision binary64 (+ (- (- (* x (log y)) y) z) (log t)))
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 (((x * log(y)) - y) - z) + log(t);
}
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 = (((x * log(y)) - y) - z) + log(t)
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 (((x * Math.log(y)) - y) - z) + Math.log(t);
}
def code(x, y, z, t):
	return (((x * math.log(y)) - y) - z) + math.log(t)
def code(x, y, z, t):
	return (((x * math.log(y)) - y) - z) + math.log(t)
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(Float64(Float64(Float64(x * log(y)) - y) - z) + log(t))
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 = (((x * log(y)) - y) - z) + log(t);
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[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision] + N[Log[t], $MachinePrecision]), $MachinePrecision]
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\left(\left(x \cdot \log y - y\right) - z\right) + \log t

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. Final simplification0.1

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

Alternatives

Alternative 1
Error33.1
Cost7384
\[\begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -2.3 \cdot 10^{+67}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{-118}:\\ \;\;\;\;-y\\ \mathbf{elif}\;x \leq -7.8 \cdot 10^{-308}:\\ \;\;\;\;-z\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{-244}:\\ \;\;\;\;-y\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{-28}:\\ \;\;\;\;-z\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{+64}:\\ \;\;\;\;-y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error25.4
Cost7384
\[\begin{array}{l} t_1 := \log t - z\\ t_2 := x \cdot \log y\\ t_3 := \log t - y\\ \mathbf{if}\;x \leq -1.1 \cdot 10^{+67}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.1 \cdot 10^{-118}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-306}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4 \cdot 10^{-256}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{+65}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error26.2
Cost7252
\[\begin{array}{l} t_1 := \log t - y\\ t_2 := x \cdot \log y\\ \mathbf{if}\;z \leq -5.6 \cdot 10^{+121}:\\ \;\;\;\;-z\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-24}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-86}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{-44}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+89}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \]
Alternative 4
Error10.9
Cost6985
\[\begin{array}{l} \mathbf{if}\;x \leq -1.1 \cdot 10^{+69} \lor \neg \left(x \leq 8.8 \cdot 10^{+176}\right):\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;\log t - \left(y + z\right)\\ \end{array} \]
Alternative 5
Error6.8
Cost6985
\[\begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{+44} \lor \neg \left(x \leq 7.4 \cdot 10^{+43}\right):\\ \;\;\;\;x \cdot \log y - y\\ \mathbf{else}:\\ \;\;\;\;\log t - \left(y + z\right)\\ \end{array} \]
Alternative 6
Error6.9
Cost6985
\[\begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{+67} \lor \neg \left(x \leq 1.6 \cdot 10^{+65}\right):\\ \;\;\;\;x \cdot \log y - z\\ \mathbf{else}:\\ \;\;\;\;\log t - \left(y + z\right)\\ \end{array} \]
Alternative 7
Error32.8
Cost260
\[\begin{array}{l} \mathbf{if}\;y \leq 4.4 \cdot 10^{+55}:\\ \;\;\;\;-z\\ \mathbf{else}:\\ \;\;\;\;-y\\ \end{array} \]
Alternative 8
Error44.7
Cost128
\[-y \]

Error

Reproduce

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