When building with VS2019 (using is_clang=false) multiples of the
following error are given:
../../src/common/mathutil.cpp(75): error C4244: '=':
conversion from 'double' to 'float', possible loss of data
(This is due to pow(), when passed an int for the second param, widens
the first param to a double then returns a double).
Since the code was being changed the opportunity was taken to:
- add missing unit tests for the two 999E5 conversions
- optimise out the common pow() functions
The unit tests were written against the original implementation, then
the optimisations added and verified against the original results.
Bug: angleproject:5521, dawn:602
Change-Id: Ic9e5eaedbe3fc7ceeed697898823b76dffcd989a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2624888
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by:
Jamie Madill <jmadill@chromium.org>
| Name |
Last commit
|
Last update |
|---|---|---|
| android | Loading commit data... | |
| build_overrides | Loading commit data... | |
| doc | Loading commit data... | |
| extensions | Loading commit data... | |
| gni | Loading commit data... | |
| include | Loading commit data... | |
| infra | Loading commit data... | |
| samples | Loading commit data... | |
| scripts | Loading commit data... | |
| src | Loading commit data... | |
| third_party | Loading commit data... | |
| tools | Loading commit data... | |
| util | Loading commit data... | |
| .clang-format | Loading commit data... | |
| .gitattributes | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .gn | Loading commit data... | |
| .style.yapf | Loading commit data... | |
| .vpython | Loading commit data... | |
| .vpython3 | Loading commit data... | |
| .yapfignore | Loading commit data... | |
| AUTHORS | Loading commit data... | |
| BUILD.gn | Loading commit data... | |
| CONTRIBUTORS | Loading commit data... | |
| DEPS | Loading commit data... | |
| LICENSE | Loading commit data... | |
| OWNERS | Loading commit data... | |
| PRESUBMIT.py | Loading commit data... | |
| README.chromium | Loading commit data... | |
| README.md | Loading commit data... | |
| WATCHLISTS | Loading commit data... | |
| additional_readme_paths.json | Loading commit data... | |
| codereview.settings | Loading commit data... | |
| dotfile_settings.gni | Loading commit data... |