Re: [go-nuts] Re: float behaviour on arm64 v amd64

2020-01-13 Thread Dan Kortschak
Thanks. The example that shows the difference is at the issue. ``` package main import "fmt" func main() { nNeg := 10.0 fpr := 10.0 invNeg := 1 / nNeg fpr = 1 - fpr*invNeg fmt.Println(fpr) } ``` And, yes, it looks like it could be constant propagation.

Re: [go-nuts] Re: float behaviour on arm64 v amd64

2020-01-13 Thread 'Keith Randall' via golang-nuts
On Mon, Jan 13, 2020 at 5:45 PM Dan Kortschak wrote: > Thanks for linking this here. > > One thing that I did not follow up at the issue; why do we see the FMA > being applied when the value is a slice element, but not when it's a > single float64 value? > > I'd have to see an example to be

Re: [go-nuts] Re: float behaviour on arm64 v amd64

2020-01-13 Thread Dan Kortschak
Thanks for linking this here. One thing that I did not follow up at the issue; why do we see the FMA being applied when the value is a slice element, but not when it's a single float64 value? Second query, are there plans for adding FMA support to amd64 akin to how it is on arm64? Dan On Mon,

[go-nuts] Re: float behaviour on arm64 v amd64

2020-01-13 Thread 'Keith Randall' via golang-nuts
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