> I'm surprised it doesn't eliminate the BenchmarkAtan2 entirely:
I'm sorry, could you clarify what you mean by "eliminate" here. Are you saying I shouldn't benchmark atan2 but something else ?
> Are you sure you're compiling with optimizations enabled?
I just did - `go test -bench=. -benchmem -cpu=1`. Did I miss something ?
> I also wonder if that DIVSD instruction in yours might cause a floating point exception, which would be a different behavior compared to atan2.
I checked with the assembly output of math.Atan2. It also uses DIVSD.