Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Feng Tang <feng.tang@intel.com>, fio@vger.kernel.org
Subject: Re: [PATCH RFC] gauss.c: correct the stddev initializtion
Date: Tue, 17 Mar 2020 08:34:48 -0600	[thread overview]
Message-ID: <dab7e008-2fff-62d8-28f6-cc08a5388738@kernel.dk> (raw)
In-Reply-To: <20200317125331.6799-1-feng.tang@intel.com>

On 3/17/20 6:53 AM, Feng Tang wrote:
> Signed-off-by: Feng Tang <feng.tang@intel.com>
> ---
>  lib/gauss.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/gauss.c b/lib/gauss.c
> index 1d24e187..3f84dbc6 100644
> --- a/lib/gauss.c
> +++ b/lib/gauss.c
> @@ -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;
>  	}

Looks like I very helpfully did not include a reference to to where
this is from... Can you expand on the need for the patch?

-- 
Jens Axboe



  reply	other threads:[~2020-03-17 14:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-17 12:53 [PATCH RFC] gauss.c: correct the stddev initializtion Feng Tang
2020-03-17 14:34 ` Jens Axboe [this message]
2020-03-17 14:52   ` Feng Tang
2020-03-17 14:56     ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dab7e008-2fff-62d8-28f6-cc08a5388738@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=feng.tang@intel.com \
    --cc=fio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox