
(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 10 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 x (log y) (- (- y) z)) (log t)))
double code(double x, double y, double z, double t) {
return fma(x, log(y), (-y - z)) + log(t);
}
function code(x, y, z, t) return Float64(fma(x, log(y), Float64(Float64(-y) - z)) + log(t)) end
code[x_, y_, z_, t_] := N[(N[(x * N[Log[y], $MachinePrecision] + N[((-y) - z), $MachinePrecision]), $MachinePrecision] + N[Log[t], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, \log y, \left(-y\right) - z\right) + \log t
\end{array}
Initial program 99.8%
sub-neg99.8%
associate--l+99.8%
fma-def99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x (log y)) y)))
(if (or (<= t_1 -5e+35) (not (<= t_1 0.0001)))
(- t_1 z)
(- (- (log t) z) y))))
double code(double x, double y, double z, double t) {
double t_1 = (x * log(y)) - y;
double tmp;
if ((t_1 <= -5e+35) || !(t_1 <= 0.0001)) {
tmp = t_1 - z;
} else {
tmp = (log(t) - 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)) - y
if ((t_1 <= (-5d+35)) .or. (.not. (t_1 <= 0.0001d0))) then
tmp = t_1 - z
else
tmp = (log(t) - 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)) - y;
double tmp;
if ((t_1 <= -5e+35) || !(t_1 <= 0.0001)) {
tmp = t_1 - z;
} else {
tmp = (Math.log(t) - z) - y;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * math.log(y)) - y tmp = 0 if (t_1 <= -5e+35) or not (t_1 <= 0.0001): tmp = t_1 - z else: tmp = (math.log(t) - z) - y return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * log(y)) - y) tmp = 0.0 if ((t_1 <= -5e+35) || !(t_1 <= 0.0001)) tmp = Float64(t_1 - z); else tmp = Float64(Float64(log(t) - z) - y); 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+35) || ~((t_1 <= 0.0001))) tmp = t_1 - z; else tmp = (log(t) - z) - y; 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[Or[LessEqual[t$95$1, -5e+35], N[Not[LessEqual[t$95$1, 0.0001]], $MachinePrecision]], N[(t$95$1 - z), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision] - y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y - y\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+35} \lor \neg \left(t_1 \leq 0.0001\right):\\
\;\;\;\;t_1 - z\\
\mathbf{else}:\\
\;\;\;\;\left(\log t - z\right) - y\\
\end{array}
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -5.00000000000000021e35 or 1.00000000000000005e-4 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.8%
associate-+l-99.8%
Simplified99.8%
Taylor expanded in z around inf 99.6%
if -5.00000000000000021e35 < (-.f64 (*.f64 x (log.f64 y)) y) < 1.00000000000000005e-4Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
sub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
unsub-neg100.0%
fma-udef100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
+-commutative100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 99.3%
Final simplification99.5%
(FPCore (x y z t) :precision binary64 (+ (log t) (- (- (* x (log y)) y) z)))
double code(double x, double y, double z, double t) {
return log(t) + (((x * log(y)) - y) - z);
}
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) + (((x * log(y)) - y) - z)
end function
public static double code(double x, double y, double z, double t) {
return Math.log(t) + (((x * Math.log(y)) - y) - z);
}
def code(x, y, z, t): return math.log(t) + (((x * math.log(y)) - y) - z)
function code(x, y, z, t) return Float64(log(t) + Float64(Float64(Float64(x * log(y)) - y) - z)) end
function tmp = code(x, y, z, t) tmp = log(t) + (((x * log(y)) - y) - z); end
code[x_, y_, z_, t_] := N[(N[Log[t], $MachinePrecision] + N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log t + \left(\left(x \cdot \log y - y\right) - z\right)
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.8e+34)
(- z)
(if (<= z -2.8e-87)
(- y)
(if (<= z -6.9e-100) (log t) (if (<= z 3.1e+100) (- y) (- z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.8e+34) {
tmp = -z;
} else if (z <= -2.8e-87) {
tmp = -y;
} else if (z <= -6.9e-100) {
tmp = log(t);
} else if (z <= 3.1e+100) {
tmp = -y;
} else {
tmp = -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 (z <= (-1.8d+34)) then
tmp = -z
else if (z <= (-2.8d-87)) then
tmp = -y
else if (z <= (-6.9d-100)) then
tmp = log(t)
else if (z <= 3.1d+100) then
tmp = -y
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.8e+34) {
tmp = -z;
} else if (z <= -2.8e-87) {
tmp = -y;
} else if (z <= -6.9e-100) {
tmp = Math.log(t);
} else if (z <= 3.1e+100) {
tmp = -y;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.8e+34: tmp = -z elif z <= -2.8e-87: tmp = -y elif z <= -6.9e-100: tmp = math.log(t) elif z <= 3.1e+100: tmp = -y else: tmp = -z return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.8e+34) tmp = Float64(-z); elseif (z <= -2.8e-87) tmp = Float64(-y); elseif (z <= -6.9e-100) tmp = log(t); elseif (z <= 3.1e+100) tmp = Float64(-y); else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.8e+34) tmp = -z; elseif (z <= -2.8e-87) tmp = -y; elseif (z <= -6.9e-100) tmp = log(t); elseif (z <= 3.1e+100) tmp = -y; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.8e+34], (-z), If[LessEqual[z, -2.8e-87], (-y), If[LessEqual[z, -6.9e-100], N[Log[t], $MachinePrecision], If[LessEqual[z, 3.1e+100], (-y), (-z)]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+34}:\\
\;\;\;\;-z\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-87}:\\
\;\;\;\;-y\\
\mathbf{elif}\;z \leq -6.9 \cdot 10^{-100}:\\
\;\;\;\;\log t\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+100}:\\
\;\;\;\;-y\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if z < -1.8e34 or 3.10000000000000007e100 < z Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
sub-neg99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
unsub-neg99.9%
fma-udef99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x around 0 76.0%
Taylor expanded in z around inf 60.0%
neg-mul-160.0%
Simplified60.0%
if -1.8e34 < z < -2.8000000000000001e-87 or -6.9e-100 < z < 3.10000000000000007e100Initial program 99.8%
associate-+l-99.8%
Simplified99.8%
add-cube-cbrt99.3%
pow399.2%
Applied egg-rr99.2%
rem-cube-cbrt99.8%
*-commutative99.8%
add-sqr-sqrt50.2%
associate-*r*50.2%
Applied egg-rr50.2%
Taylor expanded in y around inf 44.2%
neg-mul-144.2%
Simplified44.2%
if -2.8000000000000001e-87 < z < -6.9e-100Initial program 100.0%
sub-neg100.0%
associate--l+100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
Final simplification52.3%
(FPCore (x y z t) :precision binary64 (if (or (<= z -7.5e+101) (not (<= z 1.4e+103))) (- z) (- (log t) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -7.5e+101) || !(z <= 1.4e+103)) {
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 <= (-7.5d+101)) .or. (.not. (z <= 1.4d+103))) 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 <= -7.5e+101) || !(z <= 1.4e+103)) {
tmp = -z;
} else {
tmp = Math.log(t) - y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -7.5e+101) or not (z <= 1.4e+103): tmp = -z else: tmp = math.log(t) - y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -7.5e+101) || !(z <= 1.4e+103)) 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 <= -7.5e+101) || ~((z <= 1.4e+103))) tmp = -z; else tmp = log(t) - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -7.5e+101], N[Not[LessEqual[z, 1.4e+103]], $MachinePrecision]], (-z), N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+101} \lor \neg \left(z \leq 1.4 \cdot 10^{+103}\right):\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;\log t - y\\
\end{array}
\end{array}
if z < -7.4999999999999995e101 or 1.40000000000000004e103 < z Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
unsub-neg99.8%
fma-udef99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x around 0 79.4%
Taylor expanded in z around inf 66.6%
neg-mul-166.6%
Simplified66.6%
if -7.4999999999999995e101 < z < 1.40000000000000004e103Initial program 99.8%
sub-neg99.8%
associate--l+99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in y around inf 59.6%
mul-1-neg59.6%
Simplified59.6%
Taylor expanded in y around 0 59.6%
mul-1-neg59.6%
sub-neg59.6%
Simplified59.6%
Final simplification62.0%
(FPCore (x y z t) :precision binary64 (if (<= z -6.1e+101) (+ (log t) (- y z)) (if (<= z 1.6e+104) (- (log t) y) (- z))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.1e+101) {
tmp = log(t) + (y - z);
} else if (z <= 1.6e+104) {
tmp = log(t) - y;
} else {
tmp = -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 (z <= (-6.1d+101)) then
tmp = log(t) + (y - z)
else if (z <= 1.6d+104) then
tmp = log(t) - y
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.1e+101) {
tmp = Math.log(t) + (y - z);
} else if (z <= 1.6e+104) {
tmp = Math.log(t) - y;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.1e+101: tmp = math.log(t) + (y - z) elif z <= 1.6e+104: tmp = math.log(t) - y else: tmp = -z return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.1e+101) tmp = Float64(log(t) + Float64(y - z)); elseif (z <= 1.6e+104) tmp = Float64(log(t) - y); else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.1e+101) tmp = log(t) + (y - z); elseif (z <= 1.6e+104) tmp = log(t) - y; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.1e+101], N[(N[Log[t], $MachinePrecision] + N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+104], N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision], (-z)]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.1 \cdot 10^{+101}:\\
\;\;\;\;\log t + \left(y - z\right)\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+104}:\\
\;\;\;\;\log t - y\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if z < -6.09999999999999992e101Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
sub-neg99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
unsub-neg99.9%
fma-udef99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x around 0 82.5%
sub-neg82.5%
add-sqr-sqrt0.0%
sqrt-unprod56.8%
sqr-neg56.8%
sqrt-unprod67.8%
add-sqr-sqrt67.8%
+-commutative67.8%
Applied egg-rr67.8%
+-commutative67.8%
associate-+l-67.8%
Simplified67.8%
if -6.09999999999999992e101 < z < 1.6e104Initial program 99.8%
sub-neg99.8%
associate--l+99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in y around inf 59.6%
mul-1-neg59.6%
Simplified59.6%
Taylor expanded in y around 0 59.6%
mul-1-neg59.6%
sub-neg59.6%
Simplified59.6%
if 1.6e104 < z Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
unsub-neg99.8%
fma-udef99.8%
neg-sub099.8%
associate-+l-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 76.4%
Taylor expanded in z around inf 65.4%
neg-mul-165.4%
Simplified65.4%
Final simplification62.0%
(FPCore (x y z t) :precision binary64 (- (- (log t) z) y))
double code(double x, double y, double z, double t) {
return (log(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 = (log(t) - z) - y
end function
public static double code(double x, double y, double z, double t) {
return (Math.log(t) - z) - y;
}
def code(x, y, z, t): return (math.log(t) - z) - y
function code(x, y, z, t) return Float64(Float64(log(t) - z) - y) end
function tmp = code(x, y, z, t) tmp = (log(t) - z) - y; end
code[x_, y_, z_, t_] := N[(N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision] - y), $MachinePrecision]
\begin{array}{l}
\\
\left(\log t - z\right) - y
\end{array}
Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
unsub-neg99.8%
fma-udef99.8%
neg-sub099.8%
associate-+l-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 70.5%
Final simplification70.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.06e+34) (not (<= z 1.05e+101))) (- z) (- y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.06e+34) || !(z <= 1.05e+101)) {
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 ((z <= (-1.06d+34)) .or. (.not. (z <= 1.05d+101))) 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 ((z <= -1.06e+34) || !(z <= 1.05e+101)) {
tmp = -z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.06e+34) or not (z <= 1.05e+101): tmp = -z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.06e+34) || !(z <= 1.05e+101)) tmp = Float64(-z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.06e+34) || ~((z <= 1.05e+101))) tmp = -z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.06e+34], N[Not[LessEqual[z, 1.05e+101]], $MachinePrecision]], (-z), (-y)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.06 \cdot 10^{+34} \lor \neg \left(z \leq 1.05 \cdot 10^{+101}\right):\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if z < -1.06000000000000005e34 or 1.05e101 < z Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
sub-neg99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
unsub-neg99.9%
fma-udef99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x around 0 76.0%
Taylor expanded in z around inf 60.0%
neg-mul-160.0%
Simplified60.0%
if -1.06000000000000005e34 < z < 1.05e101Initial program 99.8%
associate-+l-99.8%
Simplified99.8%
add-cube-cbrt99.3%
pow399.3%
Applied egg-rr99.3%
rem-cube-cbrt99.8%
*-commutative99.8%
add-sqr-sqrt50.9%
associate-*r*50.9%
Applied egg-rr50.9%
Taylor expanded in y around inf 42.6%
neg-mul-142.6%
Simplified42.6%
Final simplification50.0%
(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.8%
associate-+l-99.8%
Simplified99.8%
add-cube-cbrt99.4%
pow399.4%
Applied egg-rr99.4%
rem-cube-cbrt99.8%
*-commutative99.8%
add-sqr-sqrt50.7%
associate-*r*50.7%
Applied egg-rr50.7%
Taylor expanded in y around inf 30.9%
neg-mul-130.9%
Simplified30.9%
Final simplification30.9%
(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 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.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
unsub-neg99.8%
fma-udef99.8%
neg-sub099.8%
associate-+l-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 70.5%
sub-neg70.5%
add-sqr-sqrt0.0%
sqrt-unprod34.4%
sqr-neg34.4%
sqrt-unprod39.8%
add-sqr-sqrt39.8%
+-commutative39.8%
Applied egg-rr39.8%
+-commutative39.8%
associate-+l-39.8%
Simplified39.8%
Taylor expanded in y around inf 2.2%
Final simplification2.2%
herbie shell --seed 2024010
(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)))