From 9cb6c7c0dc5f887496897a53602e1c55b4e08296 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Tue, 19 Mar 2024 11:34:57 +0530 Subject: [PATCH 1/6] feat: add constants/float32/half-pi --- .../constants/float32/half-pi/README.md | 147 ++++++++++++++++++ .../constants/float32/half-pi/docs/repl.txt | 12 ++ .../float32/half-pi/docs/types/index.d.ts | 33 ++++ .../float32/half-pi/docs/types/test.ts | 28 ++++ .../float32/half-pi/examples/index.js | 24 +++ .../stdlib/constants/float64/half_pi.h | 27 ++++ .../constants/float32/half-pi/lib/index.js | 48 ++++++ .../constants/float32/half-pi/manifest.json | 36 +++++ .../constants/float32/half-pi/package.json | 66 ++++++++ .../constants/float32/half-pi/test/test.js | 38 +++++ 10 files changed, 459 insertions(+) create mode 100644 lib/node_modules/@stdlib/constants/float32/half-pi/README.md create mode 100644 lib/node_modules/@stdlib/constants/float32/half-pi/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/constants/float32/half-pi/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/constants/float32/half-pi/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/constants/float32/half-pi/examples/index.js create mode 100644 lib/node_modules/@stdlib/constants/float32/half-pi/include/stdlib/constants/float64/half_pi.h create mode 100644 lib/node_modules/@stdlib/constants/float32/half-pi/lib/index.js create mode 100644 lib/node_modules/@stdlib/constants/float32/half-pi/manifest.json create mode 100644 lib/node_modules/@stdlib/constants/float32/half-pi/package.json create mode 100644 lib/node_modules/@stdlib/constants/float32/half-pi/test/test.js diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/README.md b/lib/node_modules/@stdlib/constants/float32/half-pi/README.md new file mode 100644 index 000000000000..015c3b7870e5 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/README.md @@ -0,0 +1,147 @@ + + +# HALF_PI + +> One half times the mathematical constant [π][pi]. + +
+ +## Usage + +```javascript +var HALF_PI = require( '@stdlib/constants/float32/half-pi' ); +``` + +#### HALF_PI + +One half times the mathematical constant [π][pi]. + +```javascript +var bool = ( HALF_PI === 1.5707963 ); +// returns true +``` + +
+ + + +
+ +## Examples + + + + + +```javascript +var HALF_PI = require( '@stdlib/constants/float32/half-pi' ); + +console.log( HALF_PI ); +// => 1.5707963 +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/constants/float32/half_pi.h" +``` + +#### STDLIB_CONSTANT_FLOAT32_HALF_PI + +Macro for one half times the mathematical constant [π][pi]. + +
+ + + + + +
+ +
+ + + + + +
+ +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/docs/repl.txt b/lib/node_modules/@stdlib/constants/float32/half-pi/docs/repl.txt new file mode 100644 index 000000000000..2da67de5dd19 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/docs/repl.txt @@ -0,0 +1,12 @@ + +{{alias}} + One half times the mathematical constant `π`. + + Examples + -------- + > {{alias}} + 1.5707963 + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/docs/types/index.d.ts b/lib/node_modules/@stdlib/constants/float32/half-pi/docs/types/index.d.ts new file mode 100644 index 000000000000..f4597b4980b5 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/docs/types/index.d.ts @@ -0,0 +1,33 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* One half times the mathematical constant `π`. +* +* @example +* var val = HALF_PI; +* // returns 1.5707963 +*/ +declare const HALF_PI: number; + + +// EXPORTS // + +export = HALF_PI; diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/docs/types/test.ts b/lib/node_modules/@stdlib/constants/float32/half-pi/docs/types/test.ts new file mode 100644 index 000000000000..f9eee7fd8874 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/docs/types/test.ts @@ -0,0 +1,28 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import HALF_PI = require( './index' ); + + +// TESTS // + +// The export is a number... +{ + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + HALF_PI; // $ExpectType number +} diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/examples/index.js b/lib/node_modules/@stdlib/constants/float32/half-pi/examples/index.js new file mode 100644 index 000000000000..6e0e57de8363 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/examples/index.js @@ -0,0 +1,24 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var HALF_PI = require( './../lib' ); + +console.log( HALF_PI ); +// => 1.5707963 diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/include/stdlib/constants/float64/half_pi.h b/lib/node_modules/@stdlib/constants/float32/half-pi/include/stdlib/constants/float64/half_pi.h new file mode 100644 index 000000000000..373530d7860f --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/include/stdlib/constants/float64/half_pi.h @@ -0,0 +1,27 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#ifndef STDLIB_CONSTANTS_FLOAT32_HALF_PI_H +#define STDLIB_CONSTANTS_FLOAT32_HALF_PI_H + +/** +* Macro for one half times the mathematical constant π. +*/ +#define STDLIB_CONSTANT_FLOAT32_HALF_PI 1.5707963 + +#endif // !STDLIB_CONSTANTS_FLOAT32_HALF_PI_H diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/lib/index.js b/lib/node_modules/@stdlib/constants/float32/half-pi/lib/index.js new file mode 100644 index 000000000000..50ad79de5857 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/lib/index.js @@ -0,0 +1,48 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* One half times the mathematical constant `π`. +* +* @module @stdlib/constants/float32/half-pi +* @type {number} +* +* @example +* var HALF_PI = require( '@stdlib/constants/float32/half-pi' ); +* // returns 1.5707963 +*/ + + +// MAIN // + +/** +* One half times the mathematical constant `π`. +* +* @constant +* @type {number} +* @default 1.5707963 +* @see [Wikipedia]{@link https://en.wikipedia.org/wiki/Pi} +*/ +var HALF_PI = 1.5707963; + + +// EXPORTS // + +module.exports = HALF_PI; diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/manifest.json b/lib/node_modules/@stdlib/constants/float32/half-pi/manifest.json new file mode 100644 index 000000000000..844d692f6439 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/manifest.json @@ -0,0 +1,36 @@ +{ + "options": {}, + "fields": [ + { + "field": "src", + "resolve": true, + "relative": true + }, + { + "field": "include", + "resolve": true, + "relative": true + }, + { + "field": "libraries", + "resolve": false, + "relative": false + }, + { + "field": "libpath", + "resolve": true, + "relative": false + } + ], + "confs": [ + { + "src": [], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [] + } + ] +} diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/package.json b/lib/node_modules/@stdlib/constants/float32/half-pi/package.json new file mode 100644 index 000000000000..25a53923056c --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/package.json @@ -0,0 +1,66 @@ +{ + "name": "@stdlib/constants/float32/half-pi", + "version": "0.0.0", + "description": "1/2 times π.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "doc": "./docs", + "example": "./examples", + "include": "./include", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "constant", + "const", + "mathematics", + "math", + "half", + "pi", + "ieee754", + "double", + "dbl", + "floating-point", + "float32" + ] +} diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/test/test.js b/lib/node_modules/@stdlib/constants/float32/half-pi/test/test.js new file mode 100644 index 000000000000..4cabcba9ad73 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/test/test.js @@ -0,0 +1,38 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var HALF_PI = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a number', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof HALF_PI, 'number', 'main export is a number' ); + t.end(); +}); + +tape( 'export is a single-precision floating-point number equal to 1.5707963', function test( t ) { + t.equal( HALF_PI, 1.5707963, 'equals 1.5707963' ); + t.end(); +}); From 44bbf5a52872090f7ba488c57efbb5d5f0638b44 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Tue, 19 Mar 2024 16:57:47 +0530 Subject: [PATCH 2/6] Update lib/node_modules/@stdlib/constants/float32/half-pi/package.json Co-authored-by: Athan Signed-off-by: GUNJ JOSHI --- .../@stdlib/constants/float32/half-pi/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/package.json b/lib/node_modules/@stdlib/constants/float32/half-pi/package.json index 25a53923056c..d9de8e2c135a 100644 --- a/lib/node_modules/@stdlib/constants/float32/half-pi/package.json +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/package.json @@ -58,8 +58,7 @@ "half", "pi", "ieee754", - "double", - "dbl", + "float", "floating-point", "float32" ] From 60d90d05aef451eef8afce79b0d0c7a224107b51 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Tue, 19 Mar 2024 17:23:08 +0530 Subject: [PATCH 3/6] feat: add constants/float32/half-pi --- .../constants/float32/half-pi/README.md | 38 ++++--------------- .../constants/float32/half-pi/docs/repl.txt | 2 +- .../float32/half-pi/docs/types/index.d.ts | 8 ++-- .../float32/half-pi/examples/index.js | 6 +-- .../stdlib/constants/float64/half_pi.h | 2 +- .../constants/float32/half-pi/lib/index.js | 14 ++++--- .../constants/float32/half-pi/test/test.js | 9 +++-- 7 files changed, 30 insertions(+), 49 deletions(-) diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/README.md b/lib/node_modules/@stdlib/constants/float32/half-pi/README.md index 015c3b7870e5..6c0af23e7fa1 100644 --- a/lib/node_modules/@stdlib/constants/float32/half-pi/README.md +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/README.md @@ -18,7 +18,7 @@ limitations under the License. --> -# HALF_PI +# FLOAT32_HALF_PI > One half times the mathematical constant [π][pi]. @@ -27,15 +27,15 @@ limitations under the License. ## Usage ```javascript -var HALF_PI = require( '@stdlib/constants/float32/half-pi' ); +var FLOAT32_HALF_PI = require( '@stdlib/constants/float32/half-pi' ); ``` -#### HALF_PI +#### FLOAT32_HALF_PI One half times the mathematical constant [π][pi]. ```javascript -var bool = ( HALF_PI === 1.5707963 ); +var bool = ( FLOAT32_HALF_PI === 1.5707963705062866 ); // returns true ``` @@ -52,10 +52,10 @@ var bool = ( HALF_PI === 1.5707963 ); ```javascript -var HALF_PI = require( '@stdlib/constants/float32/half-pi' ); +var FLOAT32_HALF_PI = require( '@stdlib/constants/float32/half-pi' ); -console.log( HALF_PI ); -// => 1.5707963 +console.log( FLOAT32_HALF_PI ); +// => 1.5707963705062866 ``` @@ -104,28 +104,10 @@ Macro for one half times the mathematical constant [π][pi]. - - -
- -
- - - - - - - @@ -136,12 +118,6 @@ Macro for one half times the mathematical constant [π][pi]. [pi]: https://en.wikipedia.org/wiki/Pi - - -[@stdlib/constants/float32/pi]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float32/pi - - - diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/docs/repl.txt b/lib/node_modules/@stdlib/constants/float32/half-pi/docs/repl.txt index 2da67de5dd19..7b3e0c732a3d 100644 --- a/lib/node_modules/@stdlib/constants/float32/half-pi/docs/repl.txt +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/docs/repl.txt @@ -5,7 +5,7 @@ Examples -------- > {{alias}} - 1.5707963 + 1.5707963705062866 See Also -------- diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/docs/types/index.d.ts b/lib/node_modules/@stdlib/constants/float32/half-pi/docs/types/index.d.ts index f4597b4980b5..5d78da0f3012 100644 --- a/lib/node_modules/@stdlib/constants/float32/half-pi/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/docs/types/index.d.ts @@ -22,12 +22,12 @@ * One half times the mathematical constant `π`. * * @example -* var val = HALF_PI; -* // returns 1.5707963 +* var val = FLOAT32_HALF_PI; +* // returns 1.5707963705062866 */ -declare const HALF_PI: number; +declare const FLOAT32_HALF_PI: number; // EXPORTS // -export = HALF_PI; +export = FLOAT32_HALF_PI; diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/examples/index.js b/lib/node_modules/@stdlib/constants/float32/half-pi/examples/index.js index 6e0e57de8363..7e5da5833d46 100644 --- a/lib/node_modules/@stdlib/constants/float32/half-pi/examples/index.js +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/examples/index.js @@ -18,7 +18,7 @@ 'use strict'; -var HALF_PI = require( './../lib' ); +var FLOAT32_HALF_PI = require( './../lib' ); -console.log( HALF_PI ); -// => 1.5707963 +console.log( FLOAT32_HALF_PI ); +// => 1.5707963705062866 diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/include/stdlib/constants/float64/half_pi.h b/lib/node_modules/@stdlib/constants/float32/half-pi/include/stdlib/constants/float64/half_pi.h index 373530d7860f..537e684f9d6d 100644 --- a/lib/node_modules/@stdlib/constants/float32/half-pi/include/stdlib/constants/float64/half_pi.h +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/include/stdlib/constants/float64/half_pi.h @@ -22,6 +22,6 @@ /** * Macro for one half times the mathematical constant π. */ -#define STDLIB_CONSTANT_FLOAT32_HALF_PI 1.5707963 +#define STDLIB_CONSTANT_FLOAT32_HALF_PI 1.5707963705062866f #endif // !STDLIB_CONSTANTS_FLOAT32_HALF_PI_H diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/lib/index.js b/lib/node_modules/@stdlib/constants/float32/half-pi/lib/index.js index 50ad79de5857..12d92e23aa2e 100644 --- a/lib/node_modules/@stdlib/constants/float32/half-pi/lib/index.js +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/lib/index.js @@ -25,10 +25,14 @@ * @type {number} * * @example -* var HALF_PI = require( '@stdlib/constants/float32/half-pi' ); -* // returns 1.5707963 +* var FLOAT32_HALF_PI = require( '@stdlib/constants/float32/half-pi' ); +* // returns 1.5707963705062866 */ +// MODULES // + +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); + // MAIN // @@ -37,12 +41,12 @@ * * @constant * @type {number} -* @default 1.5707963 +* @default 1.5707963705062866 * @see [Wikipedia]{@link https://en.wikipedia.org/wiki/Pi} */ -var HALF_PI = 1.5707963; +var FLOAT32_HALF_PI = float64ToFloat32( 1.5707963705062866 ); // EXPORTS // -module.exports = HALF_PI; +module.exports = FLOAT32_HALF_PI; diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/test/test.js b/lib/node_modules/@stdlib/constants/float32/half-pi/test/test.js index 4cabcba9ad73..428245043f38 100644 --- a/lib/node_modules/@stdlib/constants/float32/half-pi/test/test.js +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/test/test.js @@ -21,18 +21,19 @@ // MODULES // var tape = require( 'tape' ); -var HALF_PI = require( './../lib' ); +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); +var FLOAT32_HALF_PI = require( './../lib' ); // TESTS // tape( 'main export is a number', function test( t ) { t.ok( true, __filename ); - t.strictEqual( typeof HALF_PI, 'number', 'main export is a number' ); + t.strictEqual( typeof FLOAT32_HALF_PI, 'number', 'main export is a number' ); t.end(); }); -tape( 'export is a single-precision floating-point number equal to 1.5707963', function test( t ) { - t.equal( HALF_PI, 1.5707963, 'equals 1.5707963' ); +tape( 'export is a single-precision floating-point number equal to 1.5707963705062866', function test( t ) { + t.equal( FLOAT32_HALF_PI, float64ToFloat32( 1.5707963705062866 ), 'equals 1.5707963705062866' ); t.end(); }); From 50a3dae1d2d21a672522e210d47881750f58a9ea Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Tue, 19 Mar 2024 23:11:44 +0530 Subject: [PATCH 4/6] Update test.ts Signed-off-by: GUNJ JOSHI --- .../@stdlib/constants/float32/half-pi/docs/types/test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/docs/types/test.ts b/lib/node_modules/@stdlib/constants/float32/half-pi/docs/types/test.ts index f9eee7fd8874..3dccf5e60016 100644 --- a/lib/node_modules/@stdlib/constants/float32/half-pi/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/docs/types/test.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import HALF_PI = require( './index' ); +import FLOAT32_HALF_PI = require( './index' ); // TESTS // @@ -24,5 +24,5 @@ import HALF_PI = require( './index' ); // The export is a number... { // eslint-disable-next-line @typescript-eslint/no-unused-expressions - HALF_PI; // $ExpectType number + FLOAT32_HALF_PI; // $ExpectType number } From 40ab010fcf3bdb94bc9542fcc9dcae9eb59fead6 Mon Sep 17 00:00:00 2001 From: Athan Date: Tue, 19 Mar 2024 15:56:40 -0700 Subject: [PATCH 5/6] Apply suggestions from code review Signed-off-by: Athan --- .../float32/half-pi/include/stdlib/constants/float64/half_pi.h | 2 +- lib/node_modules/@stdlib/constants/float32/half-pi/lib/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/include/stdlib/constants/float64/half_pi.h b/lib/node_modules/@stdlib/constants/float32/half-pi/include/stdlib/constants/float64/half_pi.h index 537e684f9d6d..8b7089769cee 100644 --- a/lib/node_modules/@stdlib/constants/float32/half-pi/include/stdlib/constants/float64/half_pi.h +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/include/stdlib/constants/float64/half_pi.h @@ -22,6 +22,6 @@ /** * Macro for one half times the mathematical constant π. */ -#define STDLIB_CONSTANT_FLOAT32_HALF_PI 1.5707963705062866f +#define STDLIB_CONSTANT_FLOAT32_HALF_PI 1.5707963267948966f #endif // !STDLIB_CONSTANTS_FLOAT32_HALF_PI_H diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/lib/index.js b/lib/node_modules/@stdlib/constants/float32/half-pi/lib/index.js index 12d92e23aa2e..6e6856c41bbd 100644 --- a/lib/node_modules/@stdlib/constants/float32/half-pi/lib/index.js +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/lib/index.js @@ -44,7 +44,7 @@ var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); * @default 1.5707963705062866 * @see [Wikipedia]{@link https://en.wikipedia.org/wiki/Pi} */ -var FLOAT32_HALF_PI = float64ToFloat32( 1.5707963705062866 ); +var FLOAT32_HALF_PI = float64ToFloat32( 1.5707963267948966 ); // EXPORTS // From ad065c7970252315c6407e150f27a65d75f3e1e9 Mon Sep 17 00:00:00 2001 From: Athan Date: Tue, 19 Mar 2024 15:57:48 -0700 Subject: [PATCH 6/6] Apply suggestions from code review Signed-off-by: Athan --- lib/node_modules/@stdlib/constants/float32/half-pi/test/test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/constants/float32/half-pi/test/test.js b/lib/node_modules/@stdlib/constants/float32/half-pi/test/test.js index 428245043f38..f8f16eae933d 100644 --- a/lib/node_modules/@stdlib/constants/float32/half-pi/test/test.js +++ b/lib/node_modules/@stdlib/constants/float32/half-pi/test/test.js @@ -34,6 +34,6 @@ tape( 'main export is a number', function test( t ) { }); tape( 'export is a single-precision floating-point number equal to 1.5707963705062866', function test( t ) { - t.equal( FLOAT32_HALF_PI, float64ToFloat32( 1.5707963705062866 ), 'equals 1.5707963705062866' ); + t.equal( FLOAT32_HALF_PI, float64ToFloat32( 1.5707963267948966 ), 'returns expected value' ); t.end(); });