
(FPCore (x y z t) :precision binary64 (- (+ (* x (log y)) (* z (log (- 1.0 y)))) t))
double code(double x, double y, double z, double t) {
return ((x * log(y)) + (z * log((1.0 - y)))) - 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)) + (z * log((1.0d0 - y)))) - t
end function
public static double code(double x, double y, double z, double t) {
return ((x * Math.log(y)) + (z * Math.log((1.0 - y)))) - t;
}
def code(x, y, z, t): return ((x * math.log(y)) + (z * math.log((1.0 - y)))) - t
function code(x, y, z, t) return Float64(Float64(Float64(x * log(y)) + Float64(z * log(Float64(1.0 - y)))) - t) end
function tmp = code(x, y, z, t) tmp = ((x * log(y)) + (z * log((1.0 - y)))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (- (+ (* x (log y)) (* z (log (- 1.0 y)))) t))
double code(double x, double y, double z, double t) {
return ((x * log(y)) + (z * log((1.0 - y)))) - 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)) + (z * log((1.0d0 - y)))) - t
end function
public static double code(double x, double y, double z, double t) {
return ((x * Math.log(y)) + (z * Math.log((1.0 - y)))) - t;
}
def code(x, y, z, t): return ((x * math.log(y)) + (z * math.log((1.0 - y)))) - t
function code(x, y, z, t) return Float64(Float64(Float64(x * log(y)) + Float64(z * log(Float64(1.0 - y)))) - t) end
function tmp = code(x, y, z, t) tmp = ((x * log(y)) + (z * log((1.0 - y)))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t
\end{array}
(FPCore (x y z t) :precision binary64 (fma z (log1p (- y)) (- (* x (log y)) t)))
double code(double x, double y, double z, double t) {
return fma(z, log1p(-y), ((x * log(y)) - t));
}
function code(x, y, z, t) return fma(z, log1p(Float64(-y)), Float64(Float64(x * log(y)) - t)) end
code[x_, y_, z_, t_] := N[(z * N[Log[1 + (-y)], $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z, \mathsf{log1p}\left(-y\right), x \cdot \log y - t\right)
\end{array}
Initial program 83.0%
+-commutative83.0%
associate--l+83.0%
fma-define83.0%
sub-neg83.0%
log1p-define99.8%
Simplified99.8%
(FPCore (x y z t) :precision binary64 (fma (log y) x (- (* y (- z)) t)))
double code(double x, double y, double z, double t) {
return fma(log(y), x, ((y * -z) - t));
}
function code(x, y, z, t) return fma(log(y), x, Float64(Float64(y * Float64(-z)) - t)) end
code[x_, y_, z_, t_] := N[(N[Log[y], $MachinePrecision] * x + N[(N[(y * (-z)), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\log y, x, y \cdot \left(-z\right) - t\right)
\end{array}
Initial program 83.0%
Taylor expanded in y around 0 99.3%
associate--l+99.3%
+-commutative99.3%
mul-1-neg99.3%
unsub-neg99.3%
Simplified99.3%
associate--l-99.3%
*-commutative99.3%
fmm-def99.4%
Applied egg-rr99.4%
Final simplification99.4%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (log y)))) (if (or (<= t -3.5e-46) (not (<= t 3.9e-104))) (- t_1 t) (- t_1 (* z y)))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double tmp;
if ((t <= -3.5e-46) || !(t <= 3.9e-104)) {
tmp = t_1 - t;
} else {
tmp = t_1 - (z * y);
}
return tmp;
}
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
real(8) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if ((t <= (-3.5d-46)) .or. (.not. (t <= 3.9d-104))) then
tmp = t_1 - t
else
tmp = t_1 - (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * Math.log(y);
double tmp;
if ((t <= -3.5e-46) || !(t <= 3.9e-104)) {
tmp = t_1 - t;
} else {
tmp = t_1 - (z * y);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) tmp = 0 if (t <= -3.5e-46) or not (t <= 3.9e-104): tmp = t_1 - t else: tmp = t_1 - (z * y) return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) tmp = 0.0 if ((t <= -3.5e-46) || !(t <= 3.9e-104)) tmp = Float64(t_1 - t); else tmp = Float64(t_1 - Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); tmp = 0.0; if ((t <= -3.5e-46) || ~((t <= 3.9e-104))) tmp = t_1 - t; else tmp = t_1 - (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -3.5e-46], N[Not[LessEqual[t, 3.9e-104]], $MachinePrecision]], N[(t$95$1 - t), $MachinePrecision], N[(t$95$1 - N[(z * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{-46} \lor \neg \left(t \leq 3.9 \cdot 10^{-104}\right):\\
\;\;\;\;t\_1 - t\\
\mathbf{else}:\\
\;\;\;\;t\_1 - z \cdot y\\
\end{array}
\end{array}
if t < -3.5000000000000002e-46 or 3.9000000000000002e-104 < t Initial program 92.1%
Taylor expanded in y around 0 99.7%
fma-define99.7%
fma-define99.7%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around 0 91.6%
if -3.5000000000000002e-46 < t < 3.9000000000000002e-104Initial program 71.6%
Taylor expanded in y around 0 99.1%
associate--l+99.1%
+-commutative99.1%
mul-1-neg99.1%
unsub-neg99.1%
Simplified99.1%
associate--l-99.1%
*-commutative99.1%
fmm-def99.1%
Applied egg-rr99.1%
Taylor expanded in t around 0 90.9%
Final simplification91.3%
(FPCore (x y z t) :precision binary64 (if (or (<= x -3.3e-103) (not (<= x 9e-91))) (- (* x (log y)) t) (- (fma y z t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3.3e-103) || !(x <= 9e-91)) {
tmp = (x * log(y)) - t;
} else {
tmp = -fma(y, z, t);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if ((x <= -3.3e-103) || !(x <= 9e-91)) tmp = Float64(Float64(x * log(y)) - t); else tmp = Float64(-fma(y, z, t)); end return tmp end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -3.3e-103], N[Not[LessEqual[x, 9e-91]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], (-N[(y * z + t), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{-103} \lor \neg \left(x \leq 9 \cdot 10^{-91}\right):\\
\;\;\;\;x \cdot \log y - t\\
\mathbf{else}:\\
\;\;\;\;-\mathsf{fma}\left(y, z, t\right)\\
\end{array}
\end{array}
if x < -3.2999999999999999e-103 or 8.99999999999999952e-91 < x Initial program 90.0%
Taylor expanded in y around 0 99.8%
fma-define99.8%
fma-define99.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 90.0%
if -3.2999999999999999e-103 < x < 8.99999999999999952e-91Initial program 69.1%
Taylor expanded in y around 0 98.5%
associate--l+98.5%
+-commutative98.5%
mul-1-neg98.5%
unsub-neg98.5%
Simplified98.5%
associate--l-98.5%
*-commutative98.5%
fmm-def98.5%
Applied egg-rr98.5%
Taylor expanded in x around 0 88.2%
mul-1-neg88.2%
+-commutative88.2%
fma-define88.2%
Simplified88.2%
Final simplification89.4%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2e+26) (not (<= x 5e+72))) (* x (log y)) (- (fma y z t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2e+26) || !(x <= 5e+72)) {
tmp = x * log(y);
} else {
tmp = -fma(y, z, t);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if ((x <= -2e+26) || !(x <= 5e+72)) tmp = Float64(x * log(y)); else tmp = Float64(-fma(y, z, t)); end return tmp end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2e+26], N[Not[LessEqual[x, 5e+72]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], (-N[(y * z + t), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+26} \lor \neg \left(x \leq 5 \cdot 10^{+72}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;-\mathsf{fma}\left(y, z, t\right)\\
\end{array}
\end{array}
if x < -2.0000000000000001e26 or 4.99999999999999992e72 < x Initial program 93.3%
Taylor expanded in y around 0 99.7%
fma-define99.7%
fma-define99.7%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 76.6%
if -2.0000000000000001e26 < x < 4.99999999999999992e72Initial program 75.1%
Taylor expanded in y around 0 99.1%
associate--l+99.1%
+-commutative99.1%
mul-1-neg99.1%
unsub-neg99.1%
Simplified99.1%
associate--l-99.1%
*-commutative99.1%
fmm-def99.1%
Applied egg-rr99.1%
Taylor expanded in x around 0 78.3%
mul-1-neg78.3%
+-commutative78.3%
fma-define78.3%
Simplified78.3%
Final simplification77.6%
(FPCore (x y z t) :precision binary64 (if (or (<= x -8e+25) (not (<= x 1.1e+73))) (* x (log y)) (- (* y (- z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -8e+25) || !(x <= 1.1e+73)) {
tmp = x * log(y);
} else {
tmp = (y * -z) - t;
}
return tmp;
}
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
real(8) :: tmp
if ((x <= (-8d+25)) .or. (.not. (x <= 1.1d+73))) then
tmp = x * log(y)
else
tmp = (y * -z) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -8e+25) || !(x <= 1.1e+73)) {
tmp = x * Math.log(y);
} else {
tmp = (y * -z) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -8e+25) or not (x <= 1.1e+73): tmp = x * math.log(y) else: tmp = (y * -z) - t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -8e+25) || !(x <= 1.1e+73)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(y * Float64(-z)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -8e+25) || ~((x <= 1.1e+73))) tmp = x * log(y); else tmp = (y * -z) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -8e+25], N[Not[LessEqual[x, 1.1e+73]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(y * (-z)), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{+25} \lor \neg \left(x \leq 1.1 \cdot 10^{+73}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-z\right) - t\\
\end{array}
\end{array}
if x < -8.00000000000000072e25 or 1.1e73 < x Initial program 93.3%
Taylor expanded in y around 0 99.7%
fma-define99.7%
fma-define99.7%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 76.6%
if -8.00000000000000072e25 < x < 1.1e73Initial program 75.1%
Taylor expanded in y around 0 99.1%
associate--l+99.1%
+-commutative99.1%
mul-1-neg99.1%
unsub-neg99.1%
Simplified99.1%
Taylor expanded in x around 0 78.3%
neg-mul-178.3%
distribute-neg-in78.3%
unsub-neg78.3%
Simplified78.3%
Final simplification77.6%
(FPCore (x y z t) :precision binary64 (- (- (* x (log y)) t) (* z y)))
double code(double x, double y, double z, double t) {
return ((x * log(y)) - t) - (z * y);
}
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)) - t) - (z * y)
end function
public static double code(double x, double y, double z, double t) {
return ((x * Math.log(y)) - t) - (z * y);
}
def code(x, y, z, t): return ((x * math.log(y)) - t) - (z * y)
function code(x, y, z, t) return Float64(Float64(Float64(x * log(y)) - t) - Float64(z * y)) end
function tmp = code(x, y, z, t) tmp = ((x * log(y)) - t) - (z * y); end
code[x_, y_, z_, t_] := N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \log y - t\right) - z \cdot y
\end{array}
Initial program 83.0%
Taylor expanded in y around 0 99.3%
associate--l+99.3%
+-commutative99.3%
mul-1-neg99.3%
unsub-neg99.3%
Simplified99.3%
Final simplification99.3%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.95e-46) (not (<= t 2.05e-103))) (- t) (* y (- z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.95e-46) || !(t <= 2.05e-103)) {
tmp = -t;
} else {
tmp = y * -z;
}
return tmp;
}
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
real(8) :: tmp
if ((t <= (-2.95d-46)) .or. (.not. (t <= 2.05d-103))) then
tmp = -t
else
tmp = y * -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.95e-46) || !(t <= 2.05e-103)) {
tmp = -t;
} else {
tmp = y * -z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.95e-46) or not (t <= 2.05e-103): tmp = -t else: tmp = y * -z return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.95e-46) || !(t <= 2.05e-103)) tmp = Float64(-t); else tmp = Float64(y * Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.95e-46) || ~((t <= 2.05e-103))) tmp = -t; else tmp = y * -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.95e-46], N[Not[LessEqual[t, 2.05e-103]], $MachinePrecision]], (-t), N[(y * (-z)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.95 \cdot 10^{-46} \lor \neg \left(t \leq 2.05 \cdot 10^{-103}\right):\\
\;\;\;\;-t\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\end{array}
\end{array}
if t < -2.95e-46 or 2.04999999999999998e-103 < t Initial program 92.1%
Taylor expanded in y around 0 99.7%
fma-define99.7%
fma-define99.7%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around inf 59.6%
neg-mul-159.6%
Simplified59.6%
if -2.95e-46 < t < 2.04999999999999998e-103Initial program 71.6%
Taylor expanded in y around 0 99.1%
associate--l+99.1%
+-commutative99.1%
mul-1-neg99.1%
unsub-neg99.1%
Simplified99.1%
associate--l-99.1%
*-commutative99.1%
fmm-def99.1%
Applied egg-rr99.1%
Taylor expanded in y around inf 30.4%
neg-mul-130.4%
distribute-rgt-neg-in30.4%
Simplified30.4%
Final simplification46.6%
(FPCore (x y z t) :precision binary64 (- (* y (- z)) t))
double code(double x, double y, double z, double t) {
return (y * -z) - 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 = (y * -z) - t
end function
public static double code(double x, double y, double z, double t) {
return (y * -z) - t;
}
def code(x, y, z, t): return (y * -z) - t
function code(x, y, z, t) return Float64(Float64(y * Float64(-z)) - t) end
function tmp = code(x, y, z, t) tmp = (y * -z) - t; end
code[x_, y_, z_, t_] := N[(N[(y * (-z)), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(-z\right) - t
\end{array}
Initial program 83.0%
Taylor expanded in y around 0 99.3%
associate--l+99.3%
+-commutative99.3%
mul-1-neg99.3%
unsub-neg99.3%
Simplified99.3%
Taylor expanded in x around 0 54.4%
neg-mul-154.4%
distribute-neg-in54.4%
unsub-neg54.4%
Simplified54.4%
Final simplification54.4%
(FPCore (x y z t) :precision binary64 (- t))
double code(double x, double y, double z, double t) {
return -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 = -t
end function
public static double code(double x, double y, double z, double t) {
return -t;
}
def code(x, y, z, t): return -t
function code(x, y, z, t) return Float64(-t) end
function tmp = code(x, y, z, t) tmp = -t; end
code[x_, y_, z_, t_] := (-t)
\begin{array}{l}
\\
-t
\end{array}
Initial program 83.0%
Taylor expanded in y around 0 99.5%
fma-define99.5%
fma-define99.5%
associate-*r*99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in t around inf 37.6%
neg-mul-137.6%
Simplified37.6%
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
return 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 = t
end function
public static double code(double x, double y, double z, double t) {
return t;
}
def code(x, y, z, t): return t
function code(x, y, z, t) return t end
function tmp = code(x, y, z, t) tmp = t; end
code[x_, y_, z_, t_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 83.0%
Taylor expanded in y around 0 99.5%
fma-define99.5%
fma-define99.5%
associate-*r*99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in t around inf 37.6%
neg-mul-137.6%
Simplified37.6%
add-sqr-sqrt19.2%
sqrt-unprod10.2%
sqr-neg10.2%
sqrt-unprod1.0%
add-sqr-sqrt2.3%
*-un-lft-identity2.3%
Applied egg-rr2.3%
Taylor expanded in t around 0 2.3%
(FPCore (x y z t)
:precision binary64
(-
(*
(- z)
(+
(+ (* 0.5 (* y y)) y)
(* (/ 0.3333333333333333 (* 1.0 (* 1.0 1.0))) (* y (* y y)))))
(- t (* x (log y)))))
double code(double x, double y, double z, double t) {
return (-z * (((0.5 * (y * y)) + y) + ((0.3333333333333333 / (1.0 * (1.0 * 1.0))) * (y * (y * y))))) - (t - (x * log(y)));
}
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 = (-z * (((0.5d0 * (y * y)) + y) + ((0.3333333333333333d0 / (1.0d0 * (1.0d0 * 1.0d0))) * (y * (y * y))))) - (t - (x * log(y)))
end function
public static double code(double x, double y, double z, double t) {
return (-z * (((0.5 * (y * y)) + y) + ((0.3333333333333333 / (1.0 * (1.0 * 1.0))) * (y * (y * y))))) - (t - (x * Math.log(y)));
}
def code(x, y, z, t): return (-z * (((0.5 * (y * y)) + y) + ((0.3333333333333333 / (1.0 * (1.0 * 1.0))) * (y * (y * y))))) - (t - (x * math.log(y)))
function code(x, y, z, t) return Float64(Float64(Float64(-z) * Float64(Float64(Float64(0.5 * Float64(y * y)) + y) + Float64(Float64(0.3333333333333333 / Float64(1.0 * Float64(1.0 * 1.0))) * Float64(y * Float64(y * y))))) - Float64(t - Float64(x * log(y)))) end
function tmp = code(x, y, z, t) tmp = (-z * (((0.5 * (y * y)) + y) + ((0.3333333333333333 / (1.0 * (1.0 * 1.0))) * (y * (y * y))))) - (t - (x * log(y))); end
code[x_, y_, z_, t_] := N[(N[((-z) * N[(N[(N[(0.5 * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] + N[(N[(0.3333333333333333 / N[(1.0 * N[(1.0 * 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t - N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-z\right) \cdot \left(\left(0.5 \cdot \left(y \cdot y\right) + y\right) + \frac{0.3333333333333333}{1 \cdot \left(1 \cdot 1\right)} \cdot \left(y \cdot \left(y \cdot y\right)\right)\right) - \left(t - x \cdot \log y\right)
\end{array}
herbie shell --seed 2024152
(FPCore (x y z t)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, B"
:precision binary64
:alt
(! :herbie-platform default (- (* (- z) (+ (+ (* 1/2 (* y y)) y) (* (/ 1/3 (* 1 (* 1 1))) (* y (* y y))))) (- t (* x (log y)))))
(- (+ (* x (log y)) (* z (log (- 1.0 y)))) t))