mirror of
https://github.com/dlang/phobos.git
synced 2025-05-01 07:30:33 +03:00
minor
This commit is contained in:
parent
cb817dd1c8
commit
04a3e40b2e
1 changed files with 2 additions and 2 deletions
|
@ -272,7 +272,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnType!(ElementType!(Range))
|
ReturnType!(ElementType!(Range))
|
||||||
reduce(Range)(Range r)
|
reduce(Range)(Range r) if (isInputRange!Range)
|
||||||
{
|
{
|
||||||
static if (fun.length == 1)
|
static if (fun.length == 1)
|
||||||
auto e = r.front;
|
auto e = r.front;
|
||||||
|
@ -3461,7 +3461,7 @@ unittest
|
||||||
foreach (p; probs) {
|
foreach (p; probs) {
|
||||||
if (!p) continue;
|
if (!p) continue;
|
||||||
//enforce(p > 0 && p <= 1, "Wrong probability passed to entropy");
|
//enforce(p > 0 && p <= 1, "Wrong probability passed to entropy");
|
||||||
result -= p * log(p);
|
result -= p * log2(p);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue