Skip to content

SPERR fails on very small error tolerances #257

Description

@lindstro

Describe the bug
When setting the pwe tolerance to very small values, PSNR sometimes drops precipitously as the tolerance is halved.

To Reproduce
Steps to reproduce the behavior:

  1. Run sperr3d -c --ftype 64 --dims 128 128 256 --pwe <tolerance> --print_stats --bitstream /tmp/density.sperr SPERR/test_data/density_128x128x256.d64 with tolerances 4e-17, 2e-17, 1e-17, and 5e-18.
  2. Observe the sharp drop in PSNR from infinity to 333.84dB, to 311.78dB, to 19.63dB as the tolerance is successively halved.

Expected and actual behavior
Halving the tolerance should in general increase PSNR by 6.02 dB. Given that it's already at infinity when the tolerance is 4e-17, it ought to at least stay there for smaller tolerances. Presumably there's some kind of overflow issue.

Environment (please complete the following information):

  • OS: macOS 15.7.7
  • Compiler: Apple clang version 17.0.0
  • SPERR Version: 0.8.5

Additional context
This problem seems not confined to this data set but occurs with small tolerances for other data as well, but is easily reproduced with the test data that is in the repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions