potential floating point error propagation in set shower scale
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MadGraph5_aMC@NLO |
Fix Released
|
Low
|
Paolo Torrielli |
Bug Description
Dear MG5 team,
MG5 version: 2.6.0
I just noticed that NLO shower scale setter has a potential floating point error propagation.
In function emscainv in montecarlocount
(r - Sqrt[(r - r^2)])/(2 r - 1)
This expression is 0/0 form at r=0.5, therefore precision loss happen when we pick up r value near 0.5.
If this part give us crazy number, it seems it will be cured internally in other subroutine, such as taking scalemax instead in set_shower_scale in fks_singular.f. However, this will break smooth random number choice so I think it may generate unwanted flaws.
Isn't it better to use floting point arithmetic safe expression, like
Sqrt[r]/(Sqrt[r] + Sqrt[1 - r])
Best wishes,
Sung Hak
Changed in mg5amcnlo: | |
assignee: | nobody → Paolo Torrielli (paolotorriell) |
Changed in mg5amcnlo: | |
status: | Fix Committed → Fix Released |
Dear Sung Hak,
it seems you opened a ticket, even it was already answered.
As I wrote, I think what you say is are fine. Just notice that
this did not produce instabilities because we explicitly set
emscainv =1/2 if r=1/2.
Anyway, your proposal is perfectly fine.
Cheers.
Paolo
> On 3 Nov 2017, at 09:15, Launchpad Bug Tracker <email address hidden> wrote: er.f, they return a rescaled /bugs.launchpad .net/bugs/ 1729726
>
> Olivier Mattelaer (olivier-mattelaer) has assigned this bug to you for MadGraph5_aMC@NLO:
>
> Dear MG5 team,
>
> MG5 version: 2.6.0
>
> I just noticed that NLO shower scale setter has a potential floating
> point error propagation.
>
> In function emscainv in montecarlocount
> random number in [0,1] by
>
> (r - Sqrt[(r - r^2)])/(2 r - 1)
>
> This expression is 0/0 form at r=0.5, therefore precision loss happen
> when we pick up r value near 0.5.
>
> If this part give us crazy number, it seems it will be cured internally
> in other subroutine, such as taking scalemax instead in set_shower_scale
> in fks_singular.f. However, this will break smooth random number choice
> so I think it may generate unwanted flaws.
>
> Isn't it better to use floting point arithmetic safe expression, like
>
> Sqrt[r]/(Sqrt[r] + Sqrt[1 - r])
>
> Best wishes,
> Sung Hak
>
> ** Affects: mg5amcnlo
> Importance: Undecided
> Assignee: Paolo Torrielli (paolotorriell)
> Status: New
>
> --
> potential floating point error propagation in set shower scale
> https:/
> You received this bug notification because you are a bug assignee.