Menu

#5 Fix incorrect rendering (patch included)

open
nobody
5
2009-05-13
2009-05-13
No

The attached patch fixes a rendering bug that results in the attached shapes-broken.pgm image. The expected image is attached as shapes.pgm.
The patch replaces a comparison ((float)x == 0.0) by (fabs(x) < very_small_fp_value).
Due to floating point not being exact, it depends on the FP format and the CPU whether a direct comparison will be true or not.
The ==0.0 test breaks on PowerPC and X86_64.

Discussion

  • Michael Buesch

    Michael Buesch - 2009-05-13

    Patch

     
  • Michael Buesch

    Michael Buesch - 2009-05-13

    Broken result (Patch not applied)

     
  • Michael Buesch

    Michael Buesch - 2009-05-13

    Expected result (Patch applied)

     

Log in to post a comment.

MongoDB Logo MongoDB