Socket
Socket
Sign inDemoInstall

@stdlib/number-float64-base-normalize

Package Overview
Dependencies
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stdlib/number-float64-base-normalize

Return a normal number `y` and exponent `exp` satisfying `x = y * 2^exp`.


Version published
Weekly downloads
377K
decreased by-19.62%
Maintainers
4
Weekly downloads
 
Created

What is @stdlib/number-float64-base-normalize?

@stdlib/number-float64-base-normalize is a utility package for normalizing a double-precision floating-point number. It provides functionality to decompose a floating-point number into a normalized fraction and an exponent.

What are @stdlib/number-float64-base-normalize's main functionalities?

Normalize a floating-point number

{"const normalize = require('@stdlib/number-float64-base-normalize');\nconst [fraction, exponent] = normalize(4.2);\nconsole.log(fraction, exponent); // Output: 0.525, 3":"This feature allows you to normalize a floating-point number into a fraction and an exponent. The function returns an array where the first element is the normalized fraction and the second element is the exponent."}

Handle special cases

{"const normalize = require('@stdlib/number-float64-base-normalize');\nconst [fraction, exponent] = normalize(0);\nconsole.log(fraction, exponent); // Output: 0, 0":"The package can handle special cases like zero. When the input is zero, the function returns a fraction of 0 and an exponent of 0."}

Other packages similar to @stdlib/number-float64-base-normalize

Keywords

FAQs

Package last updated on 03 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc