
(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 (+ (- (- (* 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}
Initial program 99.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -1.55e+93)
t_1
(if (<= x 1.1e-115)
(- (log t) z)
(if (<= x 5.9e+41) (- (log t) y) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double tmp;
if (x <= -1.55e+93) {
tmp = t_1;
} else if (x <= 1.1e-115) {
tmp = log(t) - z;
} else if (x <= 5.9e+41) {
tmp = log(t) - y;
} else {
tmp = t_1;
}
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 (x <= (-1.55d+93)) then
tmp = t_1
else if (x <= 1.1d-115) then
tmp = log(t) - z
else if (x <= 5.9d+41) then
tmp = log(t) - y
else
tmp = t_1
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 (x <= -1.55e+93) {
tmp = t_1;
} else if (x <= 1.1e-115) {
tmp = Math.log(t) - z;
} else if (x <= 5.9e+41) {
tmp = Math.log(t) - y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) tmp = 0 if x <= -1.55e+93: tmp = t_1 elif x <= 1.1e-115: tmp = math.log(t) - z elif x <= 5.9e+41: tmp = math.log(t) - y else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -1.55e+93) tmp = t_1; elseif (x <= 1.1e-115) tmp = Float64(log(t) - z); elseif (x <= 5.9e+41) tmp = Float64(log(t) - y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); tmp = 0.0; if (x <= -1.55e+93) tmp = t_1; elseif (x <= 1.1e-115) tmp = log(t) - z; elseif (x <= 5.9e+41) tmp = log(t) - y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.55e+93], t$95$1, If[LessEqual[x, 1.1e-115], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], If[LessEqual[x, 5.9e+41], N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.55 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{-115}:\\
\;\;\;\;\log t - z\\
\mathbf{elif}\;x \leq 5.9 \cdot 10^{+41}:\\
\;\;\;\;\log t - y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.5500000000000001e93 or 5.9000000000000001e41 < x Initial program 99.7%
associate-+l-99.7%
associate--l-99.7%
Simplified99.7%
Taylor expanded in z around inf 84.0%
Taylor expanded in x around inf 66.8%
if -1.5500000000000001e93 < x < 1.1e-115Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 94.7%
+-commutative94.7%
associate--r+94.7%
Simplified94.7%
Taylor expanded in y around 0 68.5%
if 1.1e-115 < x < 5.9000000000000001e41Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 92.7%
+-commutative92.7%
associate--r+92.7%
Simplified92.7%
Taylor expanded in z around 0 69.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -3.9e+87)
t_1
(if (<= x 8.8e-108) (- z) (if (<= x 7.5e+40) (- y) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double tmp;
if (x <= -3.9e+87) {
tmp = t_1;
} else if (x <= 8.8e-108) {
tmp = -z;
} else if (x <= 7.5e+40) {
tmp = -y;
} else {
tmp = t_1;
}
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 (x <= (-3.9d+87)) then
tmp = t_1
else if (x <= 8.8d-108) then
tmp = -z
else if (x <= 7.5d+40) then
tmp = -y
else
tmp = t_1
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 (x <= -3.9e+87) {
tmp = t_1;
} else if (x <= 8.8e-108) {
tmp = -z;
} else if (x <= 7.5e+40) {
tmp = -y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) tmp = 0 if x <= -3.9e+87: tmp = t_1 elif x <= 8.8e-108: tmp = -z elif x <= 7.5e+40: tmp = -y else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -3.9e+87) tmp = t_1; elseif (x <= 8.8e-108) tmp = Float64(-z); elseif (x <= 7.5e+40) tmp = Float64(-y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); tmp = 0.0; if (x <= -3.9e+87) tmp = t_1; elseif (x <= 8.8e-108) tmp = -z; elseif (x <= 7.5e+40) tmp = -y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.9e+87], t$95$1, If[LessEqual[x, 8.8e-108], (-z), If[LessEqual[x, 7.5e+40], (-y), t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -3.9 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{-108}:\\
\;\;\;\;-z\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+40}:\\
\;\;\;\;-y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.9000000000000002e87 or 7.4999999999999996e40 < x Initial program 99.7%
associate-+l-99.7%
associate--l-99.7%
Simplified99.7%
Taylor expanded in z around inf 84.3%
Taylor expanded in x around inf 66.5%
if -3.9000000000000002e87 < x < 8.8000000000000005e-108Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in z around inf 47.5%
mul-1-neg47.5%
Simplified47.5%
if 8.8000000000000005e-108 < x < 7.4999999999999996e40Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in y around inf 55.3%
mul-1-neg55.3%
Simplified55.3%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.85e+92) (not (<= x 3.4e+15))) (- (* x (log y)) y) (- (log t) (+ y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.85e+92) || !(x <= 3.4e+15)) {
tmp = (x * log(y)) - y;
} 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.85d+92)) .or. (.not. (x <= 3.4d+15))) then
tmp = (x * log(y)) - y
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.85e+92) || !(x <= 3.4e+15)) {
tmp = (x * Math.log(y)) - y;
} else {
tmp = Math.log(t) - (y + z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.85e+92) or not (x <= 3.4e+15): tmp = (x * math.log(y)) - y else: tmp = math.log(t) - (y + z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.85e+92) || !(x <= 3.4e+15)) tmp = Float64(Float64(x * log(y)) - y); else tmp = Float64(log(t) - Float64(y + z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.85e+92) || ~((x <= 3.4e+15))) tmp = (x * log(y)) - y; else tmp = log(t) - (y + z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.85e+92], N[Not[LessEqual[x, 3.4e+15]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{+92} \lor \neg \left(x \leq 3.4 \cdot 10^{+15}\right):\\
\;\;\;\;x \cdot \log y - y\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\end{array}
if x < -1.84999999999999999e92 or 3.4e15 < x Initial program 99.7%
associate-+l-99.7%
associate--l-99.7%
Simplified99.7%
Taylor expanded in y around inf 83.3%
if -1.84999999999999999e92 < x < 3.4e15Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in x around 0 94.7%
Final simplification90.0%
(FPCore (x y z t) :precision binary64 (if (or (<= x -3.2e+92) (not (<= x 1.15e+181))) (* x (log y)) (- (log t) (+ y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3.2e+92) || !(x <= 1.15e+181)) {
tmp = x * log(y);
} 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 <= (-3.2d+92)) .or. (.not. (x <= 1.15d+181))) then
tmp = x * log(y)
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 <= -3.2e+92) || !(x <= 1.15e+181)) {
tmp = x * Math.log(y);
} else {
tmp = Math.log(t) - (y + z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -3.2e+92) or not (x <= 1.15e+181): tmp = x * math.log(y) else: tmp = math.log(t) - (y + z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -3.2e+92) || !(x <= 1.15e+181)) tmp = Float64(x * log(y)); else tmp = Float64(log(t) - Float64(y + z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -3.2e+92) || ~((x <= 1.15e+181))) tmp = x * log(y); else tmp = log(t) - (y + z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -3.2e+92], N[Not[LessEqual[x, 1.15e+181]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{+92} \lor \neg \left(x \leq 1.15 \cdot 10^{+181}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\end{array}
if x < -3.20000000000000025e92 or 1.1499999999999999e181 < x Initial program 99.6%
associate-+l-99.6%
associate--l-99.6%
Simplified99.6%
Taylor expanded in z around inf 87.1%
Taylor expanded in x around inf 78.0%
if -3.20000000000000025e92 < x < 1.1499999999999999e181Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in x around 0 87.7%
Final simplification85.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -1.02e+39)
(- t_1 z)
(if (<= x 3.4e+16) (- (log t) (+ y z)) (- t_1 y)))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double tmp;
if (x <= -1.02e+39) {
tmp = t_1 - z;
} else if (x <= 3.4e+16) {
tmp = log(t) - (y + z);
} else {
tmp = t_1 - 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 (x <= (-1.02d+39)) then
tmp = t_1 - z
else if (x <= 3.4d+16) then
tmp = log(t) - (y + z)
else
tmp = t_1 - 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 (x <= -1.02e+39) {
tmp = t_1 - z;
} else if (x <= 3.4e+16) {
tmp = Math.log(t) - (y + z);
} else {
tmp = t_1 - y;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) tmp = 0 if x <= -1.02e+39: tmp = t_1 - z elif x <= 3.4e+16: tmp = math.log(t) - (y + z) else: tmp = t_1 - y return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -1.02e+39) tmp = Float64(t_1 - z); elseif (x <= 3.4e+16) tmp = Float64(log(t) - Float64(y + z)); else tmp = Float64(t_1 - y); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); tmp = 0.0; if (x <= -1.02e+39) tmp = t_1 - z; elseif (x <= 3.4e+16) tmp = log(t) - (y + z); else tmp = t_1 - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.02e+39], N[(t$95$1 - z), $MachinePrecision], If[LessEqual[x, 3.4e+16], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.02 \cdot 10^{+39}:\\
\;\;\;\;t\_1 - z\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{+16}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 - y\\
\end{array}
\end{array}
if x < -1.02e39Initial program 99.6%
associate-+l-99.6%
associate--l-99.6%
Simplified99.6%
Taylor expanded in z around inf 91.7%
if -1.02e39 < x < 3.4e16Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in x around 0 98.3%
if 3.4e16 < x Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
Taylor expanded in y around inf 80.4%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2.7e+16) (not (<= z 3.5e+25))) (- z) (- (log t) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.7e+16) || !(z <= 3.5e+25)) {
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 <= (-2.7d+16)) .or. (.not. (z <= 3.5d+25))) 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 <= -2.7e+16) || !(z <= 3.5e+25)) {
tmp = -z;
} else {
tmp = Math.log(t) - y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2.7e+16) or not (z <= 3.5e+25): tmp = -z else: tmp = math.log(t) - y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2.7e+16) || !(z <= 3.5e+25)) 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 <= -2.7e+16) || ~((z <= 3.5e+25))) tmp = -z; else tmp = log(t) - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.7e+16], N[Not[LessEqual[z, 3.5e+25]], $MachinePrecision]], (-z), N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+16} \lor \neg \left(z \leq 3.5 \cdot 10^{+25}\right):\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;\log t - y\\
\end{array}
\end{array}
if z < -2.7e16 or 3.49999999999999999e25 < z Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in z around inf 66.3%
mul-1-neg66.3%
Simplified66.3%
if -2.7e16 < z < 3.49999999999999999e25Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
add-cbrt-cube99.6%
pow399.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 60.7%
+-commutative60.7%
associate--r+60.7%
Simplified60.7%
Taylor expanded in z around 0 59.7%
Final simplification62.9%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4.8e+21) (not (<= z 2.6e+30))) (- z) (- y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.8e+21) || !(z <= 2.6e+30)) {
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 <= (-4.8d+21)) .or. (.not. (z <= 2.6d+30))) 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 <= -4.8e+21) || !(z <= 2.6e+30)) {
tmp = -z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4.8e+21) or not (z <= 2.6e+30): tmp = -z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -4.8e+21) || !(z <= 2.6e+30)) tmp = Float64(-z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -4.8e+21) || ~((z <= 2.6e+30))) tmp = -z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.8e+21], N[Not[LessEqual[z, 2.6e+30]], $MachinePrecision]], (-z), (-y)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+21} \lor \neg \left(z \leq 2.6 \cdot 10^{+30}\right):\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if z < -4.8e21 or 2.59999999999999988e30 < z Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in z around inf 66.3%
mul-1-neg66.3%
Simplified66.3%
if -4.8e21 < z < 2.59999999999999988e30Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
Taylor expanded in y around inf 35.7%
mul-1-neg35.7%
Simplified35.7%
Final simplification50.7%
(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%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in y around inf 25.9%
mul-1-neg25.9%
Simplified25.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.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in y around inf 25.9%
mul-1-neg25.9%
Simplified25.9%
add-sqr-sqrt0.0%
sqrt-unprod2.3%
sqr-neg2.3%
sqrt-unprod2.3%
add-sqr-sqrt2.3%
*-un-lft-identity2.3%
Applied egg-rr2.3%
*-lft-identity2.3%
Simplified2.3%
herbie shell --seed 2024186
(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)))