FreeBSD Bugzilla – Attachment 158793 Details for
Bug 201582
ministat does not calculate proper median value (patch included)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Make ministat return proper value for median
ministat_median.patch (text/plain), 470 bytes, created by
Marcus Reid
on 2015-07-15 07:24:48 UTC
(
hide
)
Description:
Make ministat return proper value for median
Filename:
MIME Type:
Creator:
Marcus Reid
Created:
2015-07-15 07:24:48 UTC
Size:
470 bytes
patch
obsolete
>*** usr.bin/ministat/ministat.c.orig 2015-07-14 23:49:11.246171000 -0700 >--- usr.bin/ministat/ministat.c 2015-07-15 00:16:20.895494000 -0700 >*************** >*** 193,199 **** > Median(struct dataset *ds) > { > >! return (ds->points[ds->n / 2]); > } > > static double >--- 193,200 ---- > Median(struct dataset *ds) > { > >! if(!(ds->n % 2)) return ((ds->points[ds->n / 2]) + (ds->points[(ds->n / 2)-1]))/2; >! else return (ds->points[ds->n / 2]); > } > > static double
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 201582
: 158793