Skip to content

Subnormal blocks are not encoded correctly #119

Closed
@lindstro

Description

Blocks whose largest nonzero value is subnormal can cause floating-point overflow during conversion to zfp's block-floating-point format. Although this conversion corrupts the mantissas, this is an otherwise benign bug as such blocks are still reconstructed as a collection of "random" subnormals, albeit with complete loss of precision.

Two potential solutions have been identified:

  • Perform the float-to-int normalization in two steps via two separate multipliers. This will, however, incur a performance penalty for all blocks.
  • Cap the smallest supported block exponent, which effectively flushes subnormals to zero (a strategy already employed by many processors). Given that the tolerances used with zfp often vastly exceed FLT_MIN, this should have a negligible effect in practice. Whereas this approach affects the compressed representation of all-subnormal blocks, current versions of zfp would still correctly decompress such blocks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions