
(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 14 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))) (t_2 (- t_1 y)))
(if (or (<= t_2 -5e+25) (not (<= t_2 5e-79)))
(- t_1 (+ y z))
(- (log t) (+ y z)))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double t_2 = t_1 - y;
double tmp;
if ((t_2 <= -5e+25) || !(t_2 <= 5e-79)) {
tmp = t_1 - (y + z);
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * log(y)
t_2 = t_1 - y
if ((t_2 <= (-5d+25)) .or. (.not. (t_2 <= 5d-79))) then
tmp = t_1 - (y + z)
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 t_1 = x * Math.log(y);
double t_2 = t_1 - y;
double tmp;
if ((t_2 <= -5e+25) || !(t_2 <= 5e-79)) {
tmp = t_1 - (y + z);
} else {
tmp = Math.log(t) - (y + z);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) t_2 = t_1 - y tmp = 0 if (t_2 <= -5e+25) or not (t_2 <= 5e-79): tmp = t_1 - (y + z) else: tmp = math.log(t) - (y + z) return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) t_2 = Float64(t_1 - y) tmp = 0.0 if ((t_2 <= -5e+25) || !(t_2 <= 5e-79)) tmp = Float64(t_1 - Float64(y + z)); else tmp = Float64(log(t) - Float64(y + z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); t_2 = t_1 - y; tmp = 0.0; if ((t_2 <= -5e+25) || ~((t_2 <= 5e-79))) tmp = t_1 - (y + z); else tmp = log(t) - (y + z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - y), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -5e+25], N[Not[LessEqual[t$95$2, 5e-79]], $MachinePrecision]], N[(t$95$1 - N[(y + z), $MachinePrecision]), $MachinePrecision], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := t\_1 - y\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+25} \lor \neg \left(t\_2 \leq 5 \cdot 10^{-79}\right):\\
\;\;\;\;t\_1 - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -5.00000000000000024e25 or 4.99999999999999999e-79 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in z around inf 99.9%
if -5.00000000000000024e25 < (-.f64 (*.f64 x (log.f64 y)) y) < 4.99999999999999999e-79Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
Final simplification99.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (- z) y)) (t_2 (- (log t) y)))
(if (<= z -3.7e-6)
t_1
(if (<= z 3.3e-158)
t_2
(if (<= z 1e-123) (* x (log y)) (if (<= z 0.00031) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = -z - y;
double t_2 = log(t) - y;
double tmp;
if (z <= -3.7e-6) {
tmp = t_1;
} else if (z <= 3.3e-158) {
tmp = t_2;
} else if (z <= 1e-123) {
tmp = x * log(y);
} else if (z <= 0.00031) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = -z - y
t_2 = log(t) - y
if (z <= (-3.7d-6)) then
tmp = t_1
else if (z <= 3.3d-158) then
tmp = t_2
else if (z <= 1d-123) then
tmp = x * log(y)
else if (z <= 0.00031d0) then
tmp = t_2
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 = -z - y;
double t_2 = Math.log(t) - y;
double tmp;
if (z <= -3.7e-6) {
tmp = t_1;
} else if (z <= 3.3e-158) {
tmp = t_2;
} else if (z <= 1e-123) {
tmp = x * Math.log(y);
} else if (z <= 0.00031) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -z - y t_2 = math.log(t) - y tmp = 0 if z <= -3.7e-6: tmp = t_1 elif z <= 3.3e-158: tmp = t_2 elif z <= 1e-123: tmp = x * math.log(y) elif z <= 0.00031: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(-z) - y) t_2 = Float64(log(t) - y) tmp = 0.0 if (z <= -3.7e-6) tmp = t_1; elseif (z <= 3.3e-158) tmp = t_2; elseif (z <= 1e-123) tmp = Float64(x * log(y)); elseif (z <= 0.00031) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -z - y; t_2 = log(t) - y; tmp = 0.0; if (z <= -3.7e-6) tmp = t_1; elseif (z <= 3.3e-158) tmp = t_2; elseif (z <= 1e-123) tmp = x * log(y); elseif (z <= 0.00031) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[((-z) - y), $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[z, -3.7e-6], t$95$1, If[LessEqual[z, 3.3e-158], t$95$2, If[LessEqual[z, 1e-123], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.00031], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-z\right) - y\\
t_2 := \log t - y\\
\mathbf{if}\;z \leq -3.7 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-158}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 10^{-123}:\\
\;\;\;\;x \cdot \log y\\
\mathbf{elif}\;z \leq 0.00031:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.7000000000000002e-6 or 3.1e-4 < z Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in z around inf 99.7%
Taylor expanded in x around 0 78.4%
mul-1-neg78.4%
+-commutative78.4%
distribute-neg-in78.4%
sub-neg78.4%
Simplified78.4%
if -3.7000000000000002e-6 < z < 3.3000000000000002e-158 or 1.0000000000000001e-123 < z < 3.1e-4Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in x around 0 70.8%
Taylor expanded in y around inf 70.8%
if 3.3000000000000002e-158 < z < 1.0000000000000001e-123Initial program 99.5%
associate-+l-99.5%
associate--l-99.5%
Simplified99.5%
Taylor expanded in z around inf 99.5%
Taylor expanded in x around inf 99.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -8e+139)
(* x (- (log y) (/ y x)))
(if (<= x 2e+75)
(- (log t) (+ y z))
(if (<= x 3.8e+164) (- t_1 z) (- t_1 y))))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double tmp;
if (x <= -8e+139) {
tmp = x * (log(y) - (y / x));
} else if (x <= 2e+75) {
tmp = log(t) - (y + z);
} else if (x <= 3.8e+164) {
tmp = t_1 - 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 <= (-8d+139)) then
tmp = x * (log(y) - (y / x))
else if (x <= 2d+75) then
tmp = log(t) - (y + z)
else if (x <= 3.8d+164) then
tmp = t_1 - 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 <= -8e+139) {
tmp = x * (Math.log(y) - (y / x));
} else if (x <= 2e+75) {
tmp = Math.log(t) - (y + z);
} else if (x <= 3.8e+164) {
tmp = t_1 - z;
} else {
tmp = t_1 - y;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) tmp = 0 if x <= -8e+139: tmp = x * (math.log(y) - (y / x)) elif x <= 2e+75: tmp = math.log(t) - (y + z) elif x <= 3.8e+164: tmp = t_1 - 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 <= -8e+139) tmp = Float64(x * Float64(log(y) - Float64(y / x))); elseif (x <= 2e+75) tmp = Float64(log(t) - Float64(y + z)); elseif (x <= 3.8e+164) tmp = Float64(t_1 - 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 <= -8e+139) tmp = x * (log(y) - (y / x)); elseif (x <= 2e+75) tmp = log(t) - (y + z); elseif (x <= 3.8e+164) tmp = t_1 - 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, -8e+139], N[(x * N[(N[Log[y], $MachinePrecision] - N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e+75], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e+164], N[(t$95$1 - z), $MachinePrecision], N[(t$95$1 - y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -8 \cdot 10^{+139}:\\
\;\;\;\;x \cdot \left(\log y - \frac{y}{x}\right)\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+75}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+164}:\\
\;\;\;\;t\_1 - z\\
\mathbf{else}:\\
\;\;\;\;t\_1 - y\\
\end{array}
\end{array}
if x < -8.00000000000000026e139Initial program 99.7%
associate-+l-99.7%
associate--l-99.7%
Simplified99.7%
Taylor expanded in y around inf 86.9%
Taylor expanded in x around inf 86.9%
mul-1-neg86.9%
unsub-neg86.9%
Simplified86.9%
if -8.00000000000000026e139 < x < 1.99999999999999985e75Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in x around 0 96.3%
if 1.99999999999999985e75 < x < 3.80000000000000021e164Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
Taylor expanded in y around 0 93.8%
if 3.80000000000000021e164 < x Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
Taylor expanded in y around inf 93.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))) (t_2 (- t_1 y)))
(if (<= x -3.1e+141)
t_2
(if (<= x 1.65e+81)
(- (log t) (+ y z))
(if (<= x 4.3e+164) (- t_1 z) t_2)))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double t_2 = t_1 - y;
double tmp;
if (x <= -3.1e+141) {
tmp = t_2;
} else if (x <= 1.65e+81) {
tmp = log(t) - (y + z);
} else if (x <= 4.3e+164) {
tmp = t_1 - z;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = x * log(y)
t_2 = t_1 - y
if (x <= (-3.1d+141)) then
tmp = t_2
else if (x <= 1.65d+81) then
tmp = log(t) - (y + z)
else if (x <= 4.3d+164) then
tmp = t_1 - z
else
tmp = t_2
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 t_2 = t_1 - y;
double tmp;
if (x <= -3.1e+141) {
tmp = t_2;
} else if (x <= 1.65e+81) {
tmp = Math.log(t) - (y + z);
} else if (x <= 4.3e+164) {
tmp = t_1 - z;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) t_2 = t_1 - y tmp = 0 if x <= -3.1e+141: tmp = t_2 elif x <= 1.65e+81: tmp = math.log(t) - (y + z) elif x <= 4.3e+164: tmp = t_1 - z else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) t_2 = Float64(t_1 - y) tmp = 0.0 if (x <= -3.1e+141) tmp = t_2; elseif (x <= 1.65e+81) tmp = Float64(log(t) - Float64(y + z)); elseif (x <= 4.3e+164) tmp = Float64(t_1 - z); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); t_2 = t_1 - y; tmp = 0.0; if (x <= -3.1e+141) tmp = t_2; elseif (x <= 1.65e+81) tmp = log(t) - (y + z); elseif (x <= 4.3e+164) tmp = t_1 - z; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - y), $MachinePrecision]}, If[LessEqual[x, -3.1e+141], t$95$2, If[LessEqual[x, 1.65e+81], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.3e+164], N[(t$95$1 - z), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := t\_1 - y\\
\mathbf{if}\;x \leq -3.1 \cdot 10^{+141}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{+81}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{+164}:\\
\;\;\;\;t\_1 - z\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -3.10000000000000004e141 or 4.3e164 < x Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
Taylor expanded in y around inf 90.0%
if -3.10000000000000004e141 < x < 1.65e81Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in x around 0 96.3%
if 1.65e81 < x < 4.3e164Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
Taylor expanded in y around 0 93.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (log t) z)))
(if (<= y 1.65e-255)
t_1
(if (<= y 3.7e-241) (* x (log y)) (if (<= y 82000.0) t_1 (- (- z) y))))))
double code(double x, double y, double z, double t) {
double t_1 = log(t) - z;
double tmp;
if (y <= 1.65e-255) {
tmp = t_1;
} else if (y <= 3.7e-241) {
tmp = x * log(y);
} else if (y <= 82000.0) {
tmp = t_1;
} else {
tmp = -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 = log(t) - z
if (y <= 1.65d-255) then
tmp = t_1
else if (y <= 3.7d-241) then
tmp = x * log(y)
else if (y <= 82000.0d0) then
tmp = t_1
else
tmp = -z - y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.log(t) - z;
double tmp;
if (y <= 1.65e-255) {
tmp = t_1;
} else if (y <= 3.7e-241) {
tmp = x * Math.log(y);
} else if (y <= 82000.0) {
tmp = t_1;
} else {
tmp = -z - y;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.log(t) - z tmp = 0 if y <= 1.65e-255: tmp = t_1 elif y <= 3.7e-241: tmp = x * math.log(y) elif y <= 82000.0: tmp = t_1 else: tmp = -z - y return tmp
function code(x, y, z, t) t_1 = Float64(log(t) - z) tmp = 0.0 if (y <= 1.65e-255) tmp = t_1; elseif (y <= 3.7e-241) tmp = Float64(x * log(y)); elseif (y <= 82000.0) tmp = t_1; else tmp = Float64(Float64(-z) - y); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = log(t) - z; tmp = 0.0; if (y <= 1.65e-255) tmp = t_1; elseif (y <= 3.7e-241) tmp = x * log(y); elseif (y <= 82000.0) tmp = t_1; else tmp = -z - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[y, 1.65e-255], t$95$1, If[LessEqual[y, 3.7e-241], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 82000.0], t$95$1, N[((-z) - y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log t - z\\
\mathbf{if}\;y \leq 1.65 \cdot 10^{-255}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-241}:\\
\;\;\;\;x \cdot \log y\\
\mathbf{elif}\;y \leq 82000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(-z\right) - y\\
\end{array}
\end{array}
if y < 1.64999999999999994e-255 or 3.6999999999999999e-241 < y < 82000Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in x around 0 67.6%
Taylor expanded in y around 0 66.9%
if 1.64999999999999994e-255 < y < 3.6999999999999999e-241Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
Taylor expanded in x around inf 86.1%
if 82000 < y Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in z around inf 99.7%
Taylor expanded in x around 0 80.3%
mul-1-neg80.3%
+-commutative80.3%
distribute-neg-in80.3%
sub-neg80.3%
Simplified80.3%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.9e+140) (not (<= x 2.1e+170))) (- (* x (log y)) y) (- (log t) (+ y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.9e+140) || !(x <= 2.1e+170)) {
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.9d+140)) .or. (.not. (x <= 2.1d+170))) 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.9e+140) || !(x <= 2.1e+170)) {
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.9e+140) or not (x <= 2.1e+170): 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.9e+140) || !(x <= 2.1e+170)) 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.9e+140) || ~((x <= 2.1e+170))) 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.9e+140], N[Not[LessEqual[x, 2.1e+170]], $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.9 \cdot 10^{+140} \lor \neg \left(x \leq 2.1 \cdot 10^{+170}\right):\\
\;\;\;\;x \cdot \log y - y\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\end{array}
if x < -1.9e140 or 2.09999999999999998e170 < x Initial program 99.7%
associate-+l-99.7%
associate--l-99.7%
Simplified99.7%
Taylor expanded in y around inf 91.0%
if -1.9e140 < x < 2.09999999999999998e170Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in x around 0 92.6%
Final simplification92.1%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.2e+143) (not (<= x 1.45e+171))) (* x (log y)) (- (log t) (+ y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.2e+143) || !(x <= 1.45e+171)) {
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 <= (-1.2d+143)) .or. (.not. (x <= 1.45d+171))) 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 <= -1.2e+143) || !(x <= 1.45e+171)) {
tmp = x * Math.log(y);
} else {
tmp = Math.log(t) - (y + z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.2e+143) or not (x <= 1.45e+171): 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 <= -1.2e+143) || !(x <= 1.45e+171)) 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 <= -1.2e+143) || ~((x <= 1.45e+171))) tmp = x * log(y); else tmp = log(t) - (y + z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.2e+143], N[Not[LessEqual[x, 1.45e+171]], $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 -1.2 \cdot 10^{+143} \lor \neg \left(x \leq 1.45 \cdot 10^{+171}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\end{array}
if x < -1.1999999999999999e143 or 1.44999999999999992e171 < x Initial program 99.7%
associate-+l-99.7%
associate--l-99.7%
Simplified99.7%
Taylor expanded in z around inf 99.7%
Taylor expanded in x around inf 75.7%
if -1.1999999999999999e143 < x < 1.44999999999999992e171Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in x around 0 92.6%
Final simplification87.8%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.85e+140) (not (<= x 1.4e+197))) (* x (log y)) (- (- z) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.85e+140) || !(x <= 1.4e+197)) {
tmp = x * log(y);
} else {
tmp = -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) :: tmp
if ((x <= (-2.85d+140)) .or. (.not. (x <= 1.4d+197))) then
tmp = x * log(y)
else
tmp = -z - y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.85e+140) || !(x <= 1.4e+197)) {
tmp = x * Math.log(y);
} else {
tmp = -z - y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2.85e+140) or not (x <= 1.4e+197): tmp = x * math.log(y) else: tmp = -z - y return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -2.85e+140) || !(x <= 1.4e+197)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(-z) - y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -2.85e+140) || ~((x <= 1.4e+197))) tmp = x * log(y); else tmp = -z - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.85e+140], N[Not[LessEqual[x, 1.4e+197]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[((-z) - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.85 \cdot 10^{+140} \lor \neg \left(x \leq 1.4 \cdot 10^{+197}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\left(-z\right) - y\\
\end{array}
\end{array}
if x < -2.85000000000000007e140 or 1.3999999999999999e197 < x Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
Taylor expanded in z around inf 99.8%
Taylor expanded in x around inf 78.9%
if -2.85000000000000007e140 < x < 1.3999999999999999e197Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in z around inf 81.0%
Taylor expanded in x around 0 71.9%
mul-1-neg71.9%
+-commutative71.9%
distribute-neg-in71.9%
sub-neg71.9%
Simplified71.9%
Final simplification73.7%
(FPCore (x y z t) :precision binary64 (if (<= y 8e-195) (- z) (if (<= y 1.25e-119) (log t) (- (- z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 8e-195) {
tmp = -z;
} else if (y <= 1.25e-119) {
tmp = log(t);
} else {
tmp = -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) :: tmp
if (y <= 8d-195) then
tmp = -z
else if (y <= 1.25d-119) then
tmp = log(t)
else
tmp = -z - y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 8e-195) {
tmp = -z;
} else if (y <= 1.25e-119) {
tmp = Math.log(t);
} else {
tmp = -z - y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 8e-195: tmp = -z elif y <= 1.25e-119: tmp = math.log(t) else: tmp = -z - y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 8e-195) tmp = Float64(-z); elseif (y <= 1.25e-119) tmp = log(t); else tmp = Float64(Float64(-z) - y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 8e-195) tmp = -z; elseif (y <= 1.25e-119) tmp = log(t); else tmp = -z - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 8e-195], (-z), If[LessEqual[y, 1.25e-119], N[Log[t], $MachinePrecision], N[((-z) - y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 8 \cdot 10^{-195}:\\
\;\;\;\;-z\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-119}:\\
\;\;\;\;\log t\\
\mathbf{else}:\\
\;\;\;\;\left(-z\right) - y\\
\end{array}
\end{array}
if y < 8.0000000000000007e-195Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in z around inf 79.6%
Taylor expanded in z around inf 38.9%
neg-mul-138.9%
Simplified38.9%
if 8.0000000000000007e-195 < y < 1.24999999999999998e-119Initial program 99.9%
sub-neg99.9%
associate--l+99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around inf 49.7%
mul-1-neg49.7%
Simplified49.7%
Taylor expanded in y around 0 49.7%
if 1.24999999999999998e-119 < y Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in z around inf 92.9%
Taylor expanded in x around 0 70.6%
mul-1-neg70.6%
+-commutative70.6%
distribute-neg-in70.6%
sub-neg70.6%
Simplified70.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.3e+86) (not (<= z 1.7e+54))) (- z) (- y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.3e+86) || !(z <= 1.7e+54)) {
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 <= (-3.3d+86)) .or. (.not. (z <= 1.7d+54))) 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 <= -3.3e+86) || !(z <= 1.7e+54)) {
tmp = -z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.3e+86) or not (z <= 1.7e+54): tmp = -z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.3e+86) || !(z <= 1.7e+54)) tmp = Float64(-z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3.3e+86) || ~((z <= 1.7e+54))) tmp = -z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.3e+86], N[Not[LessEqual[z, 1.7e+54]], $MachinePrecision]], (-z), (-y)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+86} \lor \neg \left(z \leq 1.7 \cdot 10^{+54}\right):\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if z < -3.2999999999999999e86 or 1.7e54 < z Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
Taylor expanded in z around inf 72.6%
neg-mul-172.6%
Simplified72.6%
if -3.2999999999999999e86 < z < 1.7e54Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in z around inf 77.5%
Taylor expanded in y around inf 41.8%
mul-1-neg41.8%
Simplified41.8%
Final simplification53.1%
(FPCore (x y z t) :precision binary64 (- (- z) y))
double code(double x, double y, double z, double t) {
return -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 = -z - y
end function
public static double code(double x, double y, double z, double t) {
return -z - y;
}
def code(x, y, z, t): return -z - y
function code(x, y, z, t) return Float64(Float64(-z) - y) end
function tmp = code(x, y, z, t) tmp = -z - y; end
code[x_, y_, z_, t_] := N[((-z) - y), $MachinePrecision]
\begin{array}{l}
\\
\left(-z\right) - y
\end{array}
Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in z around inf 85.8%
Taylor expanded in x around 0 58.7%
mul-1-neg58.7%
+-commutative58.7%
distribute-neg-in58.7%
sub-neg58.7%
Simplified58.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 z around inf 85.8%
Taylor expanded in y around inf 30.5%
mul-1-neg30.5%
Simplified30.5%
(FPCore (x y z t) :precision binary64 z)
double code(double x, double y, double z, double t) {
return 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 = z
end function
public static double code(double x, double y, double z, double t) {
return z;
}
def code(x, y, z, t): return z
function code(x, y, z, t) return z end
function tmp = code(x, y, z, t) tmp = z; end
code[x_, y_, z_, t_] := z
\begin{array}{l}
\\
z
\end{array}
Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in z around inf 85.8%
Taylor expanded in z around inf 30.1%
neg-mul-130.1%
Simplified30.1%
neg-sub030.1%
sub-neg30.1%
add-sqr-sqrt14.7%
sqrt-unprod5.8%
sqr-neg5.8%
sqrt-unprod0.7%
add-sqr-sqrt2.1%
Applied egg-rr2.1%
+-lft-identity2.1%
Simplified2.1%
herbie shell --seed 2024110
(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)))