|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T c ┃
Length: 537 (0x219) Types: TextFile Names: »centile.c«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki └─ ⟦this⟧ »EUUGD11/stat-5.3/eu/stat/src/centile.c«
/* Copyright 1980 Gary Perlman */ /*LINTLIBRARY*/ #include "stat.h" FUN(centile,compute values given percentile rank,5.0,12/24/86) /*returns the perc percentile of sorted v[n]*/ double centile (perc, v, n) float v[]; int perc, n; { double findex; /* floating index to the perc centile */ int pindex; findex = perc * .01 * n - 0.5; if (findex < 0.0) findex = 0.0; else if (findex > (n-1.0)) findex = n - 1.0; pindex = (int) findex; return (v[pindex+1] * (findex - pindex) + v[pindex] * (1.0 - findex + pindex)); }