Javascript library to convert values to decimal format and vice versa with IEEE754 standard.
- Code refactoring/optimizing
- Rounding
- Values under 1
- Underflow
- Overflow
- Handling the rounding errors
- Error catching
- Catching wrong inputs
- Some additional test with jest
- Add default value if no options are passed
- Add error handling if no value is passed
const ieee754 = require(./ieee754); const optionsWithReturnType = {mode: 'single', returnType: '16bitArray'}; const optionsWithoutReturnType = {mode: 'single'}; // Examples console.log(ieee754.getDecimal([17530, 8192]); // --> 1000.5 console.log(ieee754.getPrecision(1000.5, optionsWithReturnType)); // --> [17530, 8192] console.log(ieee754.getPrecision(1000.5, optionsWithoutReturnType)); // --> 01000100011110100010000000000000 console.log(ieee754.getDecimal([0, 0]); // --> 0 console.log(ieee754.getPrecision(0, optionsWithReturnType)); // --> [0, 0] console.log(ieee754.getPrecision(0, optionsWithoutReturnType)); // --> 00000000000000000000000000000000npm install npm test