Posit Conversion

Version 1.0.0 (9.76 KB) by Jacob
Consists of two functions, dec2pos and pos2dec, that will convert to and from posits.
62 Downloads
Updated 6 Dec 2022

View License

This posit converter uses two functions that take either a decimal number or a posit char array with specified constraints for the posit and exponent bit length to convert to their opposite. The converter can handle the special cases for posits (0 and infinity, expressed as Inf), positive and negative decimal numbers, and decimal numbers less than 1. Inspired by my professor Dr. James D. Brooks, this is the first entry to the file exchange that experiments with posits.

Cite As

Jacob (2026). Posit Conversion (https://uk.mathworks.com/matlabcentral/fileexchange/121787-posit-conversion), MATLAB Central File Exchange. Retrieved .

Gustafson, John L. (2017). Posit Arithmetic (https://posithub.org/docs/Posits4.pdf), Posithub. Retrieved December 6, 2022.

MATLAB Release Compatibility
Created with R2022b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags
Version Published Release Notes
1.0.0