Ann: A new Haskell Language Posit Library

41 views
Skip to first unread message

Nathan Waivio

unread,
Sep 30, 2022, 4:54:24 PM9/30/22
to Unum Computing

I'd like to announce a new Haskell Language library for the Posit Standard 3.2 numbers.  It is currently located in GitHub here with a BSD license for all to enjoy.

I invite the community to review and provide feedback.  The library provides Posit 3.2 standard numbers for word sizes, 8, 16, 32, 64, 128, and 256 bits wide.  Many of the standard transcendental functions are also implemented (with approximately 1 to 2 ULP error).  Conversion between word sizes and fused operations are implemented as well.  All of the intermediate representations are implemented with the standard Haskell Rational, Integer, and Natural Types rather than using the more hardware conscious Quire.

The library makes use of some interesting type level features of the Haskell language like GADTs, Patterns Synonyms, higher Kinded types, and Associated Type Families.

The library has some initial support of the Liquid Haskell refinement type checking functionality.

I do believe that the new 2022 standard can be implemented in this library with minimal changes to the internal representation of the Posit numbers.  Currently the Posit 3.2 numbers have types like: Posit8, Posit16, Posit32, Posit64, Posit128, Posit256.
My plan is to implement the 2022 Standard with the types: P8, P16, P32, P64, P128, and P256.

Thanks,
Nathan.
Reply all
Reply to author
Forward
0 new messages