gauss.c: correct the stddev initializtion
authorFeng Tang <feng.tang@intel.com>
Tue, 17 Mar 2020 12:53:31 +0000 (20:53 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 17 Mar 2020 14:56:27 +0000 (08:56 -0600)
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
lib/gauss.c

index 1d24e18..3f84dbc 100644 (file)
@@ -51,7 +51,7 @@ void gauss_init(struct gauss_state *gs, unsigned long nranges, double dev,
        gs->nranges = nranges;
 
        if (dev != 0.0) {
-               gs->stddev = ceil((double) (nranges * 100.0) / dev);
+               gs->stddev = ceil((double)(nranges * dev) / 100.0);
                if (gs->stddev > nranges / 2)
                        gs->stddev = nranges / 2;
        }