Note: discussion at https://github.com/golang/go/issues/36536 . TL;DR fused 
floating point multiply-add gives higher precision results.

On Sunday, January 12, 2020 at 8:19:54 PM UTC-8, kortschak wrote:
>
> I am going through failures that I see in Gonum tests when we build on 
> arm64 (Travis now provide this). 
>
> In many cases there are slight differences that I'm OK with adding a 
> tolerance to accept, but in one case (stat.ROC[0][1]) I see an error 
> that can be completely avoided by changing the expression from what is 
> at [1] to 
>
> ``` 
>         for i := range tpr { 
>                 tpr[i] = 1 - tpr[i]/nPos 
>                 fpr[i] = 1 - fpr[i]/nNeg 
>         } 
> ``` 
>
> Should I expect `inv := 1/c; v *= inv` and `v /= c` to give the same 
> results for reasonable cases? (or at least to match the behaviour on 
> amd64/386/arm - which all agree). 
>
> thanks 
> Dan 
>
> [0]https://godoc.org/gonum.org/v1/gonum/stat#ROC 
> [1] 
>
> https://github.com/gonum/gonum/blob/683ee363d56e77121c6640345bb9d40644f02a1f/stat/roc.go#L107-L114
>  
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/4577112c-9aac-492a-a36d-43c554417668%40googlegroups.com.

Reply via email to