r-lib / vdiffr

Visual regression testing and graphical diffing with testthat
https://vdiffr.r-lib.org
Other
185 stars 31 forks source link

Precision issues on M1 #119

Open thomasp85 opened 2 years ago

thomasp85 commented 2 years ago

Evaluating some of the visual tests in ggplot2 (interestingly all of "themes look decent at larger base sizes", I can see that there is a precision issue as 0 sometimes gets written as 0.000000000000064. These are values that should be exactly equal to zero (and thus the precision determination in write_double() should keep default precision), but are not on M1.

My guess is that it is something deep down in the graphic engine, but we should probably find a good cutoff to compare to rather than test for exact equality with 0