Tags give the ability to mark specific points in history as being important
  • 0.4.2   Bug Fixes
  • 0.4.1   Bug fixes
    56e55928 · Same fix as p32_div ·
    Release 0.4.1

    This fixes the 32-bit divide bugs

  • 0.4rc
    7e2470c9 · type fix for comparison ·
    Release 0.4rc

    This version includes support for P32. Exhaustive tests are currently still in progress and is expected to require weeks to months to complete.

  • v0.3.2
  • v0.3.2rc
    16c55d78 · Mac p16_sqrt bug fix ·
    Release v0.3.2rc

    Support C++ - with wrapper

  • v0.3.1
    b267de85 · Update CHANGELOG ·
  • v0.3
    19234cdf · Update README.md ·
    Release v0.3

    Support posit8_t and posit16_t

  • v0.2
    Release v0.2

    Release Version 0.2

    Full posit16_t (16-bit posit with 1 exponent bit) support.

    Added four functions:

    1. convert unsigned int to posit16_t
    2. convert unsigned long int to posit16_t
    3. convert int to posit16_t
    4. convert long int to posit16_t

    Bug fix:

    1. Fixed p16_mulAdd bug (#1)
  • v0.1   Release Version 0.1
    cef53e75 · typo ·
    Release v0.1

    This version supports a 16-bit with one exponent bit (posit16_t). This code is tested on

    • GNU gcc (SUSE Linux) 4.8.5
    • Apple LLVM version 9.1.0 (clang-902.0.39.2)

    An example on how to use the code to add:

    union ui16_p16 uA, uB, uZ;

    uA.ui = 0x42;

    uB.ui = 0x23;

    uZ.p = p16_add(uA.p, uB.p);

    //To check answer

    double dZ = convertP16ToDec_f(uZ.p);

    //To print result in binary

    printBinary(&uZ.ui, 16);

    Build - softposit.a

    cd SoftPosit/build/Linux-x86_64-GCC

    make -j6 all

    Please link to the archive to use.


    Main Posit Functionalities:

    1. Add posit16_t p16_add(posit16_t, posit_16)

    2. Subtract posit16_t p16_sub(posit16_t, posit_16)

    3. Divide posit16_t p16_div(posit16_t, posit_16)

    4. Multiply posit16_t p16_mul(posit16_t, posit_16)

    5. Fused Multiply Add posit16_t p16_mulAdd(posit16_t, posit_16, posit_16)

      p16_mulAdd(a, b, c) <=> a*b + c

    Main Quire Functionalities

    1. Fused dot product-add quire16_t q16_fdp_add(quire16_t, posit_16, posit_16)

    2. Fused dot product-subtract quire16_t q16_fdp_sub(quire16_t, posit_16, posit_16)

    3. Set quire variable to zero quire16_t q16_clr(quire16_t)

    4. Convert quire to posit posit_16 convertQ16ToP16(quire16_t)

    Additional Posit Functionalites

    1. Square root posit16_t p16_sqrt(posit16_t)

    2. Round to nearest integer posit16_t p16_roundToInt(posit16_t)

    3. Check equal bool p16_eq( posit16_t, posit16_t )

    4. Check less than equal bool p16_le( posit16_t, posit16_t )

    5. Check less than bool p16_lt( posit16_t, posit16_t )

    6. Convert p16 to integer (32 bits) int_fast32_t p16_to_i32( posit16_t )

    7. Convert p16 to long integer (64 bits) int_fast64_t p16_to_i64( posit16_t)

    8. Convert p16 to unsigned integer (32 bits) uint_fast32_t p16_to_ui32( posit16_t )

    9. Convert p16 to unsigned long integer (64 bits) uint_fast64_t p16_to_ui64( posit16_t)

    10. Convert p16 to p32 (posit<32, 2>) posit32_t p16_to_p32( posit16_t )

    11. Convert p16 to double (64 bits) double convertP16ToDec_f(posit16_t)

    12. Convert double (64 bits) to posit posit16_t convertdoubleToP16(double)