Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stdlib/constants-float64-high-word-significand-mask

Package Overview
Dependencies
Maintainers
4
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stdlib/constants-float64-high-word-significand-mask - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

include/stdlib/constants/float64/high_word_significand_mask.h

7

package.json
{
"name": "@stdlib/constants-float64-high-word-significand-mask",
"version": "0.0.7",
"version": "0.0.8",
"description": "High word mask for the significand of a double-precision floating-point number.",

@@ -20,2 +20,3 @@ "license": "Apache-2.0",

"example": "./examples",
"include": "./include",
"lib": "./lib",

@@ -38,3 +39,5 @@ "test": "./test"

},
"dependencies": {},
"dependencies": {
"@stdlib/utils-library-manifest": "^0.0.x"
},
"devDependencies": {

@@ -41,0 +44,0 @@ "@stdlib/number-float64-base-get-high-word": "^0.0.x",

@@ -21,3 +21,3 @@ <!--

# Significand Mask
# FLOAT64_HIGH_WORD_SIGNIFICAND_MASK

@@ -50,3 +50,3 @@ [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->

High word mask for the significand of a [double-precision floating-point number][ieee754].
High word mask for the significand of a [double-precision floating-point number][ieee754].

@@ -87,16 +87,12 @@ <!-- eslint-disable id-length -->

var out;
var hi;
var x;
x = 11.5;
hi = getHighWord( x ); // => 0 10000000010 01110000000000000000
var x = 11.5;
var hi = getHighWord( x ); // 0 10000000010 01110000000000000000
// returns 1076297728
// Mask off all bits except for the significand bits:
out = hi & FLOAT64_HIGH_WORD_SIGNIFICAND_MASK; // => 0 00000000000 01110000000000000000
var out = hi & FLOAT64_HIGH_WORD_SIGNIFICAND_MASK; // 0 00000000000 01110000000000000000
// returns 458752
// Mask on the significand bits and leave other bits unchanged:
out = hi | FLOAT64_HIGH_WORD_SIGNIFICAND_MASK; // => 0 10000000010 11111111111111111111
out = hi | FLOAT64_HIGH_WORD_SIGNIFICAND_MASK; // 0 10000000010 11111111111111111111
// returns 1076887551

@@ -109,2 +105,56 @@ ```

<!-- C interface documentation. -->
* * *
<section class="c">
## C APIs
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
<section class="intro">
</section>
<!-- /.intro -->
<!-- C usage documentation. -->
<section class="usage">
### Usage
```c
#include "stdlib/constants/float64/high_word_significand_mask.h"
```
#### STDLIB_CONSTANT_FLOAT64_HIGH_WORD_SIGNIFICAND_MASK
Macro for the high word mask for the significand of a [double-precision floating-point number][ieee754].
</section>
<!-- /.usage -->
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
<section class="notes">
</section>
<!-- /.notes -->
<!-- C API usage examples. -->
<section class="examples">
</section>
<!-- /.examples -->
</section>
<!-- /.c -->
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

@@ -163,4 +213,4 @@

[test-image]: https://github.com/stdlib-js/constants-float64-high-word-significand-mask/actions/workflows/test.yml/badge.svg
[test-url]: https://github.com/stdlib-js/constants-float64-high-word-significand-mask/actions/workflows/test.yml
[test-image]: https://github.com/stdlib-js/constants-float64-high-word-significand-mask/actions/workflows/test.yml/badge.svg?branch=v0.0.8
[test-url]: https://github.com/stdlib-js/constants-float64-high-word-significand-mask/actions/workflows/test.yml?query=branch:v0.0.8

@@ -177,2 +227,9 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/constants-float64-high-word-significand-mask/main.svg

[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
[chat-url]: https://gitter.im/stdlib-js/stdlib/
[stdlib]: https://github.com/stdlib-js/stdlib
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
[umd]: https://github.com/umdjs/umd

@@ -184,13 +241,7 @@ [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

[esm-url]: https://github.com/stdlib-js/constants-float64-high-word-significand-mask/tree/esm
[branches-url]: https://github.com/stdlib-js/constants-float64-high-word-significand-mask/blob/main/branches.md
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
[chat-url]: https://gitter.im/stdlib-js/stdlib/
[stdlib]: https://github.com/stdlib-js/stdlib
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/constants-float64-high-word-significand-mask/main/LICENSE
[ieee754]: http://en.wikipedia.org/wiki/IEEE_754-1985
[ieee754]: https://en.wikipedia.org/wiki/IEEE_754-1985

@@ -197,0 +248,0 @@ <!-- <related-links> -->

Sorry, the diff of this file is not supported yet

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