# floatv

> float value encode/decode two's complement and single precision floating point format(ieee754)

Latest version **1.0.1** (published 2019-05-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install floatv
pnpm add floatv
yarn add floatv
bun add floatv
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-05-15 |
| First published | 2019-05-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Recep Birol Gül |
| Maintainers | recepbirol |
| Keywords | ieee754, floatingpoint, float, convert to float, two's complement, single precision floating point format, binary32 to float |

## Links

- npm: https://www.npmjs.com/package/floatv
- Repository: https://github.com/RecepBirol/floatv
- Homepage: https://github.com/RecepBirol/floatvalue#readme
- Issues: https://github.com/RecepBirol/floatvalue/issues
- npm.io page: https://npm.io/package/floatv

## Recent versions

- 1.0.1 (latest) — 2019-05-15
- 1.0.0 — 2019-05-05

## README

# floatv
float value encode/decode two's complement and single precision floating point format
# Test & Example
```js
const floatv = require("../index");

describe("binary32toFloat, ieee 754 floating point", function () {
    it("should return 23.29 if given 0x41ba6666", function () {
        assert.equal(floatv.binary32ToFloat(0x41ba6666).toFixed(2), 23.29);
    });

    it("should return -33.16 if given  0xc204a3d7", function () {
        assert.equal(floatv.binary32ToFloat(0xc204a3d7).toFixed(2), -33.16);
    });

    it("should return 0.00 if given 0", function () {
        assert.equal(floatv.binary32ToFloat(0), 0.00);
    })
});

describe("binary16toFloat, two's complement notation", function () {
    it("should return 0.00 if given 0", function () {
        assert.equal(floatv.binary16ToFloat(0), 0.00);
    });
})
```

---
_Source: https://npm.io/package/floatv · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
