draw: avoid FMA (Fused Multiply Add)

Changing "expr" to "float64(expr)" disables FMA on that expression, even
when expr's type is already nominally float64.

The output of this package should now be independent of GOARCH.

See the "FMA (Fused Multiply Add) detector" discussion at
https://groups.google.com/g/golang-dev/c/oZv0PaZmUGs

Fixes golang/go#67029

Change-Id: I43cecee0e9c8156eae39f52b5a2338c34d31a65a
Reviewed-on: https://go-review.googlesource.com/c/image/+/596816
Reviewed-by: Nigel Tao (INACTIVE; USE @golang.org INSTEAD) <nigeltao@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
3 files changed
tree: ae98c12ada17e8c25abba66a07c6661c2712cc46
  1. bmp/
  2. ccitt/
  3. cmd/
  4. colornames/
  5. draw/
  6. example/
  7. font/
  8. math/
  9. riff/
  10. testdata/
  11. tiff/
  12. vector/
  13. vp8/
  14. vp8l/
  15. webp/
  16. .gitattributes
  17. .gitignore
  18. codereview.cfg
  19. CONTRIBUTING.md
  20. go.mod
  21. go.sum
  22. LICENSE
  23. PATENTS
  24. README.md
README.md

Go Images

Go Reference

This repository holds supplementary Go image libraries.

Download/Install

The easiest way to install is to run go get -u golang.org/x/image/.... You can also manually git clone the repository to $GOPATH/src/golang.org/x/image.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the image repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/image:” in the subject line, so it is easy to find.