Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Feb 17, 2024 via pnpm

ieee754 1.1.13

Read/write IEEE754 floating point numbers from/to a Buffer or array-like object
Package summary
Share
0
issues
1
license
1
BSD-3-Clause
Package created
28 Dec 2013
Version published
26 Mar 2019
Maintainers
1
Total deps
1
Direct deps
0
License
BSD-3-Clause

Issues

0
This package has no issues

Licenses

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
ieee754@1.1.13
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of ieee754 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does ieee754 do?

IEEE754 is a hardware-independent system in JavaScript for binary floating-point arithmetic. It allows you to read and write IEEE754 floating point numbers from/to a Buffer or any array-like object. This becomes crucial in various applications as IEEE754 is a widespread standard for floating-point computation, due to its balance between range, precision and speed.

How do you use ieee754?

Using IEEE754 in your JavaScript project is straightforward. You begin by installing the package via npm using the command npm install ieee754. Then, you require it in your project with var ieee754 = require('ieee754').

Here are examples of how to use the read and write functions:

To read:

var buffer = new ArrayBuffer(8); 
var ieee754_read = ieee754.read(buffer, 0, false, 52, 8);

To write:

var buffer = new ArrayBuffer(8);
ieee754.write(buffer, value, 0, false, 52, 8);

In these samples, the parameters are as follows:

  • buffer: the buffer or array-like object you're dealing with.
  • offset: the offset into the buffer.
  • isLE: a boolean indicating if the architecture is little-endian.
  • mLen: the fields length (mantissa).
  • nBytes: the number of bytes.

Remember, for the write function you'll also need to specify the value you want to record.

Where are the ieee754 docs?

The IEEE754 documentation can be found in the README.md file in the root directory of the package repository. The file includes detailed information about how to use the package, as well as explanations of the mathematical concepts involved. For more background on the IEEE Standard for Floating-Point Arithmetic, you can follow the link provided to the corresponding Wikipedia page.