mirror of
https://github.com/dlang/phobos.git
synced 2025-04-30 07:00:37 +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))
|
||||
reduce(Range)(Range r)
|
||||
reduce(Range)(Range r) if (isInputRange!Range)
|
||||
{
|
||||
static if (fun.length == 1)
|
||||
auto e = r.front;
|
||||
|
@ -3461,7 +3461,7 @@ unittest
|
|||
foreach (p; probs) {
|
||||
if (!p) continue;
|
||||
//enforce(p > 0 && p <= 1, "Wrong probability passed to entropy");
|
||||
result -= p * log(p);
|
||||
result -= p * log2(p);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue