summaryrefslogtreecommitdiff
path: root/test/pipeline
diff options
context:
space:
mode:
authorStefan Klug <stefan.klug@ideasonboard.com>2025-04-01 14:36:11 +0200
committerStefan Klug <stefan.klug@ideasonboard.com>2025-04-03 12:36:07 +0200
commit8936e81e3f2f160966f59e1d19103e95098db1da (patch)
tree501adec56069c78e18f87038fb998168c8e1d2f5 /test/pipeline
parent781e2f4d0c3bfaf0d53a76b0a0f08aa5c742c7a0 (diff)
libipa: histogram: Fix quantile() calculation for fractional results
The calculation of the frac variable is based solely on integers and therefore results in the fractional part being either 0 or 1. In the original code from RaspberryPi this is mitigated by casting the nominator to a double. This works for most cases, but fails when q is very small because of the quantization introduced by item being an integer. Fix both issues by doing the full calculation in double and remove the should_fail tag. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test/pipeline')
0 files changed, 0 insertions, 0 deletions