
(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);
}
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);
}
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 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]
\begin{array}{l}
\\
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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);
}
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);
}
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 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]
\begin{array}{l}
\\
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\end{array}
(FPCore (x y z t) :precision binary64 (fma (log y) x (- (- (log t) y) z)))
double code(double x, double y, double z, double t) {
return fma(log(y), x, ((log(t) - y) - z));
}
function code(x, y, z, t) return fma(log(y), x, Float64(Float64(log(t) - y) - z)) end
code[x_, y_, z_, t_] := N[(N[Log[y], $MachinePrecision] * x + N[(N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\log y, x, \left(\log t - y\right) - z\right)
\end{array}
Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--l+N/A
*-rgt-identityN/A
*-inversesN/A
fp-cancel-sign-subN/A
mul-1-negN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
*-commutativeN/A
remove-double-negN/A
fp-cancel-sign-subN/A
mul-1-negN/A
*-commutativeN/A
Applied rewrites99.9%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (* x (log y)) y))) (if (<= t_1 -5e+18) (- y) (if (<= t_1 5e+42) (- (log t) z) (* (log y) x)))))
double code(double x, double y, double z, double t) {
double t_1 = (x * log(y)) - y;
double tmp;
if (t_1 <= -5e+18) {
tmp = -y;
} else if (t_1 <= 5e+42) {
tmp = log(t) - z;
} else {
tmp = log(y) * x;
}
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)) - y
if (t_1 <= (-5d+18)) then
tmp = -y
else if (t_1 <= 5d+42) then
tmp = log(t) - z
else
tmp = log(y) * x
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)) - y;
double tmp;
if (t_1 <= -5e+18) {
tmp = -y;
} else if (t_1 <= 5e+42) {
tmp = Math.log(t) - z;
} else {
tmp = Math.log(y) * x;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * math.log(y)) - y tmp = 0 if t_1 <= -5e+18: tmp = -y elif t_1 <= 5e+42: tmp = math.log(t) - z else: tmp = math.log(y) * x return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * log(y)) - y) tmp = 0.0 if (t_1 <= -5e+18) tmp = Float64(-y); elseif (t_1 <= 5e+42) tmp = Float64(log(t) - z); else tmp = Float64(log(y) * x); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * log(y)) - y; tmp = 0.0; if (t_1 <= -5e+18) tmp = -y; elseif (t_1 <= 5e+42) tmp = log(t) - z; else tmp = log(y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+18], (-y), If[LessEqual[t$95$1, 5e+42], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y - y\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+18}:\\
\;\;\;\;-y\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+42}:\\
\;\;\;\;\log t - z\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot x\\
\end{array}
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -5e18Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--l+N/A
*-rgt-identityN/A
*-inversesN/A
fp-cancel-sign-subN/A
mul-1-negN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
*-commutativeN/A
remove-double-negN/A
fp-cancel-sign-subN/A
mul-1-negN/A
*-commutativeN/A
Applied rewrites99.9%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6451.2
Applied rewrites51.2%
if -5e18 < (-.f64 (*.f64 x (log.f64 y)) y) < 5.00000000000000007e42Initial program 100.0%
Taylor expanded in y around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower-log.f6499.2
Applied rewrites99.2%
Taylor expanded in x around 0
Applied rewrites97.3%
if 5.00000000000000007e42 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.7%
Taylor expanded in x around 0
+-commutativeN/A
associate--l+N/A
*-rgt-identityN/A
*-inversesN/A
fp-cancel-sign-subN/A
mul-1-negN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
*-commutativeN/A
remove-double-negN/A
fp-cancel-sign-subN/A
mul-1-negN/A
*-commutativeN/A
Applied rewrites99.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6490.8
Applied rewrites90.8%
(FPCore (x y z t) :precision binary64 (if (or (<= x -28000000000.0) (not (<= x 3.1e+70))) (- (fma (log y) x (log t)) y) (- (- (log t) y) z)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -28000000000.0) || !(x <= 3.1e+70)) {
tmp = fma(log(y), x, log(t)) - y;
} else {
tmp = (log(t) - y) - z;
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if ((x <= -28000000000.0) || !(x <= 3.1e+70)) tmp = Float64(fma(log(y), x, log(t)) - y); else tmp = Float64(Float64(log(t) - y) - z); end return tmp end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -28000000000.0], N[Not[LessEqual[x, 3.1e+70]], $MachinePrecision]], N[(N[(N[Log[y], $MachinePrecision] * x + N[Log[t], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -28000000000 \lor \neg \left(x \leq 3.1 \cdot 10^{+70}\right):\\
\;\;\;\;\mathsf{fma}\left(\log y, x, \log t\right) - y\\
\mathbf{else}:\\
\;\;\;\;\left(\log t - y\right) - z\\
\end{array}
\end{array}
if x < -2.8e10 or 3.1000000000000003e70 < x Initial program 99.8%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower-log.f6485.9
Applied rewrites85.9%
if -2.8e10 < x < 3.1000000000000003e70Initial program 100.0%
Taylor expanded in x around 0
associate--r+N/A
*-lft-identityN/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower--.f64N/A
lower-log.f6497.2
Applied rewrites97.2%
Final simplification92.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (fma (log y) x (log t))))
(if (<= x -28000000000.0)
(- t_1 y)
(if (<= x 6.1e+28) (- (- (log t) y) z) (- t_1 z)))))
double code(double x, double y, double z, double t) {
double t_1 = fma(log(y), x, log(t));
double tmp;
if (x <= -28000000000.0) {
tmp = t_1 - y;
} else if (x <= 6.1e+28) {
tmp = (log(t) - y) - z;
} else {
tmp = t_1 - z;
}
return tmp;
}
function code(x, y, z, t) t_1 = fma(log(y), x, log(t)) tmp = 0.0 if (x <= -28000000000.0) tmp = Float64(t_1 - y); elseif (x <= 6.1e+28) tmp = Float64(Float64(log(t) - y) - z); else tmp = Float64(t_1 - z); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x + N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -28000000000.0], N[(t$95$1 - y), $MachinePrecision], If[LessEqual[x, 6.1e+28], N[(N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision], N[(t$95$1 - z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\log y, x, \log t\right)\\
\mathbf{if}\;x \leq -28000000000:\\
\;\;\;\;t\_1 - y\\
\mathbf{elif}\;x \leq 6.1 \cdot 10^{+28}:\\
\;\;\;\;\left(\log t - y\right) - z\\
\mathbf{else}:\\
\;\;\;\;t\_1 - z\\
\end{array}
\end{array}
if x < -2.8e10Initial program 99.7%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower-log.f6488.7
Applied rewrites88.7%
if -2.8e10 < x < 6.1000000000000002e28Initial program 100.0%
Taylor expanded in x around 0
associate--r+N/A
*-lft-identityN/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower--.f64N/A
lower-log.f64100.0
Applied rewrites100.0%
if 6.1000000000000002e28 < x Initial program 99.8%
Taylor expanded in y around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower-log.f6483.8
Applied rewrites83.8%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.72e+139) (not (<= x 3.8e+73))) (* (log y) x) (- (- (log t) y) z)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.72e+139) || !(x <= 3.8e+73)) {
tmp = log(y) * x;
} else {
tmp = (log(t) - 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 ((x <= (-1.72d+139)) .or. (.not. (x <= 3.8d+73))) then
tmp = log(y) * x
else
tmp = (log(t) - y) - z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.72e+139) || !(x <= 3.8e+73)) {
tmp = Math.log(y) * x;
} else {
tmp = (Math.log(t) - y) - z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.72e+139) or not (x <= 3.8e+73): tmp = math.log(y) * x else: tmp = (math.log(t) - y) - z return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.72e+139) || !(x <= 3.8e+73)) tmp = Float64(log(y) * x); else tmp = Float64(Float64(log(t) - y) - z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.72e+139) || ~((x <= 3.8e+73))) tmp = log(y) * x; else tmp = (log(t) - y) - z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.72e+139], N[Not[LessEqual[x, 3.8e+73]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.72 \cdot 10^{+139} \lor \neg \left(x \leq 3.8 \cdot 10^{+73}\right):\\
\;\;\;\;\log y \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(\log t - y\right) - z\\
\end{array}
\end{array}
if x < -1.7199999999999999e139 or 3.80000000000000022e73 < x Initial program 99.7%
Taylor expanded in x around 0
+-commutativeN/A
associate--l+N/A
*-rgt-identityN/A
*-inversesN/A
fp-cancel-sign-subN/A
mul-1-negN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
*-commutativeN/A
remove-double-negN/A
fp-cancel-sign-subN/A
mul-1-negN/A
*-commutativeN/A
Applied rewrites99.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6474.6
Applied rewrites74.6%
if -1.7199999999999999e139 < x < 3.80000000000000022e73Initial program 100.0%
Taylor expanded in x around 0
associate--r+N/A
*-lft-identityN/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower--.f64N/A
lower-log.f6491.8
Applied rewrites91.8%
Final simplification86.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -8.5e+139) (not (<= z 3.8e+90))) (- z) (- (log t) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.5e+139) || !(z <= 3.8e+90)) {
tmp = -z;
} else {
tmp = log(t) - 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) :: tmp
if ((z <= (-8.5d+139)) .or. (.not. (z <= 3.8d+90))) then
tmp = -z
else
tmp = log(t) - y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.5e+139) || !(z <= 3.8e+90)) {
tmp = -z;
} else {
tmp = Math.log(t) - y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -8.5e+139) or not (z <= 3.8e+90): tmp = -z else: tmp = math.log(t) - y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -8.5e+139) || !(z <= 3.8e+90)) tmp = Float64(-z); else tmp = Float64(log(t) - y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -8.5e+139) || ~((z <= 3.8e+90))) tmp = -z; else tmp = log(t) - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -8.5e+139], N[Not[LessEqual[z, 3.8e+90]], $MachinePrecision]], (-z), N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+139} \lor \neg \left(z \leq 3.8 \cdot 10^{+90}\right):\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;\log t - y\\
\end{array}
\end{array}
if z < -8.5e139 or 3.8000000000000001e90 < z Initial program 99.9%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6472.2
Applied rewrites72.2%
if -8.5e139 < z < 3.8000000000000001e90Initial program 99.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower-log.f6492.6
Applied rewrites92.6%
Taylor expanded in x around 0
Applied rewrites53.6%
Final simplification60.1%
(FPCore (x y z t) :precision binary64 (if (<= y 4.2e+41) (- (log t) z) (- y)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 4.2e+41) {
tmp = log(t) - z;
} else {
tmp = -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) :: tmp
if (y <= 4.2d+41) then
tmp = log(t) - z
else
tmp = -y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 4.2e+41) {
tmp = Math.log(t) - z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 4.2e+41: tmp = math.log(t) - z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 4.2e+41) tmp = Float64(log(t) - z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 4.2e+41) tmp = log(t) - z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 4.2e+41], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], (-y)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.2 \cdot 10^{+41}:\\
\;\;\;\;\log t - z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if y < 4.1999999999999999e41Initial program 99.9%
Taylor expanded in y around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower-log.f6495.6
Applied rewrites95.6%
Taylor expanded in x around 0
Applied rewrites59.7%
if 4.1999999999999999e41 < y Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--l+N/A
*-rgt-identityN/A
*-inversesN/A
fp-cancel-sign-subN/A
mul-1-negN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
*-commutativeN/A
remove-double-negN/A
fp-cancel-sign-subN/A
mul-1-negN/A
*-commutativeN/A
Applied rewrites99.9%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6459.1
Applied rewrites59.1%
(FPCore (x y z t) :precision binary64 (if (<= y 4.2e+41) (- z) (- y)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 4.2e+41) {
tmp = -z;
} else {
tmp = -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) :: tmp
if (y <= 4.2d+41) then
tmp = -z
else
tmp = -y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 4.2e+41) {
tmp = -z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 4.2e+41: tmp = -z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 4.2e+41) tmp = Float64(-z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 4.2e+41) tmp = -z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 4.2e+41], (-z), (-y)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.2 \cdot 10^{+41}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if y < 4.1999999999999999e41Initial program 99.9%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6439.5
Applied rewrites39.5%
if 4.1999999999999999e41 < y Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--l+N/A
*-rgt-identityN/A
*-inversesN/A
fp-cancel-sign-subN/A
mul-1-negN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
*-commutativeN/A
remove-double-negN/A
fp-cancel-sign-subN/A
mul-1-negN/A
*-commutativeN/A
Applied rewrites99.9%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6459.1
Applied rewrites59.1%
(FPCore (x y z t) :precision binary64 (- y))
double code(double x, double y, double z, double t) {
return -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 = -y
end function
public static double code(double x, double y, double z, double t) {
return -y;
}
def code(x, y, z, t): return -y
function code(x, y, z, t) return Float64(-y) end
function tmp = code(x, y, z, t) tmp = -y; end
code[x_, y_, z_, t_] := (-y)
\begin{array}{l}
\\
-y
\end{array}
Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--l+N/A
*-rgt-identityN/A
*-inversesN/A
fp-cancel-sign-subN/A
mul-1-negN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
*-commutativeN/A
remove-double-negN/A
fp-cancel-sign-subN/A
mul-1-negN/A
*-commutativeN/A
Applied rewrites99.9%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6429.7
Applied rewrites29.7%
herbie shell --seed 2024320
(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)))