Git Product home page Git Product logo

ieee754's Introduction

ieee754 travis npm downloads javascript style guide

saucelabs

Read/write IEEE754 floating point numbers from/to a Buffer or array-like object.

install

npm install ieee754

methods

var ieee754 = require('ieee754')

The ieee754 object has the following functions:

ieee754.read = function (buffer, offset, isLE, mLen, nBytes)
ieee754.write = function (buffer, value, offset, isLE, mLen, nBytes)

The arguments mean the following:

  • buffer = the buffer
  • offset = offset into the buffer
  • value = value to set (only for write)
  • isLe = is little endian?
  • mLen = mantissa length
  • nBytes = number of bytes

what is ieee754?

The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point computation. Read more.

license

BSD 3 Clause. Copyright (c) 2008, Fair Oaks Labs, Inc.

ieee754's People

Contributors

elidoran avatar feross avatar greenkeeper[bot] avatar greenkeeperio-bot avatar irengrig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ieee754's Issues

NPM module has files with timestamps of Jan 1 1970

When I install the ieee754 module from npm, the files in that package all of a timestamp of Jan 1 1970 (or thereabouts, depending on your time zone), using npm version 4.2.0.

screen shot 2018-03-17 at 8 49 50 pm

This winds up causing an issue with the aws-cli, at least when running in circle-ci, where an error is thrown: ZIP does not support timestamps before 1980. This is detailed in this aws-cli issue: aws/aws-cli#2639. There is a workaround detailed in the aws-cli issue.

Would it be possible for you to address the issue that's causing the 1970 timestamp in the npm module?

Convert buffer to decimal

I have a node Buffer: <Buffer 42 d9 00 00>.
I am trying ieee754.read(buffer, 0, false, 5832704, 4) but it does not give the expected output of 108.5.

License

Any chance we could get a sane license on this?

package.json (NPM) claims this is an MIT library, but the LICENSE file says otherwise. It's actually a mish-mash of MIT, 3-clause BSD and a custom footnote. To be clear it's not "dual licensed" as MIT and BSD, it's somehow both at once (with modifications from Brian!)

Could you please contact the original license holders and request the removal of the footnote, then relicense your portion as 3-clause BSD, then there will be just one license for this code.

An in-range update of standard is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 11.0.1 of standard was just published.

Branch Build failing 🚨
Dependency standard
Current Version 11.0.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

standard is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 20 commits.

  • 670a3be authors
  • b7e6cbc 11.0.1
  • 34a3c40 Merge pull request #1092 from watson/elastic-logo
  • 5382643 Replace Opbeat with Elastic logo
  • c40c799 Merge pull request #1091 from mackermans/master
  • 504fcff docs(README): update typeform logo
  • a5b779f Swap README.md and RULES.md symlinks (#1090)
  • e818224 Merge pull request #1072 from standard/greenkeeper/eslint-plugin-react-7.7.0
  • 9dc888f Merge branch 'master' into greenkeeper/eslint-plugin-react-7.7.0
  • a5293dd Merge pull request #1075 from standard/greenkeeper/eslint-plugin-import-2.9.0
  • ebf6620 Merge pull request #1087 from standard/greenkeeper/eslint-plugin-promise-3.7.0
  • 116a871 fix(package): update eslint-plugin-promise to version 3.7.0
  • 738edc4 readme: add standard talk
  • c93ac0d Merge pull request #1076 from tumobi/fix-links
  • 4f8c1f5 Fix webstorm.md links

There are 20 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

ESM build?

Hi @feross,

I forked your library here: master...xtuc:master and I was wondering if that's something that could be merged upstream?

Basically, the source is now an ECMAScript Module and uses a Babel to transpile it down to CJS before publishing on npm.

Mantissa <-> Byte length always paired?

The functions allow specifying the mantissa and the byte length.

When playing around it seems they are always paired like (23, 4) and (52, 8).

Do you know if the mantissa is always tied to the byte length like that?
Or, is there a time when we'd vary the mantissa for some reason?

Thank you

A question about API & tests

In reviewing the test basic.js, I note that the 4th parameter (mLen) to ieee754.write is 23 for a 4-byte buffer. I thought that the mantissa of a single-precision was 24 bits.

Was altering the ratio of exponent to mantissa the purpose of this code?

An in-range update of tape is breaking the build 🚨

The devDependency tape was updated from 4.10.0 to 4.10.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

tape is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 4 commits.

  • 4708a3d v4.10.1
  • a63261e [Deps] update resolve
  • 34ebb4c [Refactor] consistent spacing
  • b74c4fd Partial revert of #403: fbe4b951cb6c6cc4f0e9e3ae4a57b123dd82c0fb and 367b010d21c7c9814c4bc6b21d1c2a9a67596c11

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.