From 9185c9d63ebcdb53c426bb77fd7fbf0756169277 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Mon, 4 Aug 2025 10:24:51 +0530 Subject: [PATCH] feat: add `math/base/special/absgammalnf` --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - task: lint_c_examples status: passed - task: lint_c_benchmarks status: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../math/base/special/absgammalnf/LICENSE | 192 +++++++ .../math/base/special/absgammalnf/README.md | 199 +++++++ .../absgammalnf/benchmark/benchmark.js | 54 ++ .../absgammalnf/benchmark/benchmark.native.js | 63 +++ .../absgammalnf/benchmark/c/native/Makefile | 146 +++++ .../benchmark/c/native/benchmark.c | 138 +++++ .../math/base/special/absgammalnf/binding.gyp | 170 ++++++ .../base/special/absgammalnf/docs/repl.txt | 35 ++ .../special/absgammalnf/docs/types/index.d.ts | 60 ++ .../special/absgammalnf/docs/types/test.ts | 44 ++ .../special/absgammalnf/examples/c/Makefile | 146 +++++ .../special/absgammalnf/examples/c/example.c | 31 ++ .../special/absgammalnf/examples/index.js | 30 + .../base/special/absgammalnf/include.gypi | 53 ++ .../stdlib/math/base/special/absgammalnf.h | 38 ++ .../base/special/absgammalnf/lib/index.js | 58 ++ .../math/base/special/absgammalnf/lib/main.js | 401 ++++++++++++++ .../base/special/absgammalnf/lib/native.js | 70 +++ .../special/absgammalnf/lib/polyval_a0.js | 52 ++ .../special/absgammalnf/lib/polyval_a1.js | 52 ++ .../base/special/absgammalnf/lib/polyval_r.js | 52 ++ .../base/special/absgammalnf/lib/polyval_s.js | 52 ++ .../special/absgammalnf/lib/polyval_t2.js | 52 ++ .../base/special/absgammalnf/lib/polyval_u.js | 52 ++ .../base/special/absgammalnf/lib/polyval_v.js | 52 ++ .../base/special/absgammalnf/lib/polyval_w.js | 52 ++ .../base/special/absgammalnf/manifest.json | 93 ++++ .../base/special/absgammalnf/package.json | 72 +++ .../special/absgammalnf/scripts/evalpoly.js | 214 ++++++++ .../base/special/absgammalnf/src/Makefile | 70 +++ .../math/base/special/absgammalnf/src/addon.c | 22 + .../math/base/special/absgammalnf/src/main.c | 511 ++++++++++++++++++ .../absgammalnf/test/fixtures/julia/REQUIRE | 3 + .../test/fixtures/julia/decimals.json | 1 + .../test/fixtures/julia/integers.json | 1 + .../absgammalnf/test/fixtures/julia/runner.jl | 71 +++ .../base/special/absgammalnf/test/test.js | 147 +++++ .../special/absgammalnf/test/test.native.js | 156 ++++++ 38 files changed, 3705 insertions(+) create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/LICENSE create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/README.md create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/benchmark/benchmark.native.js create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/benchmark/c/native/Makefile create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/benchmark/c/native/benchmark.c create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/binding.gyp create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/examples/c/Makefile create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/examples/c/example.c create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/examples/index.js create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/include.gypi create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/include/stdlib/math/base/special/absgammalnf.h create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/index.js create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/main.js create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/native.js create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_a0.js create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_a1.js create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_r.js create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_s.js create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_t2.js create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_u.js create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_v.js create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_w.js create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/manifest.json create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/package.json create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/scripts/evalpoly.js create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/src/Makefile create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/src/addon.c create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/src/main.c create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/test/fixtures/julia/REQUIRE create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/test/fixtures/julia/decimals.json create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/test/fixtures/julia/integers.json create mode 100755 lib/node_modules/@stdlib/math/base/special/absgammalnf/test/fixtures/julia/runner.jl create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/test/test.js create mode 100644 lib/node_modules/@stdlib/math/base/special/absgammalnf/test/test.native.js diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/LICENSE b/lib/node_modules/@stdlib/math/base/special/absgammalnf/LICENSE new file mode 100644 index 000000000000..a7566ad6f2c3 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/LICENSE @@ -0,0 +1,192 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +DEPENDENCIES & ATTRIBUTION + +The library links against the following external libraries or contains +implementations from the following external libraries, which have their own +licenses: + +* FreeBSD + +Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/README.md b/lib/node_modules/@stdlib/math/base/special/absgammalnf/README.md new file mode 100644 index 000000000000..9bf1f6093c12 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/README.md @@ -0,0 +1,199 @@ + + +# absgammalnf + +> [Natural logarithm][@stdlib/math/base/special/lnf] of the [absolute][@stdlib/math/base/special/absf] value of the [gamma][@stdlib/math/base/special/gamma] function. + +
+ +## Usage + +```javascript +var absgammalnf = require( '@stdlib/math/base/special/absgammalnf' ); +``` + +#### absgammalnf( x ) + +Evaluates the [natural logarithm][@stdlib/math/base/special/lnf] of the [absolute][@stdlib/math/base/special/absf] value of the [gamma][@stdlib/math/base/special/gamma] function. + +```javascript +var v = absgammalnf( 2.0 ); +// returns 0.0 + +v = absgammalnf( 1.0 ); +// returns 0.0 + +v = absgammalnf( 4.0 ); +// returns ~1.792 + +v = absgammalnf( -0.5 ); +// returns ~1.266 + +v = absgammalnf( 0.5 ); +// returns ~0.572 + +v = absgammalnf( 0.0 ); +// returns Infinity + +v = absgammalnf( NaN ); +// returns NaN +``` + +
+ + + +
+ +## Examples + + + +```javascript +var uniform = require( '@stdlib/random/array/uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var absgammalnf = require( '@stdlib/math/base/special/absgammalnf' ); + +var opts = { + 'dtype': 'float32' +}; +var x = uniform( 100, -10.0, 10.0, opts ); + +logEachMap( 'absgammalnf(%0.4f) = %0.4f', x, absgammalnf ); +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/absgammalnf.h" +``` + +#### stdlib_base_absgammalnf( x ) + +Evaluates the [natural logarithm][@stdlib/math/base/special/lnf] of the [absolute][@stdlib/math/base/special/absf] value of the [gamma][@stdlib/math/base/special/gamma] function. + +```c +float out = stdlib_base_absgammalnf( 2.0f ); +// returns 0.0f + +out = stdlib_base_absgammalnf( 4.0f ); +// returns ~1.792f +``` + +The function accepts the following arguments: + +- **x**: `[in] float` input value. + +```c +float stdlib_base_absgammalnf( const float x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/absgammalnf.h" +#include + +int main( void ) { + const float x[] = { 4.0f, -1.5f, -0.5f, 0.5f }; + + float y; + int i; + for ( i = 0; i < 4; i++ ) { + y = stdlib_base_absgammalnf( x[ i ] ); + printf( "absgammalnf(%f) = %f\n", x[ i ], y ); + } +} +``` + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/absgammalnf/benchmark/benchmark.js new file mode 100644 index 000000000000..1b0134f72738 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/benchmark/benchmark.js @@ -0,0 +1,54 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var pkg = require( './../package.json' ).name; +var absgammalnf = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var x; + var y; + var i; + + x = uniform( 100, -500.0, 500.0, { + 'dtype': 'float32' + }); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = absgammalnf( x[ i%x.length ] ); + if ( isnanf( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnanf( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/absgammalnf/benchmark/benchmark.native.js new file mode 100644 index 000000000000..d77fd9d35bf1 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/benchmark/benchmark.native.js @@ -0,0 +1,63 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 resolve = require( 'path' ).resolve; +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var absgammalnf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( absgammalnf instanceof Error ) +}; + + +// MAIN // + +bench( pkg+'::native', opts, function benchmark( b ) { + var x; + var y; + var i; + + x = uniform( 100, -500.0, 500.0, { + 'dtype': 'float32' + }); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = absgammalnf( x[ i%x.length ] ); + if ( isnanf( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnanf( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/benchmark/c/native/Makefile b/lib/node_modules/@stdlib/math/base/special/absgammalnf/benchmark/c/native/Makefile new file mode 100644 index 000000000000..a4bd7b38fd74 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/benchmark/c/native/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2025 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. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := benchmark.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled benchmarks. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/absgammalnf/benchmark/c/native/benchmark.c new file mode 100644 index 000000000000..df63104e74ab --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/benchmark/c/native/benchmark.c @@ -0,0 +1,138 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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. +*/ + +#include "stdlib/math/base/special/absgammalnf.h" +#include +#include +#include +#include +#include + +#define NAME "absgammalnf" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +static void print_version( void ) { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +static void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +static void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +static double tic( void ) { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec / 1.0e6; +} + +/** +* Generates a random number on the interval [min,max). +* +* @param min minimum value (inclusive) +* @param max maximum value (exclusive) +* @return random number +*/ +static float random_uniform( const float min, const float max ) { + float v = (float)rand() / ( (float)RAND_MAX + 1.0f ); + return min + ( v*(max-min) ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + float x[ 100 ]; + double elapsed; + double t; + float y; + int i; + + for ( i = 0; i < 100; i++ ) { + x[ i ] = random_uniform( -500.0f, 500.0f ); + } + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + y = stdlib_base_absgammalnf( x[ i%100 ] ); + if ( y != y ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( y != y ) { + printf( "should not return NaN\n" ); + } + return elapsed; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + double elapsed; + int i; + + // Use the current time to seed the random number generator: + srand( time( NULL ) ); + + print_version(); + for ( i = 0; i < REPEATS; i++ ) { + printf( "# c::native::%s\n", NAME ); + elapsed = benchmark(); + print_results( elapsed ); + printf( "ok %d benchmark finished\n", i+1 ); + } + print_summary( REPEATS, REPEATS ); +} diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/binding.gyp b/lib/node_modules/@stdlib/math/base/special/absgammalnf/binding.gyp new file mode 100644 index 000000000000..68a1ca11d160 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/binding.gyp @@ -0,0 +1,170 @@ +# @license Apache-2.0 +# +# Copyright (c) 2025 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. + +# A `.gyp` file for building a Node.js native add-on. +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # List of files to include in this file: + 'includes': [ + './include.gypi', + ], + + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Target name should match the add-on export name: + 'addon_target_name%': 'addon', + + # Set variables based on the host OS: + 'conditions': [ + [ + 'OS=="win"', + { + # Define the object file suffix: + 'obj': 'obj', + }, + { + # Define the object file suffix: + 'obj': 'o', + } + ], # end condition (OS=="win") + ], # end conditions + }, # end variables + + # Define compile targets: + 'targets': [ + + # Target to generate an add-on: + { + # The target name should match the add-on export name: + 'target_name': '<(addon_target_name)', + + # Define dependencies: + 'dependencies': [], + + # Define directories which contain relevant include headers: + 'include_dirs': [ + # Local include directory: + '<@(include_dirs)', + ], + + # List of source files: + 'sources': [ + '<@(src_files)', + ], + + # Settings which should be applied when a target's object files are used as linker input: + 'link_settings': { + # Define libraries: + 'libraries': [ + '<@(libraries)', + ], + + # Define library directories: + 'library_dirs': [ + '<@(library_dirs)', + ], + }, + + # C/C++ compiler flags: + 'cflags': [ + # Enable commonly used warning options: + '-Wall', + + # Aggressive optimization: + '-O3', + ], + + # C specific compiler flags: + 'cflags_c': [ + # Specify the C standard to which a program is expected to conform: + '-std=c99', + ], + + # C++ specific compiler flags: + 'cflags_cpp': [ + # Specify the C++ standard to which a program is expected to conform: + '-std=c++11', + ], + + # Linker flags: + 'ldflags': [], + + # Apply conditions based on the host OS: + 'conditions': [ + [ + 'OS=="mac"', + { + # Linker flags: + 'ldflags': [ + '-undefined dynamic_lookup', + '-Wl,-no-pie', + '-Wl,-search_paths_first', + ], + }, + ], # end condition (OS=="mac") + [ + 'OS!="win"', + { + # C/C++ flags: + 'cflags': [ + # Generate platform-independent code: + '-fPIC', + ], + }, + ], # end condition (OS!="win") + ], # end conditions + }, # end target <(addon_target_name) + + # Target to copy a generated add-on to a standard location: + { + 'target_name': 'copy_addon', + + # Declare that the output of this target is not linked: + 'type': 'none', + + # Define dependencies: + 'dependencies': [ + # Require that the add-on be generated before building this target: + '<(addon_target_name)', + ], + + # Define a list of actions: + 'actions': [ + { + 'action_name': 'copy_addon', + 'message': 'Copying addon...', + + # Explicitly list the inputs in the command-line invocation below: + 'inputs': [], + + # Declare the expected outputs: + 'outputs': [ + '<(addon_output_dir)/<(addon_target_name).node', + ], + + # Define the command-line invocation: + 'action': [ + 'cp', + '<(PRODUCT_DIR)/<(addon_target_name).node', + '<(addon_output_dir)/<(addon_target_name).node', + ], + }, + ], # end actions + }, # end target copy_addon + ], # end targets +} diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/absgammalnf/docs/repl.txt new file mode 100644 index 000000000000..cdb7cc1ecacd --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/docs/repl.txt @@ -0,0 +1,35 @@ + +{{alias}}( x ) + Evaluates the natural logarithm of the absolute value of the gamma function + for a single-precision floating-point number. + + Parameters + ---------- + x: number + Input value. + + Returns + ------- + y: number + Natural logarithm of the absolute value of the gamma function. + + Examples + -------- + > var y = {{alias}}( 1.0 ) + 0.0 + > y = {{alias}}( 2.0 ) + 0.0 + > y = {{alias}}( 4.0 ) + ~1.792 + > y = {{alias}}( -0.5 ) + ~1.266 + > y = {{alias}}( 0.5 ) + ~0.572 + > y = {{alias}}( 0.0 ) + Infinity + > y = {{alias}}( NaN ) + NaN + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/absgammalnf/docs/types/index.d.ts new file mode 100644 index 000000000000..3d2507f04477 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/docs/types/index.d.ts @@ -0,0 +1,60 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 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 + +/** +* Evaluates the natural logarithm of the absolute value of the gamma function for a single-precision floating-point number. +* +* @param x - input value +* @returns function value +* +* @example +* var v = absgammalnf( 1.0 ); +* // returns 0.0 +* +* @example +* var v = absgammalnf( 2.0 ); +* // returns 0.0 +* +* @example +* var v = absgammalnf( 4.0 ); +* // returns ~1.792 +* +* @example +* var v = absgammalnf( -0.5 ); +* // returns ~1.266 +* +* @example +* var v = absgammalnf( 0.5 ); +* // returns ~0.572 +* +* @example +* var v = absgammalnf( 0.0 ); +* // returns Infinity +* +* @example +* var v = absgammalnf( NaN ); +* // returns NaN +*/ +declare function absgammalnf( x: number ): number; + + +// EXPORTS // + +export = absgammalnf; diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/special/absgammalnf/docs/types/test.ts new file mode 100644 index 000000000000..305641af4fc2 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/docs/types/test.ts @@ -0,0 +1,44 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 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 absgammalnf = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + absgammalnf( 8 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided a value other than a number... +{ + absgammalnf( true ); // $ExpectError + absgammalnf( false ); // $ExpectError + absgammalnf( null ); // $ExpectError + absgammalnf( undefined ); // $ExpectError + absgammalnf( '5' ); // $ExpectError + absgammalnf( [] ); // $ExpectError + absgammalnf( {} ); // $ExpectError + absgammalnf( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + absgammalnf(); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/examples/c/Makefile b/lib/node_modules/@stdlib/math/base/special/absgammalnf/examples/c/Makefile new file mode 100644 index 000000000000..25ced822f96a --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2025 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. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := example.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled examples. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/absgammalnf/examples/c/example.c new file mode 100644 index 000000000000..da6cf20f93c1 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/examples/c/example.c @@ -0,0 +1,31 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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. +*/ + +#include "stdlib/math/base/special/absgammalnf.h" +#include + +int main( void ) { + const float x[] = { 4.0f, -1.5f, -0.5f, 0.5f }; + + float y; + int i; + for ( i = 0; i < 4; i++ ) { + y = stdlib_base_absgammalnf( x[ i ] ); + printf( "absgammalnf(%f) = %f\n", x[ i ], y ); + } +} diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/examples/index.js b/lib/node_modules/@stdlib/math/base/special/absgammalnf/examples/index.js new file mode 100644 index 000000000000..152f50f2653f --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/examples/index.js @@ -0,0 +1,30 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 uniform = require( '@stdlib/random/array/uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var absgammalnf = require( './../lib' ); + +var opts = { + 'dtype': 'float32' +}; +var x = uniform( 100, -10.0, 10.0, opts ); + +logEachMap( 'absgammalnf(%0.4f) = %0.4f', x, absgammalnf ); diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/include.gypi b/lib/node_modules/@stdlib/math/base/special/absgammalnf/include.gypi new file mode 100644 index 000000000000..ecfaf82a3279 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/include.gypi @@ -0,0 +1,53 @@ +# @license Apache-2.0 +# +# Copyright (c) 2025 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. + +# A GYP include file for building a Node.js native add-on. +# +# Main documentation: +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Source directory: + 'src_dir': './src', + + # Include directories: + 'include_dirs': [ + ' --> +* +* Note that one should avoid computing \\(\pi (-x)\\) directly in the computation of \\(\sin(\pi (-x))\\). +* +* +* +* ## Special Cases +* +* ```tex +* \begin{align*} +* \operatorname{lgamma}(2+s) &\approx s (1-\gamma) & \mathrm{for\ tiny\ s} \\ +* \operatorname{lgamma}(x) &\approx -\ln(x) & \mathrm{for\ tiny\ x} \\ +* \operatorname{lgamma}(1) &= 0 & \\ +* \operatorname{lgamma}(2) &= 0 & \\ +* \operatorname{lgamma}(0) &= \infty & \\ +* \operatorname{lgamma}(\infty) &= \infty & \\ +* \operatorname{lgamma}(-\mathrm{integer}) &= \pm \infty +* \end{align*} +* ``` +* +* @param {number} x - input value +* @returns {number} function value +* +* @example +* var v = absgammalnf( 1.0 ); +* // returns 0.0 +* +* @example +* var v = absgammalnf( 2.0 ); +* // returns 0.0 +* +* @example +* var v = absgammalnf( 4.0 ); +* // returns ~1.792 +* +* @example +* var v = absgammalnf( -0.5 ); +* // returns ~1.266 +* +* @example +* var v = absgammalnf( 0.5 ); +* // returns ~0.572 +* +* @example +* var v = absgammalnf( 0.0 ); +* // returns Infinity +* +* @example +* var v = absgammalnf( NaN ); +* // returns NaN +*/ +function absgammalnf( x ) { + var isNegative; + var nadj; + var flg; + var p2; + var p1; + var p; + var q; + var t; + var w; + var y; + var z; + var r; + + x = f32( x ); + + // Special cases: NaN, +-infinity + if ( isnanf( x ) || isInfinitef( x ) ) { + return x; + } + // Special case: 0 + if ( x === ZERO ) { + return PINF; + } + if ( x < ZERO ) { + isNegative = true; + x = f32( -x ); + } else { + isNegative = false; + } + // If |x| < 2**-27, return -ln(|x|) + if ( x < TINY ) { + return -lnf( x ); + } + if ( isNegative ) { + // If |x| >= 2**23, must be -integer + if ( x >= TWO23 ) { + return PINF; + } + t = sinpif( x ); + if ( t === ZERO ) { + return PINF; + } + nadj = lnf( f32( PI / absf( f32( t*x ) ) ) ); + } + // If x equals 1 or 2, return 0 + if ( x === ONE || x === TWO ) { + return ZERO; + } + // If x < 2, use lgamma(x) = lgamma(x+1) - log(x) + if ( x < TWO ) { + if ( x <= f32( 0.9 ) ) { + r = -lnf( x ); + + // 0.7316 <= x <= 0.9 + if ( x >= f32( f32( YMIN-ONE ) + f32( 0.27 ) ) ) { + y = f32( ONE - x ); + flg = 0; + } + // 0.2316 <= x < 0.7316 + else if ( x >= f32( f32( YMIN-ONE ) - f32( 0.23 ) ) ) { + y = f32( x - f32( YMIN - ONE ) ); + flg = 1; + } + // 0 < x < 0.2316 + else { + y = x; + flg = 2; + } + } else { + r = ZERO; + + // 1.7316 <= x < 2 + if ( x >= f32( YMIN + f32( 0.27 ) ) ) { + y = f32( TWO - x ); + flg = 0; + } + // 1.2316 <= x < 1.7316 + else if ( x >= f32( YMIN - f32( 0.23 ) ) ) { + y = f32( x - YMIN ); + flg = 1; + } + // 0.9 < x < 1.2316 + else { + y = f32( x - ONE ); + flg = 2; + } + } + switch ( flg ) { // eslint-disable-line default-case + case 0: + z = f32( y * y ); + p1 = polyvalA0( z ); + p2 = f32( z * polyvalA1( z ) ); + p = f32( f32( y*p1 ) + p2 ); + r = f32( r + f32( p - f32( HALF*y ) ) ); + break; + case 1: + z = f32( y * y ); + p = f32( f32( T0C + f32( y*T1C ) ) + f32( z * polyvalT2( y ) ) ); + r = f32( r + f32( TF + p ) ); + break; + case 2: + p1 = f32( y * polyvalU( y ) ); + p2 = f32( ONE + f32( y * polyvalV( y ) ) ); + r = f32( r + f32( f32( p1/p2 ) - f32( HALF*y ) ) ); + break; + } + } + // 2 <= x < 8 + else if ( x < EIGHT ) { + flg = truncf( x ); + y = f32( x - flg ); + p = f32( y * polyvalS( y ) ); + q = f32( ONE + f32( y * polyvalR( y ) ) ); + r = f32( f32( HALF*y ) + f32( p/q ) ); + z = ONE; // gammaln(1+s) = ln(s) + gammaln(s) + switch ( flg ) { // eslint-disable-line default-case + case 7: + z = f32( z * f32( y + SIX ) ); + + /* Falls through */ + case 6: + z = f32( z * f32( y + FIVE ) ); + + /* Falls through */ + case 5: + z = f32( z * f32( y + FOUR ) ); + + /* Falls through */ + case 4: + z = f32( z * f32( y + THREE ) ); + + /* Falls through */ + case 3: + z = f32( z * f32( y + TWO ) ); + r = f32( r + lnf( z ) ); + } + } + // 8 <= x < 2**27 + else if ( x < TWO27 ) { + t = lnf( x ); + z = f32( ONE / x ); + y = f32( z * z ); + w = f32( W0C + f32( z * polyvalW( y ) ) ); + r = f32( f32( f32( x-HALF ) * f32( t-ONE ) ) + w ); + } + // 2**27 <= x <= Inf + else { + r = f32( x * f32( lnf(x)-ONE ) ); + } + if ( isNegative ) { + r = f32( nadj - r ); + } + return r; +} + + +// EXPORTS // + +module.exports = absgammalnf; diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/native.js b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/native.js new file mode 100644 index 000000000000..69e98ed27f36 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/native.js @@ -0,0 +1,70 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 addon = require( './../src/addon.node' ); + + +// MAIN // + +/** +* Evaluates the natural logarithm of the absolute value of the gamma function for a single-precision floating-point number. +* +* @private +* @param {number} x - input value +* @returns {number} function value +* +* @example +* var v = absgammalnf( 1.0 ); +* // returns 0.0 +* +* @example +* var v = absgammalnf( 2.0 ); +* // returns 0.0 +* +* @example +* var v = absgammalnf( 4.0 ); +* // returns ~1.792 +* +* @example +* var v = absgammalnf( -0.5 ); +* // returns ~1.266 +* +* @example +* var v = absgammalnf( 0.5 ); +* // returns ~0.572 +* +* @example +* var v = absgammalnf( 0.0 ); +* // returns Infinity +* +* @example +* var v = absgammalnf( NaN ); +* // returns NaN +*/ +function absgammalnf( x ) { + return addon( x ); +} + + +// EXPORTS // + +module.exports = absgammalnf; diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_a0.js b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_a0.js new file mode 100644 index 000000000000..0ba822e6bca9 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_a0.js @@ -0,0 +1,52 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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. +*/ + +/* This is a generated file. Do not edit directly. */ +'use strict'; + +// MODULES // + +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); + + +// MAIN // + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @private +* @param {number} x - value at which to evaluate the polynomial +* @returns {number} evaluated polynomial +*/ +function evalpoly( x ) { + if ( x === 0.0 ) { + return 0.07721566408872604; + } + return float64ToFloat32(0.07721566408872604 + float64ToFloat32(x * float64ToFloat32(0.06734848022460938 + float64ToFloat32(x * 0.006982756312936544)))); // eslint-disable-line max-len +} + + +// EXPORTS // + +module.exports = evalpoly; diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_a1.js b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_a1.js new file mode 100644 index 000000000000..bce98f800b30 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_a1.js @@ -0,0 +1,52 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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. +*/ + +/* This is a generated file. Do not edit directly. */ +'use strict'; + +// MODULES // + +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); + + +// MAIN // + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @private +* @param {number} x - value at which to evaluate the polynomial +* @returns {number} evaluated polynomial +*/ +function evalpoly( x ) { + if ( x === 0.0 ) { + return 0.3224671185016632; + } + return float64ToFloat32(0.3224671185016632 + float64ToFloat32(x * float64ToFloat32(0.020639566704630852 + float64ToFloat32(x * 0.004117684438824654)))); // eslint-disable-line max-len +} + + +// EXPORTS // + +module.exports = evalpoly; diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_r.js b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_r.js new file mode 100644 index 000000000000..827bfb6ba9cf --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_r.js @@ -0,0 +1,52 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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. +*/ + +/* This is a generated file. Do not edit directly. */ +'use strict'; + +// MODULES // + +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); + + +// MAIN // + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @private +* @param {number} x - value at which to evaluate the polynomial +* @returns {number} evaluated polynomial +*/ +function evalpoly( x ) { + if ( x === 0.0 ) { + return 0.679650068283081; + } + return float64ToFloat32(0.679650068283081 + float64ToFloat32(x * float64ToFloat32(0.11605872958898544 + float64ToFloat32(x * 0.003756736870855093)))); // eslint-disable-line max-len +} + + +// EXPORTS // + +module.exports = evalpoly; diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_s.js b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_s.js new file mode 100644 index 000000000000..9e7c4b9c0420 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_s.js @@ -0,0 +1,52 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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. +*/ + +/* This is a generated file. Do not edit directly. */ +'use strict'; + +// MODULES // + +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); + + +// MAIN // + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @private +* @param {number} x - value at which to evaluate the polynomial +* @returns {number} evaluated polynomial +*/ +function evalpoly( x ) { + if ( x === 0.0 ) { + return -0.07721566408872604; + } + return float64ToFloat32(-0.07721566408872604 + float64ToFloat32(x * float64ToFloat32(0.26998740434646606 + float64ToFloat32(x * float64ToFloat32(0.14285100996494293 + float64ToFloat32(x * 0.011938951909542084)))))); // eslint-disable-line max-len +} + + +// EXPORTS // + +module.exports = evalpoly; diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_t2.js b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_t2.js new file mode 100644 index 000000000000..512ca96bfe12 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_t2.js @@ -0,0 +1,52 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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. +*/ + +/* This is a generated file. Do not edit directly. */ +'use strict'; + +// MODULES // + +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); + + +// MAIN // + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @private +* @param {number} x - value at which to evaluate the polynomial +* @returns {number} evaluated polynomial +*/ +function evalpoly( x ) { + if ( x === 0.0 ) { + return 0.48383641242980957; + } + return float64ToFloat32(0.48383641242980957 + float64ToFloat32(x * float64ToFloat32(-0.14758621156215668 + float64ToFloat32(x * float64ToFloat32(0.06460130959749222 + float64ToFloat32(x * float64ToFloat32(-0.03284503519535065 + float64ToFloat32(x * float64ToFloat32(0.01864837482571602 + float64ToFloat32(x * -0.009892062284052372)))))))))); // eslint-disable-line max-len +} + + +// EXPORTS // + +module.exports = evalpoly; diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_u.js b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_u.js new file mode 100644 index 000000000000..0ed9cb1bc9e0 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_u.js @@ -0,0 +1,52 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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. +*/ + +/* This is a generated file. Do not edit directly. */ +'use strict'; + +// MODULES // + +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); + + +// MAIN // + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @private +* @param {number} x - value at which to evaluate the polynomial +* @returns {number} evaluated polynomial +*/ +function evalpoly( x ) { + if ( x === 0.0 ) { + return -0.07721566408872604; + } + return float64ToFloat32(-0.07721566408872604 + float64ToFloat32(x * float64ToFloat32(0.7367897033691406 + float64ToFloat32(x * 0.4956490397453308)))); // eslint-disable-line max-len +} + + +// EXPORTS // + +module.exports = evalpoly; diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_v.js b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_v.js new file mode 100644 index 000000000000..110ccef68370 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_v.js @@ -0,0 +1,52 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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. +*/ + +/* This is a generated file. Do not edit directly. */ +'use strict'; + +// MODULES // + +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); + + +// MAIN // + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @private +* @param {number} x - value at which to evaluate the polynomial +* @returns {number} evaluated polynomial +*/ +function evalpoly( x ) { + if ( x === 0.0 ) { + return 1.1095842123031616; + } + return float64ToFloat32(1.1095842123031616 + float64ToFloat32(x * float64ToFloat32(0.21059811115264893 + float64ToFloat32(x * -0.01029954943805933)))); // eslint-disable-line max-len +} + + +// EXPORTS // + +module.exports = evalpoly; diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_w.js b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_w.js new file mode 100644 index 000000000000..01a37d1a6073 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/lib/polyval_w.js @@ -0,0 +1,52 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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. +*/ + +/* This is a generated file. Do not edit directly. */ +'use strict'; + +// MODULES // + +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); + + +// MAIN // + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @private +* @param {number} x - value at which to evaluate the polynomial +* @returns {number} evaluated polynomial +*/ +function evalpoly( x ) { + if ( x === 0.0 ) { + return 0.08333324640989304; + } + return float64ToFloat32(0.08333324640989304 + float64ToFloat32(x * -0.0027612908743321896)); // eslint-disable-line max-len +} + + +// EXPORTS // + +module.exports = evalpoly; diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/manifest.json b/lib/node_modules/@stdlib/math/base/special/absgammalnf/manifest.json new file mode 100644 index 000000000000..dd95c98660f9 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/manifest.json @@ -0,0 +1,93 @@ +{ + "options": { + "task": "build" + }, + "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": [ + { + "task": "build", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/napi/unary", + "@stdlib/math/base/assert/is-nanf", + "@stdlib/math/base/assert/is-infinitef", + "@stdlib/math/base/special/absf", + "@stdlib/math/base/special/lnf", + "@stdlib/math/base/special/truncf", + "@stdlib/math/base/special/sinpif", + "@stdlib/constants/float32/pinf", + "@stdlib/constants/float32/pi" + ] + }, + { + "task": "benchmark", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/assert/is-nanf", + "@stdlib/math/base/assert/is-infinitef", + "@stdlib/math/base/special/absf", + "@stdlib/math/base/special/lnf", + "@stdlib/math/base/special/truncf", + "@stdlib/math/base/special/sinpif", + "@stdlib/constants/float32/pinf", + "@stdlib/constants/float32/pi" + ] + }, + { + "task": "examples", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/assert/is-nanf", + "@stdlib/math/base/assert/is-infinitef", + "@stdlib/math/base/special/absf", + "@stdlib/math/base/special/lnf", + "@stdlib/math/base/special/truncf", + "@stdlib/math/base/special/sinpif", + "@stdlib/constants/float32/pinf", + "@stdlib/constants/float32/pi" + ] + } + ] +} diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/package.json b/lib/node_modules/@stdlib/math/base/special/absgammalnf/package.json new file mode 100644 index 000000000000..5a7329cd1565 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/package.json @@ -0,0 +1,72 @@ +{ + "name": "@stdlib/math/base/special/absgammalnf", + "version": "0.0.0", + "description": "Natural logarithm of the absolute value of the gamma function for a single-precision floating-point number.", + "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", + "gypfile": true, + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "include": "./include", + "lib": "./lib", + "scripts": "./scripts", + "src": "./src", + "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", + "mathematics", + "math", + "special", + "function", + "gamma", + "factorial", + "natural", + "logarithm", + "log", + "ln", + "lgamma", + "lgammaf", + "float" + ] +} diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/scripts/evalpoly.js b/lib/node_modules/@stdlib/math/base/special/absgammalnf/scripts/evalpoly.js new file mode 100644 index 000000000000..93ab664fb1fe --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/scripts/evalpoly.js @@ -0,0 +1,214 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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. +*/ + +/* +* This script compiles modules for evaluating polynomial functions. If any polynomial coefficients change, this script should be rerun to update the compiled files. +*/ +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var readFileSync = require( '@stdlib/fs/read-file' ).sync; +var writeFileSync = require( '@stdlib/fs/write-file' ).sync; +var currentYear = require( '@stdlib/time/current-year' ); +var licenseHeader = require( '@stdlib/_tools/licenses/header' ); +var compile = require( '@stdlib/math/base/tools/evalpoly-compile' ); +var compileC = require( '@stdlib/math/base/tools/evalpoly-compile-c' ); +var substringBefore = require( '@stdlib/string/substring-before' ); +var substringAfter = require( '@stdlib/string/substring-after' ); +var format = require( '@stdlib/string/format' ); + + +// VARIABLES // + +// Polynomial coefficients ordered in ascending degree... +var A0 = [ + 7.72156641e-02, // 0x3D9E233F + 6.73484802e-02, // 0x3D89EE00 + 6.98275631e-03 // 0x3BE4CF9B +]; +var A1 = [ + 3.22467119e-01, // 0x3EA51A69 + 2.06395667e-02, // 0x3CA9144F + 4.11768444e-03 // 0x3B86EDA4 +]; +var R = [ + 6.79650068e-01, // 0x3F2DFD8C + 1.16058730e-01, // 0x3DEDB033 + 3.75673687e-03 // 0x3B763396 +]; +var S = [ + -7.72156641e-02, // 0xBD9E233F + 2.69987404e-01, // 0x3E8A3BCA + 1.42851010e-01, // 0x3E124789 + 1.19389519e-02 // 0x3C439B98 +]; +var T2 = [ + 4.83836412e-01, // 0x3EF7B968 + -1.47586212e-01, // 0xBE1720D7 + 6.46013096e-02, // 0x3D844DB1 + -3.28450352e-02, // 0xBD068884 + 1.86483748e-02, // 0x3C98C47A + -9.89206228e-03 // 0xBC221251 +]; +var U = [ + -7.72156641e-02, // 0xBD9E233F + 7.36789703e-01, // 0x3F3C9E40 + 4.95649040e-01 // 0x3EFDC5B6 +]; +var V = [ + 1.10958421e+00, // 0x3F8E06DB + 2.10598111e-01, // 0x3E57A708 + -1.02995494e-02 // 0xBC28BF71 +]; +var W = [ + 8.33332464e-02, // 0x3DAAAA9F + -2.76129087e-03 // 0xBB34F6C6 +]; + +// Header to add to output files: +var header = licenseHeader( 'Apache-2.0', 'js', { + 'year': currentYear(), + 'copyright': 'The Stdlib Authors' +}); +header += '\n/* This is a generated file. Do not edit directly. */\n'; + + +// FUNCTIONS // + +/** +* Inserts a compiled function into file content. +* +* @private +* @param {string} text - source content +* @param {string} id - function identifier +* @param {string} str - function string +* @returns {string} updated content +*/ +function insert( text, id, str ) { + var before; + var after; + var begin; + var end; + + begin = '// BEGIN: '+id; + end = '// END: '+id; + + before = substringBefore( text, begin ); + after = substringAfter( text, end ); + + return format( '%s// BEGIN: %s\n\n%s\n%s%s', before, id, str, end, after ); +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var fpath; + var copts; + var opts; + var file; + var str; + + opts = { + 'encoding': 'utf8', + 'dtype': 'float32' + }; + + fpath = resolve( __dirname, '..', 'lib', 'polyval_a0.js' ); + str = header + compile( A0, opts ); + writeFileSync( fpath, str, opts ); + + fpath = resolve( __dirname, '..', 'lib', 'polyval_a1.js' ); + str = header + compile( A1, opts ); + writeFileSync( fpath, str, opts ); + + fpath = resolve( __dirname, '..', 'lib', 'polyval_r.js' ); + str = header + compile( R, opts ); + writeFileSync( fpath, str, opts ); + + fpath = resolve( __dirname, '..', 'lib', 'polyval_s.js' ); + str = header + compile( S, opts ); + writeFileSync( fpath, str, opts ); + + fpath = resolve( __dirname, '..', 'lib', 'polyval_t2.js' ); + str = header + compile( T2, opts ); + writeFileSync( fpath, str, opts ); + + fpath = resolve( __dirname, '..', 'lib', 'polyval_u.js' ); + str = header + compile( U, opts ); + writeFileSync( fpath, str, opts ); + + fpath = resolve( __dirname, '..', 'lib', 'polyval_v.js' ); + str = header + compile( V, opts ); + writeFileSync( fpath, str, opts ); + + fpath = resolve( __dirname, '..', 'lib', 'polyval_w.js' ); + str = header + compile( W, opts ); + writeFileSync( fpath, str, opts ); + + copts = { + 'dtype': 'float', + 'name': '' + }; + + fpath = resolve( __dirname, '..', 'src', 'main.c' ); + file = readFileSync( fpath, opts ); + + copts.name = 'polyval_a0'; + str = compileC( A0, copts ); + file = insert( file, copts.name, str ); + + copts.name = 'polyval_a1'; + str = compileC( A1, copts ); + file = insert( file, copts.name, str ); + + copts.name = 'polyval_r'; + str = compileC( R, copts ); + file = insert( file, copts.name, str ); + + copts.name = 'polyval_s'; + str = compileC( S, copts ); + file = insert( file, copts.name, str ); + + copts.name = 'polyval_t2'; + str = compileC( T2, copts ); + file = insert( file, copts.name, str ); + + copts.name = 'polyval_u'; + str = compileC( U, copts ); + file = insert( file, copts.name, str ); + + copts.name = 'polyval_v'; + str = compileC( V, copts ); + file = insert( file, copts.name, str ); + + copts.name = 'polyval_w'; + str = compileC( W, copts ); + file = insert( file, copts.name, str ); + + writeFileSync( fpath, file, opts ); +} + +main(); diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/src/Makefile b/lib/node_modules/@stdlib/math/base/special/absgammalnf/src/Makefile new file mode 100644 index 000000000000..7733b6180cb4 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/src/Makefile @@ -0,0 +1,70 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2025 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. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + + +# RULES # + +#/ +# Removes generated files for building an add-on. +# +# @example +# make clean-addon +#/ +clean-addon: + $(QUIET) -rm -f *.o *.node + +.PHONY: clean-addon + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: clean-addon + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/src/addon.c b/lib/node_modules/@stdlib/math/base/special/absgammalnf/src/addon.c new file mode 100644 index 000000000000..696994b4040c --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/src/addon.c @@ -0,0 +1,22 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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. +*/ + +#include "stdlib/math/base/special/absgammalnf.h" +#include "stdlib/math/base/napi/unary.h" + +STDLIB_MATH_BASE_NAPI_MODULE_F_F( stdlib_base_absgammalnf ) diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/src/main.c b/lib/node_modules/@stdlib/math/base/special/absgammalnf/src/main.c new file mode 100644 index 000000000000..a6212d1d1399 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/src/main.c @@ -0,0 +1,511 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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. +* +* +* ## Notice +* +* The following copyright, license, and long comment were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/12.2.0/lib/msun/src/e_lgammaf_r.c}. The implementation follows the original, but has been modified according to stdlib conventions. +* +* ```text +* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +* +* Developed at SunPro, a Sun Microsystems, Inc. business. +* Permission to use, copy, modify, and distribute this +* software is freely granted, provided that this notice +* is preserved. +* ``` +*/ + +#include "stdlib/math/base/special/absgammalnf.h" +#include "stdlib/math/base/assert/is_nanf.h" +#include "stdlib/math/base/assert/is_infinitef.h" +#include "stdlib/math/base/special/absf.h" +#include "stdlib/math/base/special/lnf.h" +#include "stdlib/math/base/special/truncf.h" +#include "stdlib/math/base/special/sinpif.h" +#include "stdlib/constants/float32/pi.h" +#include "stdlib/constants/float32/pinf.h" +#include + +static const float T0C = -2.94064460e-11f; // 0xAE0154B7 +static const float T1C = -2.35939837e-08f; // 0xB2CAABB8 +static const float W0C = 4.18938547e-01f; // 0x3ED67F1D +static const float TWO23 = 8388608.0f; // 2**23 +static const float TWO27 = 134217728.0f; // 2**27 +static const float TINY = 7.450580596923828e-9f; // 2**-27 +static const float YMIN = 1.46163213e+00f; // 0x3FBB16C3 +static const float TF = -1.21486291e-01f; // 0xBDF8CDCE + +/* Begin auto-generated functions. The following functions are auto-generated. Do not edit directly. */ + +// BEGIN: polyval_a0 + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the polynomial +* @return evaluated polynomial +*/ +static float polyval_a0( const float x ) { + return 0.0772156641f + (x * (0.0673484802f + (x * 0.00698275631f))); +} + +// END: polyval_a0 + +// BEGIN: polyval_a1 + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the polynomial +* @return evaluated polynomial +*/ +static float polyval_a1( const float x ) { + return 0.322467119f + (x * (0.0206395667f + (x * 0.00411768444f))); +} + +// END: polyval_a1 + +// BEGIN: polyval_r + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the polynomial +* @return evaluated polynomial +*/ +static float polyval_r( const float x ) { + return 0.679650068f + (x * (0.11605873f + (x * 0.00375673687f))); +} + +// END: polyval_r + +// BEGIN: polyval_s + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the polynomial +* @return evaluated polynomial +*/ +static float polyval_s( const float x ) { + return -0.0772156641f + (x * (0.269987404f + (x * (0.14285101f + (x * 0.0119389519f))))); +} + +// END: polyval_s + +// BEGIN: polyval_t2 + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the polynomial +* @return evaluated polynomial +*/ +static float polyval_t2( const float x ) { + return 0.483836412f + (x * (-0.147586212f + (x * (0.0646013096f + (x * (-0.0328450352f + (x * (0.0186483748f + (x * -0.00989206228f))))))))); +} + +// END: polyval_t2 + +// BEGIN: polyval_u + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the polynomial +* @return evaluated polynomial +*/ +static float polyval_u( const float x ) { + return -0.0772156641f + (x * (0.736789703f + (x * 0.49564904f))); +} + +// END: polyval_u + +// BEGIN: polyval_v + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the polynomial +* @return evaluated polynomial +*/ +static float polyval_v( const float x ) { + return 1.10958421f + (x * (0.210598111f + (x * -0.0102995494f))); +} + +// END: polyval_v + +// BEGIN: polyval_w + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the polynomial +* @return evaluated polynomial +*/ +static float polyval_w( const float x ) { + return 0.0833332464f + (x * -0.00276129087f); +} + +// END: polyval_w + +/* End auto-generated functions. */ + +/** +* Evaluates the natural logarithm of the absolute value of the gamma function for a single-precision floating-point number. +* +* ## Method +* +* 1. Argument reduction for \\(0 < x \leq 8\\). Since \\(\Gamma(1+s) = s \Gamma(s)\\), for \\(x \in \[0,8]\\), we may reduce \\(x\\) to a number in \\(\[1.5,2.5]\\) by +* +* ```tex +* \operatorname{lgamma}(1+s) = \ln(s) + \operatorname{lgamma}(s) +* ``` +* +* For example, +* +* ```tex +* \begin{align*} +* \operatorname{lgamma}(7.3) &= \ln(6.3) + \operatorname{lgamma}(6.3) \\ +* &= \ln(6.3 \cdot 5.3) + \operatorname{lgamma}(5.3) \\ +* &= \ln(6.3 \cdot 5.3 \cdot 4.3 \cdot 3.3 \cdot2.3) + \operatorname{lgamma}(2.3) +* \end{align*} +* ``` +* +* 2. Compute a polynomial approximation of \\(\mathrm{lgamma}\\) around its minimum (\\(\mathrm{ymin} = 1.46163213\\)) to maintain monotonicity. On the interval \\(\[\mathrm{ymin} - 0.24, \mathrm{ymin} + 0.28]\\) (i.e., \\(\[1.22163213,1.74163213]\\)), we let \\(z = x - \mathrm{ymin}\\) and use +* +* ```tex +* \operatorname{lgamma}(x) = -1.214862905358496078218 + z^2 \cdot \operatorname{poly}(z) +* ``` +* +* where \\(\operatorname{poly}(z)\\) is a \\(7\\) degree polynomial. +* +* 3. Compute a rational approximation in the primary interval \\(\[2,3]\\). Let \\( s = x - 2.0 \\). We can thus use the approximation +* +* ```tex +* \operatorname{lgamma}(x) = \frac{s}{2} + s\frac{\operatorname{P}(s)}{\operatorname{Q}(s)} +* ``` +* +* with accuracy +* +* ```tex +* \biggl|\frac{\mathrm{P}}{\mathrm{Q}} - \biggr(\operatorname{lgamma}(x)-\frac{s}{2}\biggl)\biggl| < 2^{-35.0} +* ``` +* +* The algorithms are based on the observation +* +* ```tex +* \operatorname{lgamma}(2+s) = s(1 - \gamma) + \frac{\zeta(2) - 1}{2} s^2 - \frac{\zeta(3) - 1}{3} s^3 + \ldots +* ``` +* +* where \\(\zeta\\) is the zeta function and \\(\gamma = 0.5772156649...\\) is the Euler-Mascheroni constant, which is very close to \\(0.5\\). +* +* 4. For \\(x \geq 8\\), +* +* ```tex +* \operatorname{lgamma}(x) \approx \biggl(x-\frac{1}{2}\biggr) \ln(x) - x + \frac{\ln(2\pi)}{2} + \frac{1}{12x} - \frac{1}{360x^3} + \ldots +* ``` +* +* which can be expressed +* +* ```tex +* \operatorname{lgamma}(x) \approx \biggl(x-\frac{1}{2}\biggr)(\ln(x)-1)-\frac{\ln(2\pi)-1}{2} + \ldots +* ``` +* +* Let \\(z = \frac{1}{x}\\). We can then use the approximation +* +* ```tex +* f(z) = \operatorname{lgamma}(x) - \biggl(x-\frac{1}{2}\biggr)(\ln(x)-1) +* ``` +* +* by +* +* ```tex +* w = w_0 + w_1 z + w_2 z^3 +* ``` +* +* where +* +* ```tex +* |w - f(z)| < 2^{-29.6} +* ``` +* +* 5. For negative \\(x\\), since +* +* ```tex +* -x \Gamma(-x) \Gamma(x) = \frac{\pi}{\sin(\pi x)} +* ``` +* +* where \\(\Gamma\\) is the gamma function, we have +* +* ```tex +* \Gamma(x) = \frac{\pi}{\sin(\pi x)(-x)\Gamma(-x)} +* ``` +* +* Since \\(\Gamma(-x)\\) is positive, +* +* ```tex +* \operatorname{sign}(\Gamma(x)) = \operatorname{sign}(\sin(\pi x)) +* ``` +* +* for \\(x < 0\\). Hence, for \\(x < 0\\), +* +* ```tex +* \mathrm{signgam} = \operatorname{sign}(\sin(\pi x)) +* ``` +* +* and +* +* ```tex +* \begin{align*} +* \operatorname{lgamma}(x) &= \ln(|\Gamma(x)|) \\ +* &= \ln\biggl(\frac{\pi}{|x \sin(\pi x)|}\biggr) - \operatorname{lgamma}(-x) +* \end{align*} +* ``` +* +* +* +* Note that one should avoid computing \\(\pi (-x)\\) directly in the computation of \\(\sin(\pi (-x))\\). +* +* +* +* ## Special Cases +* +* ```tex +* \begin{align*} +* \operatorname{lgamma}(2+s) &\approx s (1-\gamma) & \mathrm{for\ tiny\ s} \\ +* \operatorname{lgamma}(x) &\approx -\ln(x) & \mathrm{for\ tiny\ x} \\ +* \operatorname{lgamma}(1) &= 0 & \\ +* \operatorname{lgamma}(2) &= 0 & \\ +* \operatorname{lgamma}(0) &= \infty & \\ +* \operatorname{lgamma}(\infty) &= \infty & \\ +* \operatorname{lgamma}(-\mathrm{integer}) &= \pm \infty +* \end{align*} +* ``` +* +* @param x input value +* @return function value +* +* @example +* float out = stdlib_base_absgammalnf( 1.0f ); +* // returns 0.0f +*/ +float stdlib_base_absgammalnf( const float x ) { + uint8_t isNegative; + int32_t flg; + float nadj; + float xc; + float p2; + float p1; + float p; + float q; + float t; + float w; + float y; + float z; + float r; + + // Special cases: NaN, +-infinity + if ( stdlib_base_is_nanf( x ) || stdlib_base_is_infinitef( x ) ) { + return x; + } + + // Special case: 0 + if ( x == 0.0f ) { + return STDLIB_CONSTANT_FLOAT32_PINF; + } + xc = x; + if ( xc < 0.0f ) { + isNegative = 1; + xc = -xc; + } else { + isNegative = 0; + } + // If |x| < 2**-27, return -ln(|x|) + if ( xc < TINY ) { + return -stdlib_base_lnf( xc ); + } + if ( isNegative ) { + // If |x| >= 2**23, must be -integer + if ( xc >= TWO23 ) { + return STDLIB_CONSTANT_FLOAT32_PINF; + } + t = stdlib_base_sinpif( xc ); + if ( t == 0.0f ) { + return STDLIB_CONSTANT_FLOAT32_PINF; + } + nadj = stdlib_base_lnf( STDLIB_CONSTANT_FLOAT32_PI / stdlib_base_absf( t * xc ) ); + } + // If x equals 1 or 2, return 0 + if ( xc == 1.0f || xc == 2.0f ) { + return 0.0f; + } + // If x < 2, use lgamma(x) = lgamma(x+1) - log(x) + if ( xc < 2.0f ) { + if ( xc <= 0.9f ) { + r = -stdlib_base_lnf( xc ); + + // 0.7316 <= x <= 0.9 + if ( xc >= ( YMIN - 1.0f + 0.27f ) ) { + y = 1.0f - xc; + flg = 0; + } + // 0.2316 <= x < 0.7316 + else if ( xc >= ( YMIN - 1.0f - 0.23f ) ) { + y = xc - ( YMIN - 1.0f ); + flg = 1; + } + // 0 < x < 0.2316 + else { + y = xc; + flg = 2; + } + } else { + r = 0.0f; + + // 1.7316 <= x < 2 + if ( xc >= ( YMIN + 0.27f ) ) { + y = 2.0f - xc; + flg = 0; + } + // 1.2316 <= x < 1.7316 + else if ( xc >= ( YMIN - 0.23f ) ) { + y = xc - YMIN; + flg = 1; + } + // 0.9 < x < 1.2316 + else { + y = xc - 1.0f; + flg = 2; + } + } + switch ( flg ) { + case 0: + z = y * y; + p1 = polyval_a0( z ); + p2 = z * polyval_a1( z ); + p = ( y * p1 ) + p2; + r += ( p - ( 0.5f * y ) ); + break; + case 1: + z = y * y; + p = T0C + ( y * T1C ) + ( z * polyval_t2( y ) ); + r += ( TF + p ); + break; + case 2: + p1 = y * polyval_u( y ); + p2 = 1.0f + ( y * polyval_v( y ) ); + r += ( p1 / p2 ) - ( 0.5f * y ); + break; + } + } + // 2 <= x < 8 + else if ( xc < 8.0f ) { + flg = (int32_t)stdlib_base_truncf( xc ); + y = xc - flg; + p = y * polyval_s( y ); + q = 1.0f + ( y * polyval_r( y ) ); + r = ( 0.5f * y ) + ( p / q ); + z = 1.0f; // gammaln(1+s) = ln(s) + gammaln(s) + switch ( flg ) { + case 7: + z *= y + 6.0f; + + /* Falls through */ + case 6: + z *= y + 5.0f; + + /* Falls through */ + case 5: + z *= y + 4.0f; + + /* Falls through */ + case 4: + z *= y + 3.0f; + + /* Falls through */ + case 3: + z *= y + 2.0f; + r += stdlib_base_lnf( z ); + } + } + // 8 <= x < 2**27 + else if ( xc < TWO27 ) { + t = stdlib_base_lnf( xc ); + z = 1.0f / xc; + y = z * z; + w = W0C + ( z * polyval_w( y ) ); + r = ( ( xc - 0.5f ) * ( t - 1.0f ) ) + w; + } + // 2**27 <= x <= Inf + else { + r = xc * ( stdlib_base_lnf( xc ) - 1.0f ); + } + if ( isNegative ) { + r = nadj - r; + } + return r; +} diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/fixtures/julia/REQUIRE b/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/fixtures/julia/REQUIRE new file mode 100644 index 000000000000..06bfe7391215 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/fixtures/julia/REQUIRE @@ -0,0 +1,3 @@ +julia 1.5 +JSON 0.21 +SpecialFunctions 0.10.3 diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/fixtures/julia/decimals.json b/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/fixtures/julia/decimals.json new file mode 100644 index 000000000000..93c374324550 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/fixtures/julia/decimals.json @@ -0,0 +1 @@ +{"expected":[[-708.24316,-1],[-707.3048,-1],[-706.0069,-1],[-703.5009,-1],[-703.84186,1],[-703.66626,1],[-702.9916,1],[-702.0124,1],[-700.64374,1],[-697.2785,1],[-698.73834,-1],[-698.4598,-1],[-697.74054,-1],[-696.7192,-1],[-695.26843,-1],[-691.5669,1],[-693.61597,1],[-693.2519,1],[-692.49023,1],[-691.42505,1],[-689.8756,1],[-687.59686,-1],[-688.48035,-1],[-688.0432,-1],[-687.24054,-1],[-686.12885,-1],[-684.45734,-1],[-682.89734,1],[-683.3353,1],[-682.8343,1],[-681.99146,1],[-680.8297,1],[-678.9994,1],[-678.0094,-1],[-678.1836,-1],[-677.6256,-1],[-676.74304,-1],[-675.5267,-1],[-673.475,-1],[-673.0347,1],[-673.02716,1],[-672.4175,1],[-671.49493,1],[-670.218,1],[-667.8215,1],[-668.01117,-1],[-667.86755,-1],[-667.2099,-1],[-666.24677,-1],[-664.90125,-1],[-661.8143,-1],[-662.9571,1],[-662.7058,1],[-662.00323,1],[-660.99835,1],[-659.57336,1],[-655.06775,-1],[-657.8827,-1],[-657.5428,-1],[-656.7974,-1],[-655.74915,-1],[-654.2297,-1],[-651.7607,1],[-652.7943,1],[-652.3792,1],[-651.5925,1],[-650.4984,1],[-648.8627,1],[-647.17786,-1],[-647.69617,-1],[-647.2156,-1],[-646.38873,-1],[-645.2455,-1],[-643.46014,-1],[-642.3626,1],[-642.59125,1],[-642.05237,1],[-641.18585,1],[-639.989,1],[-637.999,1],[-637.4477,-1],[-637.48145,-1],[-636.8899,-1],[-635.9834,-1],[-634.7275,-1],[-632.4274,-1],[-632.4785,1],[-632.3684,1],[-631.72833,1],[-630.7815,1],[-629.45886,1],[-626.5838,1],[-627.47614,-1],[-627.25336,-1],[-626.5678,-1],[-625.57965,-1],[-624.18024,-1],[-617.9935,-1],[-622.4519,1],[-622.1372,1],[-621.40845,1],[-620.3773,1],[-618.8871,1],[-616.1974,-1],[-617.41296,-1],[-617.0207,-1],[-616.2505,-1],[-615.174,-1],[-613.5729,-1],[-611.75604,1],[-612.3638,1],[-611.9043,1],[-611.09375,1],[-609.969,1],[-608.22656,1],[-607.0203,-1],[-607.30756,-1],[-606.78845,-1],[-605.93823,-1],[-604.7611,-1],[-602.82837,-1],[-602.1689,1],[-602.24646,1],[-601.6736,1],[-600.7836,1],[-599.54865,1],[-597.33514,1],[-597.257,-1],[-597.1822,-1],[-596.56006,-1],[-595.6299,-1],[-594.33,-1],[-591.62573,-1],[-592.30884,1],[-592.11597,1],[-591.4478,1],[-590.47656,1],[-589.10254,1],[-584.8843,1],[-587.33734,-1],[-587.04877,-1],[-586.33716,-1],[-585.32336,-1],[-583.8618,-1],[-580.90424,1],[-582.3501,1],[-581.9814,1],[-581.228,1],[-580.16956,1],[-578.60205,1],[-576.6436,-1],[-577.3522,-1],[-576.91437,-1],[-576.1205,-1],[-575.0145,-1],[-573.3135,-1],[-571.996,1],[-572.34705,1],[-571.8482,1],[-571.0146,1],[-569.85724,1],[-567.97845,1],[-567.2127,-1],[-567.33685,-1],[-566.7834,-1],[-565.9101,-1],[-564.69617,-1],[-562.56134,-1],[-562.36145,1],[-562.3236,1],[-561.72003,1],[-560.80676,1],[-559.52985,1],[-556.9686,1],[-557.47034,-1],[-557.3085,-1],[-556.6583,-1],[-555.70435,-1],[-554.35535,-1],[-550.74115,-1],[-552.55396,1],[-552.29266,1],[-551.5986,1],[-550.60236,1],[-549.1692,1],[-545.8648,-1],[-547.6211,-1],[-547.2768,-1],[-546.5408,-1],[-545.50055,-1],[-543.96594,-1],[-541.8533,1],[-542.67694,1],[-542.2616,1],[-541.4848,1],[-540.3979,1],[-538.7365,1],[-537.3048,-1],[-537.7252,-1],[-537.2475,-1],[-536.4309,-1],[-535.29346,-1],[-533.46576,-1],[-532.5947,1],[-532.7686,1],[-532.2349,1],[-531.3789,1],[-530.1863,1],[-528.1234,1],[-527.8075,-1],[-527.80884,-1],[-527.2243,-1],[-526.32837,-1],[-525.0743,-1],[-522.63556,-1],[-522.9765,1],[-522.8474,1],[-522.2157,1],[-521.2793,1],[-519.9553,1],[-516.7057,1],[-518.1184,-1],[-517.8854,-1],[-517.20935,-1],[-516.23126,-1],[-514.8259,-1],[-511.0154,1],[-513.2425,1],[-512.92365,1],[-512.2054,1],[-511.18372,1],[-509.68127,1],[-507.39725,-1],[-508.35495,-1],[-507.9628,-1],[-507.2037,-1],[-506.136,-1],[-504.51312,-1],[-502.96283,1],[-503.4596,1],[-503.0035,1],[-502.20456,1],[-501.08716,1],[-499.30804,1],[-498.33188,-1],[-498.55914,-1],[-498.04605,-1],[-497.20752,-1],[-496.03625,-1],[-494.04056,-1],[-493.61295,1],[-493.65564,1],[-493.0908,1],[-492.21262,1],[-490.98148,1],[-488.65018,1],[-488.84555,-1],[-488.7507,-1],[-488.138,-1],[-487.2197,-1],[-485.9207,-1],[-482.93182,-1],[-484.04877,1],[-483.84543,1],[-483.18796,1],[-482.22827,1],[-480.85077,1],[-476.03363,-1],[-479.23312,-1],[-478.94067,-1],[-478.2406,-1],[-477.2379,-1],[-475.76715,-1],[-473.2887,1],[-474.40512,1],[-474.03717,1],[-473.29617,1],[-472.24805,1],[-470.66266,1],[-468.9879,-1],[-469.56906,-1],[-469.13547,-1],[-468.35452,-1],[-467.25778,-1],[-465.52518,-1],[-464.44315,1],[-464.72787,1],[-464.23608,1],[-463.41568,1],[-462.26602,1],[-460.33276,1],[-459.79712,-1],[-459.88382,-1],[-459.33932,-1],[-458.4795,-1],[-457.27133,-1],[-455.03598,-1],[-455.09732,1],[-455.03848,1],[-454.44556,1],[-453.54565,1],[-452.2717,1],[-449.48495,1],[-450.36545,-1],[-450.19302,-1],[-449.5548,-1],[-448.61398,-1],[-447.26416,-1],[-442.05545,-1],[-445.61337,1],[-445.34848,1],[-444.66742,1],[-443.68405,1],[-442.24445,1],[-439.53784,-1],[-440.8484,-1],[-440.50558,-1],[-439.7833,-1],[-438.75513,-1],[-437.20627,-1],[-435.39948,1],[-436.07504,1],[-435.6649,1],[-434.9026,1],[-433.82663,1],[-432.13892,1],[-430.9498,-1],[-431.29666,-1],[-430.8269,-1],[-430.0252,-1],[-428.89743,-1],[-427.0229,-1],[-426.38193,1],[-426.5154,1],[-425.99207,1],[-425.15097,1],[-423.96616,1],[-421.81772,1],[-421.75394,-1],[-421.73315,-1],[-421.16064,-1],[-420.27982,-1],[-419.031,-1],[-416.40933,-1],[-417.09097,1],[-416.95108,1],[-416.33282,1],[-415.41135,1],[-414.08914,1],[-410.1039,1],[-412.40643,-1],[-412.17032,-1],[-411.5088,-1],[-410.54532,-1],[-409.13684,-1],[-406.14893,1],[-407.70825,1],[-407.39163,1],[-406.68878,1],[-405.68115,1],[-404.1681,1],[-402.21942,-1],[-403.00146,-1],[-402.61566,-1],[-401.8726,-1],[-400.81796,-1],[-399.17352,-1],[-397.87515,1],[-398.2896,1],[-397.84286,1],[-397.06042,1],[-395.95502,1],[-394.13632,1],[-393.39175,-1],[-393.5751,-1],[-393.07376,-1],[-392.25208,-1],[-391.09088,-1],[-389.022,-1],[-388.8405,1],[-388.8599,1],[-388.30856,1],[-387.44742,1],[-386.224,1],[-383.74237,1],[-384.251,-1],[-384.14523,-1],[-383.5477,-1],[-382.6462,-1],[-381.35168,-1],[-377.88937,-1],[-379.63828,1],[-379.4323,1],[-378.79117,1],[-377.84808,1],[-376.4705,1],[-373.10992,-1],[-375.01114,-1],[-374.722,-1],[-374.03918,-1],[-373.05258,-1],[-371.57504,-1],[-369.47104,1],[-370.37524,1],[-370.01483,1],[-369.29187,1],[-368.25906,1],[-366.65677,1],[-365.24606,-1],[-365.7343,-1],[-365.31158,-1],[-364.5491,-1],[-363.46652,-1],[-361.70102,-1],[-360.8541,1],[-361.09097,1],[-360.61246,1],[-359.81094,1],[-358.67395,1],[-356.6787,1],[-356.38522,-1],[-356.44714,-1],[-355.91806,-1],[-355.07727,-1],[-353.87955,-1],[-351.51932,-1],[-351.87427,1],[-351.80447,1],[-351.22852,1],[-350.34772,1],[-349.0812,1],[-345.95444,1],[-347.33832,-1],[-347.16403,-1],[-346.5441,-1],[-345.62216,-1],[-344.2755,-1],[-340.34393,1],[-342.7872,1],[-342.5267,1],[-341.86493,1],[-340.9,1],[-339.4576,1],[-337.1807,-1],[-338.22708,-1],[-337.89328,-1],[-337.19116,-1],[-336.1808,-1],[-334.61993,-1],[-333.09232,1],[-333.662,1],[-333.2643,1],[-332.52274,1],[-331.46362,1],[-329.7493,1],[-328.80038,-1],[-329.09476,-1],[-328.6403,-1],[-327.85968,-1],[-326.74734,-1],[-324.82108,-1],[-324.42035,1],[-324.5276,1],[-324.02164,1],[-323.20203,1],[-322.03064,1],[-319.77823,1],[-319.99384,-1],[-319.96204,-1],[-319.40866,-1],[-318.54938,-1],[-317.31113,-1],[-314.43097,-1],[-315.5403,1],[-315.39935,1],[-314.80154,1],[-313.90155,1],[-312.58603,1],[-307.28207,-1],[-311.07086,-1],[-310.84048,-1],[-310.20062,-1],[-309.25827,-1],[-307.85098,-1],[-305.37595,1],[-306.5921,1],[-306.2862,1],[-305.6059,1],[-304.61877,1],[-303.0987,1],[-301.4486,-1],[-302.10858,-1],[-301.73724,-1],[-301.01743,-1],[-299.98254,-1],[-298.31802,-1],[-297.2667,1],[-297.6233,1],[-297.19403,1],[-296.43533,1],[-295.34842,1],[-293.48727,1],[-292.9831,-1],[-293.1386,-1],[-292.657,-1],[-291.85947,-1],[-290.715,-1],[-288.55984,-1],[-288.64764,1],[-288.65625,1],[-288.12656,1],[-287.28976,1],[-286.08047,1],[-283.39603,1],[-284.28317,-1],[-284.17746,-1],[-283.603,-1],[-282.72598,-1],[-281.44196,-1],[-276.75955,-1],[-279.90182,1],[-279.7033,1],[-279.0865,1],[-278.1676,1],[-276.7955,1],[-274.08524,-1],[-275.51105,-1],[-275.23465,-1],[-274.57724,-1],[-273.6144,-1],[-272.1349,-1],[-270.35464,1],[-271.11575,1],[-270.77216,1],[-270.07535,1],[-269.06555,1],[-267.4496,1],[-266.29498,-1],[-266.71924,-1],[-266.31647,-1],[-265.58087,-1],[-264.5202,-1],[-262.72137,-1],[-262.11658,1],[-262.32394,1],[-261.86798,1],[-261.09378,1],[-259.97708,1],[-257.91107,1],[-257.8803,-1],[-257.93176,-1],[-257.42715,-1],[-256.61392,-1],[-255.43428,-1],[-252.91235,-1],[-253.61244,1],[-253.5441,1],[-252.99431,1],[-252.14125,1],[-250.88953,1],[-247.12617,1],[-249.32684,-1],[-249.16205,-1],[-248.56966,-1],[-247.6754,-1],[-246.33888,-1],[-243.33481,1],[-245.0318,1],[-244.78656,1],[-244.15347,1],[-243.21593,1],[-241.77687,1],[-239.85652,-1],[-240.73254,-1],[-240.41833,-1],[-239.74586,-1],[-238.76231,-1],[-237.1943,-1],[-235.93463,1],[-236.43275,1],[-236.0581,1],[-235.34695,1],[-234.31363,1],[-232.57487,1],[-231.87193,-1],[-232.13504,-1],[-231.70633,-1],[-230.95674,-1],[-229.86887,-1],[-227.88605,-1],[-227.74411,1],[-227.84146,1],[-227.36343,1],[-226.57524,1],[-225.42632,1],[-223.04419,1],[-223.582,-1],[-223.55348,-1],[-223.02988,-1],[-222.20226,-1],[-220.9836,-1],[-217.68492,-1],[-219.40126,1],[-219.27238,1],[-218.70589,1],[-217.8377,1],[-216.53758,1],[-213.13177,-1],[-215.21107,-1],[-214.99908,-1],[-214.39186,-1],[-213.4811,-1],[-212.08292,-1],[-210.0092,1],[-211.01726,1],[-210.73445,1],[-210.08786,1],[-209.13199,1],[-207.61166,1],[-206.24435,-1],[-206.82382,-1],[-206.47923,-1],[-205.7941,-1],[-204.78964,-1],[-203.10953,-1],[-202.3101,1],[-202.63356,1],[-202.23395,1],[-201.51067,1],[-200.45303,1],[-198.5486,1],[-198.30206,-1],[-198.44868,-1],[-197.99916,-1],[-197.23764,-1],[-196.12067,-1],[-193.86264,-1],[-194.25665,1],[-194.27083,1],[-193.77528,1],[-192.97488,1],[-191.79056,1],[-188.80623,1],[-190.19179,-1],[-190.10135,-1],[-189.56276,-1],[-188.72229,-1],[-187.45964,-1],[-183.39862,1],[-186.11769,1],[-185.9413,1],[-185.36185,1],[-184.47963,1],[-183.12325,1],[-180.87775,-1],[-182.04079,-1],[-181.79163,-1],[-181.17285,-1],[-180.24646,-1],[-178.77417,-1],[-177.29568,1],[-177.96542,1],[-177.65312,1],[-176.99603,1],[-176.0222,1],[-174.39986,1],[-173.50548,-1],[-173.89471,-1],[-173.52646,-1],[-172.8315,-1],[-171.8059,-1],[-169.97664,-1],[-169.63106,1],[-169.83101,1],[-169.41223,1],[-168.67943,1],[-167.59628,1],[-165.45049,1],[-165.71587,-1],[-165.77611,-1],[-165.31096,-1],[-164.53984,-1],[-163.39156,-1],[-160.64664,-1],[-161.78049,1],[-161.73152,1],[-161.22314,1],[-160.41266,1],[-159.189,1],[-152.7277,-1],[-157.83635,-1],[-157.69846,-1],[-157.14919,-1],[-156.29774,-1],[-154.9845,-1],[-152.54121,1],[-153.89062,1],[-153.67793,1],[-153.08948,1],[-152.19481,1],[-150.7715,1],[-149.17714,-1],[-149.94804,-1],[-149.67084,-1],[-149.04431,-1],[-148.10338,-1],[-146.53905,-1],[-145.55078,1],[-146.01208,1],[-145.67802,1],[-145.01399,1],[-144.02274,1],[-142.26675,1],[-141.82729,-1],[-142.08531,-1],[-141.70013,-1],[-140.99875,-1],[-139.95178,-1],[-137.91022,-1],[-138.05933,1],[-138.16971,1],[-137.73782,1],[-136.99872,1],[-135.88892,1],[-133.3394,1],[-134.27066,-1],[-134.26697,-1],[-133.79173,-1],[-133.01402,-1],[-131.83173,-1],[-127.56125,-1],[-130.47423,1],[-130.37842,1],[-129.86238,1],[-129.0446,1],[-127.77661,1],[-125.09642,-1],[-126.67796,-1],[-126.505295,-1],[-125.95028,-1],[-125.090355,-1],[-123.717834,-1],[-122.00152,1],[-122.887184,1],[-122.64863,1],[-122.05591,1],[-121.15096,1],[-119.645706,1],[-118.564514,-1],[-119.10568,-1],[-118.80938,-1],[-118.17968,-1],[-117.22592,-1],[-115.54267,-1],[-115.01443,1],[-115.33633,1],[-114.98843,1],[-114.32197,1],[-113.31439,1],[-111.37188,1],[-111.41582,-1],[-111.58139,-1],[-111.18659,-1],[-110.48314,-1],[-109.415016,-1],[-107.03366,-1],[-107.79649,1],[-107.84276,1],[-107.404625,1],[-106.663445,1],[-105.5258,1],[-102.00534,1],[-104.17116,-1],[-104.122055,-1],[-103.64331,-1],[-102.863106,-1],[-101.6436,-1],[-98.66191,1],[-100.54872,1],[-100.42067,1],[-99.90332,1],[-99.0822,1],[-97.76343,1],[-95.91739,-1],[-96.93513,-1],[-96.73989,-1],[-96.18537,-1],[-95.32066,-1],[-93.876945,-1],[-92.70395,1],[-93.334656,1],[-93.08094,1],[-92.49012,1],[-91.578285,1],[-89.968956,1],[-89.35738,-1],[-89.75059,-1],[-89.44494,-1],[-88.81819,-1],[-87.85451,-1],[-86.00872,-1],[-85.958244,1],[-86.185555,1],[-85.83299,1],[-85.170204,1],[-84.14847,1],[-81.91817,1],[-82.53927,-1],[-82.641785,-1],[-82.246124,-1],[-81.54674,-1],[-80.45853,-1],[-77.369484,-1],[-79.11742,1],[-79.12125,1],[-78.68544,1],[-77.94833,1],[-76.7822,1],[-73.37491,-1],[-75.70282,-1],[-75.6257,-1],[-75.151955,-1],[-74.375404,-1],[-73.1153,-1],[-71.12955,1],[-72.30224,1],[-72.156845,1],[-71.64676,1],[-70.82837,1],[-69.45074,1],[-68.18784,-1],[-68.92063,-1],[-68.716286,-1],[-68.1709,-1],[-67.307396,-1],[-65.77566,-1],[-65.087494,1],[-65.56188,1],[-65.30557,1],[-64.725464,1],[-63.81248,1],[-62.064423,1],[-61.931095,-1],[-62.229187,-1],[-61.92632,-1],[-61.311577,-1],[-60.34331,-1],[-58.254948,-1],[-58.7578,1],[-58.925373,1],[-58.580093,1],[-57.93032,1],[-56.898987,1],[-54.123844,1],[-55.587315,-1],[-55.653023,-1],[-55.268555,-1],[-54.582855,-1],[-53.47788,-1],[-49.310616,1],[-52.431446,1],[-52.41459,1],[-51.993378,1],[-51.270283,1],[-50.076855,1],[-47.938652,-1],[-49.298225,-1],[-49.212467,-1],[-48.75636,-1],[-47.993748,-1],[-46.690353,-1],[-45.341583,1],[-46.193672,1],[-46.049072,1],[-45.559372,1],[-44.754322,1],[-43.308002,1],[-42.552998,-1],[-43.122734,-1],[-42.92687,-1],[-42.4044,-1],[-41.55296,-1],[-39.908752,-1],[-39.707336,1],[-40.089706,1],[-39.84845,1],[-39.29358,1],[-38.390472,1],[-36.443363,1],[-36.852215,-1],[-37.09862,-1],[-36.81655,-1],[-36.2292,-1],[-35.267334,-1],[-32.751953,-1],[-34.01132,1],[-34.15336,1],[-33.834106,1],[-33.213726,1],[-32.183434,1],[-26.277523,1],[-31.199066,-1],[-31.25788,-1],[-30.90431,-1],[-30.249842,-1],[-29.137648,-1],[-26.831697,1],[-28.425753,1],[-28.416286,1],[-28.030685,1],[-27.34046,1],[-26.126883,1],[-24.701853,-1],[-25.699684,-1],[-25.632982,-1],[-25.217115,-1],[-24.488768,-1],[-23.144232,-1],[-22.339806,1],[-23.028238,1],[-22.912766,1],[-22.467985,1],[-21.69825,1],[-20.174301,1],[-19.928175,-1],[-20.418543,-1],[-20.260977,-1],[-19.788265,-1],[-18.972708,-1],[-17.179672,-1],[-17.527306,1],[-17.877903,1],[-17.68367,1],[-17.183666,1],[-16.316275,1],[-14.044689,1],[-15.167874,-1],[-15.414169,-1],[-15.187817,-1],[-14.660839,-1],[-13.733369,-1],[-9.951004,-1],[-12.87038,1],[-13.036131,1],[-12.781598,1],[-12.227651,1],[-11.228555,1],[-8.741191,-1],[-10.651618,-1],[-10.753956,-1],[-10.474794,-1],[-9.893572,-1],[-8.806149,-1],[-7.333602,1],[-8.52766,1],[-8.579767,1],[-8.279366,1],[-7.6702385,1],[-6.469203,1],[-5.657813,-1],[-6.5157824,-1],[-6.5284977,-1],[-6.2103024,-1],[-5.5723295,-1],[-4.216592,-1],[-3.980497,1],[-4.6362333,1],[-4.6191816,1],[-4.287024,1],[-3.61899,1],[-2.0339718,1],[-2.3917277,-1],[-2.9145365,-1],[-2.8771276,-1],[-2.535717,-1],[-1.8362608,-1],[0.14341104,-1],[-0.95102936,1],[-1.3852053,1],[-1.337832,1],[-0.99369514,1],[-0.26175475,1],[2.7343378,1],[0.2808982,-1],[-0.09888369,-1],[-0.05496812,-1],[0.28152078,-1],[1.0453099,-1],[3.6633031,1],[1.2205603,1],[0.8612207,1],[0.8803837,1],[1.189433,1],[1.9775885,1],[3.3237896,-1],[1.7186265,-1],[1.3298165,-1],[1.2778072,-1],[1.507794,-1],[2.278763,-1],[2.7764351,1],[1.3719922,1],[0.7927782,1],[0.44261032,1],[0.21122462,1],[0.056463167,1],[-0.042892855,1],[-0.09930044,1],[-0.1208364,1],[-0.11311384,1],[-0.0802381,1],[-0.025331309,1],[0.049157914,1],[0.14126095,1],[0.24936283,1],[0.37211528,1],[0.5083773,1],[0.65717036,1],[0.8176473,1],[0.98906624,1],[1.1707745,1],[1.3621908,1],[1.5627971,1],[1.7721262,1],[1.9897568,1],[2.2153058,1],[2.448423,1],[2.6887898,1],[2.9361112,1],[3.1901162,1],[3.4505527,1],[3.7171896,1],[3.989809,1],[4.2682095,1],[4.5522013,1],[4.841608,1],[5.136264,1],[5.436012,1],[5.7407045,1],[6.050204,1],[6.364378,1],[6.683103,1],[7.0062585,1],[7.333736,1],[7.6654267,1],[8.001228,1],[8.341047,1],[8.684789,1],[9.032367,1],[9.383696,1],[9.738694,1],[10.097287,1],[10.459401,1],[10.82496,1],[11.1939,1],[11.566154,1],[11.941658,1],[12.320355,1],[12.702185,1],[13.08709,1],[13.475016,1],[13.86591,1],[14.259722,1],[14.6564,1],[15.0559025,1],[15.458182,1],[15.863193,1],[16.270891,1],[16.681234,1],[17.094183,1],[17.509703,1],[17.927746,1],[18.348284,1],[18.77128,1],[19.196695,1],[19.6245,1],[20.054657,1],[20.487137,1],[20.921907,1],[21.358942,1],[21.798206,1],[22.239674,1],[22.683315,1],[23.129103,1],[23.577013,1],[24.027018,1],[24.479088,1],[24.933208,1],[25.389341,1],[25.847475,1],[26.307583,1],[26.769642,1],[27.233631,1],[27.699526,1],[28.167303,1],[28.63695,1],[29.108442,1],[29.581758,1],[30.05688,1],[30.533792,1],[31.012472,1],[31.492905,1],[31.975067,1],[32.458946,1],[32.944523,1],[33.43178,1],[33.9207,1],[34.411274,1],[34.903484,1],[35.397305,1],[35.892735,1],[36.38975,1],[36.888344,1],[37.38849,1],[37.890182,1],[38.393406,1],[38.898148,1],[39.404392,1],[39.912125,1],[40.42134,1],[40.932014,1],[41.44414,1],[41.957714,1],[42.472713,1],[42.98913,1],[43.50695,1],[44.026165,1],[44.546764,1],[45.06873,1],[45.59206,1],[46.116734,1],[46.642754,1],[47.170094,1],[47.698753,1],[48.22872,1],[48.75999,1],[49.29255,1],[49.826374,1],[50.36148,1],[50.897846,1],[51.43546,1],[51.974316,1],[52.514404,1],[53.05571,1],[53.59824,1],[54.141968,1],[54.686897,1],[55.23302,1],[55.78032,1],[56.32879,1],[56.87843,1],[57.429226,1],[57.981163,1],[58.53425,1],[59.08847,1],[59.643814,1],[60.200283,1],[60.75786,1],[61.316544,1],[61.876328,1],[62.4372,1],[62.999153,1],[63.56218,1],[64.12628,1],[64.69145,1],[65.25767,1],[65.82494,1],[66.39326,1],[66.9626,1],[67.53299,1],[68.1044,1],[68.676834,1],[69.250275,1],[69.824715,1],[70.40017,1],[70.976616,1],[71.55405,1],[72.13246,1],[72.71186,1],[73.29223,1],[73.873566,1],[74.455864,1],[75.039116,1],[75.623314,1],[76.20846,1],[76.794556,1],[77.38158,1],[77.96953,1],[78.55842,1],[79.14821,1],[79.73893,1],[80.33055,1],[80.92307,1],[81.51651,1],[82.11083,1],[82.70606,1],[83.30216,1],[83.89916,1],[84.49701,1],[85.09575,1],[85.69536,1],[86.29583,1],[86.89715,1],[87.499344,1],[88.10237,1],[88.70627,1],[89.31098,1],[89.91655,1],[90.52295,1],[91.13017,1],[91.73823,1],[92.34711,1],[92.95682,1],[93.56732,1],[94.17865,1],[94.790764,1],[95.40371,1],[96.01743,1],[96.63197,1],[97.247284,1],[97.863396,1],[98.48028,1],[99.097946,1],[99.71641,1],[100.335625,1],[100.955635,1],[101.576385,1],[102.19792,1],[102.82019,1],[103.443245,1],[104.06704,1],[104.6916,1],[105.31689,1],[105.942924,1],[106.56969,1],[107.19722,1],[107.825455,1],[108.45445,1],[109.084145,1],[109.71457,1],[110.34573,1],[110.97759,1],[111.61018,1],[112.243484,1],[112.877495,1],[113.51221,1],[114.147644,1],[114.78375,1],[115.42058,1],[116.05809,1],[116.696304,1],[117.33519,1],[117.974785,1],[118.615036,1],[119.25598,1],[119.89762,1],[120.53991,1],[121.1829,1],[121.82653,1],[122.470856,1],[123.11582,1],[123.761475,1],[124.40777,1],[125.05473,1],[125.70235,1],[126.35062,1],[126.999535,1],[127.64912,1],[128.2993,1],[128.95015,1],[129.60165,1],[130.25378,1],[130.90656,1],[131.55995,1],[132.21399,1],[132.86864,1],[133.52393,1],[134.17984,1],[134.83638,1],[135.49353,1],[136.1513,1],[136.80966,1],[137.46869,1],[138.12828,1],[138.78848,1],[139.44933,1],[140.11073,1],[140.77277,1],[141.4354,1],[142.09862,1],[142.76244,1],[143.42685,1],[144.09184,1],[144.75746,1],[145.42363,1],[146.09041,1],[146.75775,1],[147.42569,1],[148.0942,1],[148.76329,1],[149.43295,1],[150.1032,1],[150.77399,1],[151.44537,1],[152.11734,1],[152.78984,1],[153.46292,1],[154.13657,1],[154.81076,1],[155.48552,1],[156.16084,1],[156.8367,1],[157.51314,1],[158.19011,1],[158.86763,1],[159.5457,1],[160.22432,1],[160.90349,1],[161.58319,1],[162.26344,1],[162.94423,1],[163.62555,1],[164.30742,1],[164.9898,1],[165.67273,1],[166.3562,1],[167.04019,1],[167.72469,1],[168.40971,1],[169.0953,1],[169.78136,1],[170.46797,1],[171.15512,1],[171.84276,1],[172.53091,1],[173.2196,1],[173.90878,1],[174.59848,1],[175.2887,1],[175.97942,1],[176.67065,1],[177.36235,1],[178.05461,1],[178.74736,1],[179.44061,1],[180.13432,1],[180.82858,1],[181.5233,1],[182.21852,1],[182.91425,1],[183.61047,1],[184.30719,1],[185.00435,1],[185.70207,1],[186.40022,1],[187.09889,1],[187.798,1],[188.49765,1],[189.19777,1],[189.89836,1],[190.5994,1],[191.30095,1],[192.00298,1],[192.70544,1],[193.40842,1],[194.11186,1],[194.81577,1],[195.52016,1],[196.22499,1],[196.9303,1],[197.63611,1],[198.34235,1],[199.04904,1],[199.7562,1],[200.46385,1],[201.17192,1],[201.88048,1],[202.5895,1],[203.29893,1],[204.00883,1],[204.7192,1],[205.43002,1],[206.14131,1],[206.85303,1],[207.56519,1],[208.27779,1],[208.99084,1],[209.70436,1],[210.4183,1],[211.13272,1],[211.84756,1],[212.56284,1],[213.2785,1],[213.99469,1],[214.71124,1],[215.42831,1],[216.14574,1],[216.86365,1],[217.58195,1],[218.30074,1],[219.01993,1],[219.7395,1],[220.45955,1],[221.18005,1],[221.90096,1],[222.62227,1],[223.344,1],[224.0662,1],[224.78879,1],[225.51178,1],[226.23521,1],[226.95905,1],[227.68333,1],[228.40802,1],[229.1331,1],[229.85861,1],[230.58455,1],[231.3109,1],[232.03764,1],[232.76482,1],[233.49242,1],[234.22038,1],[234.94875,1],[235.67755,1],[236.40677,1],[237.13638,1],[237.86638,1],[238.59677,1],[239.32759,1],[240.05884,1],[240.79045,1],[241.52245,1],[242.2549,1],[242.98772,1],[243.72089,1],[244.4545,1],[245.1885,1],[245.92291,1],[246.6577,1],[247.39287,1],[248.1284,1],[248.86436,1],[249.60075,1],[250.33746,1],[251.07458,1],[251.81207,1],[252.55,1],[253.28827,1],[254.02693,1],[254.76598,1],[255.50543,1],[256.2452,1],[256.9854,1],[257.72598,1],[258.46695,1],[259.20825,1],[259.94998,1],[260.69205,1],[261.43448,1],[262.17734,1],[262.92053,1],[263.6641,1],[264.40805,1],[265.1524,1],[265.89706,1],[266.64212,1],[267.38754,1],[268.13336,1],[268.87952,1],[269.62604,1],[270.37296,1],[271.1202,1],[271.86783,1],[272.6158,1],[273.3642,1],[274.11285,1],[274.86197,1],[275.61142,1],[276.36118,1],[277.11136,1],[277.86188,1],[278.61273,1],[279.36398,1],[280.11554,1],[280.8675,1],[281.6198,1],[282.37244,1],[283.12543,1],[283.87875,1],[284.63245,1],[285.3865,1],[286.14093,1],[286.89566,1],[287.6508,1],[288.40622,1],[289.16202,1],[289.91818,1],[290.67468,1],[291.4315,1],[292.1887,1],[292.94617,1],[293.7041,1],[294.46225,1],[295.22083,1],[295.9797,1],[296.7389,1],[297.4985,1],[298.25836,1],[299.01865,1],[299.7792,1],[300.54013,1],[301.30142,1],[302.06302,1],[302.82492,1],[303.5872,1],[304.34982,1],[305.11273,1],[305.87595,1],[306.63956,1],[307.4035,1],[308.16776,1],[308.9323,1],[309.6972,1],[310.46246,1],[311.22806,1],[311.99393,1],[312.76013,1],[313.52673,1],[314.29358,1],[315.06076,1],[315.82828,1],[316.59616,1],[317.36432,1],[318.13284,1],[318.9016,1],[319.67075,1],[320.44025,1],[321.21,1],[321.98007,1],[322.75046,1],[323.52124,1],[324.29224,1],[325.0636,1],[325.8353,1],[326.60733,1],[327.37964,1],[328.15225,1],[328.92517,1],[329.69846,1],[330.47202,1],[331.2459,1],[332.02008,1],[332.79456,1],[333.5694,1],[334.3445,1],[335.11993,1],[335.89566,1],[336.6717,1],[337.4481,1],[338.2247,1],[339.00168,1],[339.77896,1],[340.55655,1],[341.33444,1],[342.1126,1],[342.8911,1],[343.66992,1],[344.44904,1],[345.22842,1],[346.00812,1],[346.78818,1],[347.56845,1],[348.34906,1],[349.12994,1],[349.9112,1],[350.6927,1],[351.4745,1],[352.25653,1],[353.03897,1],[353.82166,1],[354.6046,1],[355.3879,1],[356.17148,1],[356.95538,1],[357.73953,1],[358.52402,1],[359.30872,1],[360.0938,1],[360.87918,1],[361.66476,1],[362.45068,1],[363.23694,1],[364.0234,1],[364.81018,1],[365.5973,1],[366.3846,1],[367.17233,1],[367.96027,1],[368.74847,1],[369.53696,1],[370.32578,1],[371.1149,1],[371.90424,1],[372.6939,1],[373.48386,1],[374.27408,1],[375.0646,1],[375.85535,1],[376.64648,1],[377.43784,1],[378.22946,1],[379.02136,1],[379.81354,1],[380.60605,1],[381.39883,1],[382.1918,1],[382.98517,1],[383.77878,1],[384.57263,1],[385.3668,1],[386.1612,1],[386.95593,1],[387.75085,1],[388.5461,1],[389.34164,1],[390.13745,1],[390.93353,1],[391.72986,1],[392.52652,1],[393.32336,1],[394.12057,1],[394.918,1],[395.7157,1],[396.5137,1],[397.31198,1],[398.11047,1],[398.90927,1],[399.7083,1],[400.5077,1],[401.3073,1],[402.10715,1],[402.9073,1],[403.70767,1],[404.50836,1],[405.30933,1],[406.1105,1],[406.912,1],[407.7137,1],[408.5157,1],[409.31793,1],[410.12045,1],[410.92325,1],[411.72635,1],[412.52963,1],[413.3332,1],[414.1371,1],[414.94116,1],[415.7455,1],[416.55014,1],[417.355,1],[418.1602,1],[418.9656,1],[419.77124,1],[420.57715,1],[421.38336,1],[422.18976,1],[422.9965,1],[423.80344,1],[424.61066,1],[425.4181,1],[426.22583,1],[427.03378,1],[427.84207,1],[428.6505,1],[429.4593,1],[430.26822,1],[431.07748,1],[431.88702,1],[432.69675,1],[433.50677,1],[434.317,1],[435.12756,1],[435.9383,1],[436.7493,1],[437.56058,1],[438.3721,1],[439.18387,1],[439.99588,1],[440.80814,1],[441.62064,1],[442.4334,1],[443.24643,1],[444.05966,1],[444.8732,1],[445.68698,1],[446.50098,1],[447.3152,1],[448.1297,1],[448.94446,1],[449.75943,1],[450.57462,1],[451.39014,1],[452.20587,1],[453.02182,1],[453.838,1],[454.6544,1],[455.47107,1],[456.28802,1],[457.10522,1],[457.92267,1],[458.7403,1],[459.5582,1],[460.37634,1],[461.19473,1],[462.01334,1],[462.83224,1],[463.6513,1],[464.47067,1],[465.29022,1],[466.11005,1],[466.93015,1],[467.7504,1],[468.57092,1],[469.39166,1],[470.21274,1],[471.03397,1],[471.8554,1],[472.67712,1],[473.4991,1],[474.3213,1],[475.14368,1],[475.96634,1],[476.78925,1],[477.61237,1],[478.43573,1],[479.25928,1],[480.0831,1],[480.9072,1],[481.73145,1],[482.55594,1],[483.3807,1],[484.20566,1],[485.03088,1],[485.85632,1],[486.682,1],[487.5079,1],[488.33405,1],[489.1604,1],[489.987,1],[490.81387,1],[491.64087,1],[492.46814,1],[493.2957,1],[494.12335,1],[494.95132,1],[495.77948,1],[496.60797,1],[497.4366,1],[498.26547,1],[499.09457,1],[499.9239,1],[500.75342,1],[501.5832,1],[502.41318,1],[503.2434,1],[504.07385,1],[504.90457,1],[505.73538,1],[506.5665,1],[507.39783,1],[508.2294,1],[509.0612,1],[509.8932,1],[510.7254,1],[511.55783,1],[512.39056,1],[513.2234,1],[514.05646,1],[514.8898,1],[515.7233,1],[516.5571,1],[517.3912,1],[518.22534,1],[519.05975,1],[519.8945,1],[520.7293,1],[521.56433,1],[522.3996,1],[523.2351,1],[524.07086,1],[524.90686,1],[525.74304,1],[526.5794,1],[527.416,1],[528.2528,1],[529.08984,1],[529.92706,1],[530.7645,1],[531.60223,1],[532.4401,1],[533.27826,1],[534.1165,1],[534.9551,1],[535.7938,1],[536.63275,1],[537.4719,1],[538.31134,1],[539.15094,1],[539.9908,1],[540.8308,1],[541.67096,1],[542.5115,1],[543.3521,1],[544.19293,1],[545.034,1],[545.87524,1],[546.71686,1],[547.55853,1],[548.4004,1],[549.24255,1],[550.08484,1],[550.9274,1],[551.77014,1],[552.6131,1],[553.4563,1],[554.29974,1],[555.1433,1],[555.98706,1],[556.831,1],[557.6753,1],[558.51965,1],[559.36426,1],[560.20905,1],[561.0541,1],[561.8993,1],[562.74475,1],[563.5904,1],[564.4362,1],[565.2823,1],[566.12854,1],[566.975,1],[567.82166,1],[568.6685,1],[569.51556,1],[570.3629,1],[571.2103,1],[572.058,1],[572.9059,1],[573.75397,1],[574.60223,1],[575.45074,1],[576.29944,1],[577.1483,1],[577.99744,1],[578.8467,1],[579.69617,1],[580.5459,1],[581.39575,1],[582.2459,1],[583.0962,1],[583.9467,1],[584.79736,1],[585.64825,1],[586.49927,1],[587.3506,1],[588.202,1],[589.0537,1],[589.90564,1],[590.75775,1],[591.61005,1],[592.4624,1],[593.3151,1],[594.16797,1],[595.02106,1],[595.8742,1],[596.7277,1],[597.5814,1],[598.43524,1],[599.2893,1],[600.1435,1],[600.99786,1],[601.8525,1],[602.7073,1],[603.5623,1],[604.4176,1],[605.273,1],[606.12854,1],[606.9843,1],[607.84033,1],[608.6964,1],[609.5528,1],[610.40936,1],[611.26605,1],[612.12305,1],[612.9802,1],[613.8375,1],[614.695,1],[615.5527,1],[616.4106,1],[617.2687,1],[618.12695,1],[618.9855,1],[619.84406,1],[620.70294,1],[621.56195,1],[622.4212,1],[623.2806,1],[624.14014,1],[624.9999,1],[625.8599,1],[626.72015,1],[627.58044,1],[628.441,1],[629.30176,1],[630.1626,1],[631.02374,1],[631.8851,1],[632.74646,1],[633.6082,1],[634.47003,1],[635.3321,1],[636.1943,1],[637.05664,1],[637.91925,1],[638.78204,1],[639.64496,1],[640.5081,1],[641.3715,1],[642.235,1],[643.09863,1],[643.9625,1],[644.8266,1],[645.69086,1],[646.5553,1],[647.4199,1],[648.2847,1],[649.1497,1],[650.01483,1],[650.88025,1],[651.7457,1],[652.6115,1],[653.4774,1],[654.34344,1],[655.20966,1],[656.0762,1],[656.9428,1],[657.8096,1],[658.6766,1],[659.54376,1],[660.4111,1],[661.2786,1],[662.1463,1],[663.0143,1],[663.88226,1],[664.75055,1],[665.61896,1],[666.48755,1],[667.3563,1],[668.2253,1],[669.09436,1],[669.9637,1],[670.8333,1],[671.70294,1],[672.57275,1],[673.4428,1],[674.31305,1],[675.1834,1],[676.05396,1],[676.9247,1],[677.7956,1],[678.66675,1],[679.538,1],[680.4095,1],[681.28107,1],[682.1529,1],[683.02484,1],[683.897,1],[684.7693,1],[685.64185,1],[686.5145,1],[687.3873,1],[688.26044,1],[689.13354,1],[690.0069,1],[690.8805,1],[691.75415,1],[692.62805,1],[693.5022,1],[694.3764,1],[695.2508,1],[696.1254,1],[697.0001,1],[697.8751,1],[698.7502,1],[699.6254,1],[700.5009,1],[701.3766,1],[702.2524,1],[703.1283,1],[704.00446,1]],"x":[-170.55,-170.3794,-170.20879,-170.03816,-169.86755,-169.69695,-169.52634,-169.35573,-169.18512,-169.01451,-168.8439,-168.6733,-168.50267,-168.33206,-168.16145,-167.99084,-167.82024,-167.64963,-167.47902,-167.30841,-167.13779,-166.96718,-166.79657,-166.62596,-166.45535,-166.28474,-166.11414,-165.94353,-165.77292,-165.6023,-165.43169,-165.26108,-165.09047,-164.91986,-164.74925,-164.57864,-164.40804,-164.23741,-164.0668,-163.8962,-163.72559,-163.55498,-163.38437,-163.21376,-163.04315,-162.87254,-162.70192,-162.53131,-162.3607,-162.1901,-162.01949,-161.84888,-161.67827,-161.50766,-161.33704,-161.16643,-160.99582,-160.82521,-160.6546,-160.484,-160.31339,-160.14278,-159.97217,-159.80154,-159.63094,-159.46033,-159.28972,-159.11911,-158.9485,-158.7779,-158.60728,-158.43666,-158.26605,-158.09544,-157.92484,-157.75423,-157.58362,-157.41301,-157.2424,-157.0718,-156.90117,-156.73056,-156.55995,-156.38934,-156.21873,-156.04813,-155.87752,-155.70691,-155.5363,-155.36568,-155.19507,-155.02446,-154.85385,-154.68324,-154.51263,-154.34203,-154.17142,-154.0008,-153.83018,-153.65958,-153.48897,-153.31836,-153.14775,-152.97714,-152.80653,-152.63593,-152.4653,-152.2947,-152.12408,-151.95348,-151.78287,-151.61226,-151.44165,-151.27104,-151.10042,-150.92981,-150.7592,-150.5886,-150.41798,-150.24738,-150.07677,-149.90616,-149.73555,-149.56493,-149.39432,-149.22371,-149.0531,-148.88249,-148.71188,-148.54128,-148.37067,-148.20004,-148.02943,-147.85883,-147.68822,-147.51761,-147.347,-147.17639,-147.00578,-146.83517,-146.66455,-146.49394,-146.32333,-146.15273,-145.98212,-145.81151,-145.6409,-145.47029,-145.29967,-145.12906,-144.95845,-144.78784,-144.61723,-144.44662,-144.27602,-144.10541,-143.9348,-143.76418,-143.59357,-143.42296,-143.25235,-143.08174,-142.91113,-142.74052,-142.56992,-142.3993,-142.22868,-142.05807,-141.88747,-141.71686,-141.54625,-141.37564,-141.20503,-141.03442,-140.8638,-140.69319,-140.52258,-140.35197,-140.18137,-140.01076,-139.84015,-139.66954,-139.49893,-139.32831,-139.1577,-138.98709,-138.81648,-138.64587,-138.47527,-138.30466,-138.13405,-137.96342,-137.79282,-137.62221,-137.4516,-137.28099,-137.11038,-136.93977,-136.76917,-136.59856,-136.42793,-136.25732,-136.08672,-135.9161,-135.7455,-135.57489,-135.40428,-135.23367,-135.06305,-134.89244,-134.72183,-134.55122,-134.38062,-134.21,-134.0394,-133.86879,-133.69818,-133.52756,-133.35695,-133.18634,-133.01573,-132.84512,-132.67451,-132.5039,-132.3333,-132.16267,-131.99207,-131.82146,-131.65085,-131.48024,-131.30963,-131.13902,-130.96841,-130.7978,-130.62718,-130.45657,-130.28596,-130.11536,-129.94475,-129.77414,-129.60353,-129.43292,-129.2623,-129.09169,-128.92108,-128.75047,-128.57986,-128.40926,-128.23865,-128.06804,-127.89742,-127.726814,-127.556206,-127.38559,-127.21498,-127.04437,-126.873764,-126.70315,-126.53254,-126.36193,-126.19132,-126.02071,-125.8501,-125.67949,-125.50888,-125.33827,-125.167656,-124.99705,-124.82644,-124.65583,-124.485214,-124.314606,-124.144,-123.97339,-123.80278,-123.632164,-123.461555,-123.29095,-123.12034,-122.94972,-122.77911,-122.608505,-122.4379,-122.26728,-122.09667,-121.92606,-121.755455,-121.58484,-121.41423,-121.24362,-121.07301,-120.902405,-120.73179,-120.56118,-120.39057,-120.21996,-120.04935,-119.87874,-119.70813,-119.53752,-119.366905,-119.1963,-119.02569,-118.85508,-118.68446,-118.513855,-118.34325,-118.17264,-118.00203,-117.83141,-117.660805,-117.4902,-117.31959,-117.14897,-116.97836,-116.807755,-116.637146,-116.46653,-116.29592,-116.12531,-115.954704,-115.784096,-115.61348,-115.44287,-115.27226,-115.101654,-114.93104,-114.76043,-114.58982,-114.41921,-114.2486,-114.07799,-113.90738,-113.73677,-113.566154,-113.395546,-113.22494,-113.05433,-112.88372,-112.713104,-112.542496,-112.37189,-112.20128,-112.03066,-111.860054,-111.689445,-111.51884,-111.34822,-111.17761,-111.007,-110.836395,-110.66578,-110.49517,-110.32456,-110.15395,-109.983345,-109.81273,-109.64212,-109.47151,-109.3009,-109.13029,-108.95968,-108.78907,-108.61846,-108.447845,-108.27724,-108.10663,-107.93602,-107.76541,-107.594795,-107.42419,-107.25358,-107.08297,-106.91235,-106.741745,-106.57114,-106.40053,-106.22991,-106.0593,-105.888695,-105.71809,-105.54747,-105.37686,-105.20625,-105.035645,-104.865036,-104.69442,-104.52381,-104.3532,-104.182594,-104.01198,-103.84137,-103.67076,-103.50015,-103.32954,-103.15893,-102.98832,-102.81771,-102.6471,-102.47649,-102.30588,-102.13527,-101.96466,-101.794044,-101.623436,-101.45283,-101.28222,-101.1116,-100.940994,-100.770386,-100.59978,-100.42916,-100.25855,-100.087944,-99.917336,-99.74673,-99.57611,-99.4055,-99.23489,-99.064285,-98.89367,-98.72306,-98.55245,-98.38184,-98.21123,-98.04062,-97.87001,-97.6994,-97.528786,-97.35818,-97.18757,-97.01696,-96.84635,-96.675735,-96.50513,-96.33452,-96.16391,-95.99329,-95.822685,-95.65208,-95.48147,-95.31085,-95.14024,-94.969635,-94.79903,-94.62842,-94.4578,-94.28719,-94.116585,-93.94598,-93.77536,-93.60475,-93.43414,-93.263535,-93.09292,-92.92231,-92.7517,-92.58109,-92.41048,-92.23987,-92.06926,-91.89865,-91.72804,-91.55743,-91.38682,-91.21621,-91.0456,-90.874985,-90.70438,-90.53377,-90.36316,-90.19254,-90.021935,-89.851326,-89.68072,-89.5101,-89.33949,-89.168884,-88.998276,-88.82767,-88.65705,-88.48644,-88.315834,-88.145226,-87.97461,-87.804,-87.63339,-87.46278,-87.29217,-87.12156,-86.95095,-86.78034,-86.60973,-86.43912,-86.26851,-86.0979,-85.92729,-85.756676,-85.58607,-85.41546,-85.24485,-85.074234,-84.903625,-84.73302,-84.56241,-84.39179,-84.22118,-84.050575,-83.87997,-83.70936,-83.53874,-83.36813,-83.197525,-83.02692,-82.8563,-82.68569,-82.51508,-82.344475,-82.17386,-82.00325,-81.83264,-81.66203,-81.49142,-81.32081,-81.1502,-80.97959,-80.80898,-80.63837,-80.46776,-80.29715,-80.12654,-79.955925,-79.78532,-79.61471,-79.4441,-79.27348,-79.102875,-78.93227,-78.76166,-78.59105,-78.42043,-78.249825,-78.079216,-77.90861,-77.73799,-77.56738,-77.396774,-77.226166,-77.05555,-76.88494,-76.71433,-76.543724,-76.37311,-76.2025,-76.03189,-75.86128,-75.690674,-75.52006,-75.34945,-75.17884,-75.00823,-74.837616,-74.66701,-74.4964,-74.32579,-74.155174,-73.984566,-73.81396,-73.64335,-73.47274,-73.302124,-73.131516,-72.96091,-72.7903,-72.61968,-72.44907,-72.278465,-72.10786,-71.93724,-71.76663,-71.59602,-71.425415,-71.2548,-71.08419,-70.91358,-70.74297,-70.572365,-70.40175,-70.23114,-70.06053,-69.88992,-69.71931,-69.5487,-69.37809,-69.20748,-69.036865,-68.86626,-68.69565,-68.52504,-68.35442,-68.183815,-68.01321,-67.8426,-67.67199,-67.50137,-67.330765,-67.16016,-66.98955,-66.81893,-66.64832,-66.477715,-66.307106,-66.13649,-65.96588,-65.79527,-65.624664,-65.454056,-65.28344,-65.11283,-64.94222,-64.771614,-64.601,-64.43039,-64.25978,-64.08917,-63.91856,-63.747948,-63.57734,-63.406727,-63.23612,-63.065506,-62.894897,-62.72429,-62.553677,-62.383068,-62.212456,-62.041847,-61.871235,-61.700626,-61.530014,-61.359406,-61.188793,-61.018185,-60.847572,-60.676964,-60.50635,-60.335743,-60.165134,-59.994522,-59.823914,-59.6533,-59.482693,-59.31208,-59.14147,-58.97086,-58.80025,-58.62964,-58.45903,-58.288418,-58.11781,-57.947197,-57.77659,-57.605976,-57.435368,-57.26476,-57.094147,-56.92354,-56.752926,-56.582317,-56.411705,-56.241096,-56.070484,-55.899876,-55.729263,-55.558655,-55.388042,-55.217434,-55.04682,-54.876213,-54.705605,-54.534992,-54.364384,-54.19377,-54.023163,-53.85255,-53.681942,-53.51133,-53.34072,-53.17011,-52.9995,-52.828888,-52.65828,-52.487667,-52.31706,-52.14645,-51.975838,-51.80523,-51.634617,-51.46401,-51.293396,-51.122787,-50.952175,-50.781567,-50.610954,-50.440346,-50.269733,-50.099125,-49.928513,-49.757904,-49.587296,-49.416683,-49.246075,-49.075462,-48.904854,-48.73424,-48.563633,-48.39302,-48.222412,-48.0518,-47.88119,-47.71058,-47.53997,-47.369358,-47.19875,-47.028137,-46.85753,-46.68692,-46.516308,-46.3457,-46.175087,-46.00448,-45.833866,-45.663258,-45.492645,-45.322037,-45.151424,-44.980816,-44.810204,-44.639595,-44.468983,-44.298374,-44.127766,-43.957153,-43.786545,-43.615932,-43.445324,-43.27471,-43.104103,-42.93349,-42.762882,-42.59227,-42.42166,-42.25105,-42.08044,-41.90983,-41.73922,-41.56861,-41.398,-41.22739,-41.056778,-40.88617,-40.715557,-40.54495,-40.374336,-40.203728,-40.033115,-39.862507,-39.691895,-39.521286,-39.350674,-39.180065,-39.009457,-38.838844,-38.668236,-38.497623,-38.327015,-38.156403,-37.985794,-37.81518,-37.644573,-37.47396,-37.303352,-37.13274,-36.96213,-36.79152,-36.62091,-36.4503,-36.27969,-36.10908,-35.93847,-35.76786,-35.597248,-35.42664,-35.256027,-35.08542,-34.914806,-34.744198,-34.573586,-34.402977,-34.232365,-34.061756,-33.891144,-33.720535,-33.549927,-33.379314,-33.208706,-33.038094,-32.867485,-32.696873,-32.526264,-32.35565,-32.185043,-32.01443,-31.843822,-31.673212,-31.502602,-31.331991,-31.16138,-30.99077,-30.82016,-30.64955,-30.47894,-30.308329,-30.137718,-29.967108,-29.796497,-29.625889,-29.455278,-29.284668,-29.114058,-28.943447,-28.772837,-28.602226,-28.431616,-28.261005,-28.090395,-27.919785,-27.749174,-27.578564,-27.407953,-27.237343,-27.066734,-26.896124,-26.725513,-26.554903,-26.384293,-26.213682,-26.043072,-25.872461,-25.70185,-25.53124,-25.36063,-25.19002,-25.01941,-24.848799,-24.678188,-24.507578,-24.33697,-24.166359,-23.995749,-23.825138,-23.654528,-23.483917,-23.313307,-23.142696,-22.972086,-22.801476,-22.630865,-22.460255,-22.289644,-22.119034,-21.948423,-21.777813,-21.607204,-21.436594,-21.265984,-21.095373,-20.924763,-20.754152,-20.583542,-20.412931,-20.242321,-20.07171,-19.9011,-19.73049,-19.55988,-19.389269,-19.218658,-19.04805,-18.87744,-18.70683,-18.536219,-18.365608,-18.194998,-18.024387,-17.853777,-17.683167,-17.512556,-17.341946,-17.171335,-17.000725,-16.830114,-16.659504,-16.488894,-16.318285,-16.147675,-15.977063,-15.806453,-15.635843,-15.465233,-15.294622,-15.124012,-14.953402,-14.782791,-14.612181,-14.441571,-14.270961,-14.10035,-13.92974,-13.75913,-13.588519,-13.417909,-13.247298,-13.076689,-12.906078,-12.735468,-12.5648575,-12.394247,-12.223637,-12.053026,-11.882416,-11.711806,-11.541196,-11.370585,-11.199975,-11.029365,-10.858754,-10.688144,-10.517533,-10.346924,-10.176313,-10.005703,-9.835093,-9.664482,-9.493872,-9.323261,-9.152652,-8.982041,-8.811431,-8.6408205,-8.47021,-8.2996,-8.128989,-7.9583793,-7.787769,-7.6171584,-7.4465485,-7.275938,-7.1053276,-6.934717,-6.764107,-6.593497,-6.4228864,-6.252276,-6.081666,-5.9110556,-5.740445,-5.5698347,-5.3992248,-5.2286143,-5.058004,-4.8873935,-4.7167835,-4.546173,-4.3755627,-4.2049522,-4.0343423,-3.8637319,-3.6931217,-3.5225112,-3.351901,-3.1812906,-3.0106804,-2.84007,-2.6694598,-2.4988494,-2.3282392,-2.1576288,-1.9870185,-1.8164082,-1.6457978,-1.4751875,-1.3045772,-1.133967,-0.9633567,-0.79274637,-0.62213606,-0.45152578,-0.28091547,-0.11030515,0.060305152,0.23091546,0.40152577,0.57213604,0.74274635,0.91335666,1.083967,1.2545773,1.4251876,1.5957979,1.7664082,1.9370185,2.1076288,2.278239,2.4488494,2.6194596,2.79007,2.9606802,3.1312907,3.3019009,3.4725113,3.6431215,3.813732,3.984342,4.1549525,4.325563,4.496173,4.6667833,4.8373938,5.008004,5.178614,5.3492246,5.519835,5.6904454,5.8610554,6.031666,6.202276,6.3728867,6.5434966,6.714107,6.8847175,7.055328,7.225938,7.3965483,7.5671587,7.7377687,7.908379,8.078989,8.249599,8.42021,8.59082,8.761431,8.932041,9.102652,9.273262,9.4438715,9.614482,9.785092,9.955703,10.126313,10.296924,10.467534,10.6381445,10.808754,10.979364,11.149975,11.320585,11.491196,11.661806,11.832417,12.003027,12.173636,12.344247,12.514857,12.685468,12.856078,13.026689,13.197299,13.3679085,13.538519,13.709129,13.87974,14.05035,14.220961,14.391571,14.562181,14.732791,14.903401,15.074012,15.244622,15.415233,15.585843,15.7564535,15.927064,16.097673,16.268284,16.438894,16.609505,16.780115,16.950726,17.121336,17.291946,17.462557,17.633167,17.803778,17.974388,18.144997,18.315607,18.486217,18.656828,18.827438,18.998049,19.16866,19.33927,19.50988,19.68049,19.8511,20.021711,20.192322,20.362932,20.533543,20.704151,20.874762,21.045372,21.215982,21.386593,21.557203,21.727814,21.898424,22.069035,22.239645,22.410255,22.580866,22.751476,22.922087,23.092697,23.263308,23.433916,23.604527,23.775137,23.945747,24.116358,24.286968,24.457579,24.62819,24.7988,24.96941,25.14002,25.31063,25.481241,25.651852,25.822462,25.99307,26.163681,26.334291,26.504902,26.675512,26.846123,27.016733,27.187344,27.357954,27.528564,27.699175,27.869785,28.040396,28.211006,28.381617,28.552227,28.722836,28.893446,29.064056,29.234667,29.405277,29.575888,29.746498,29.917109,30.087719,30.25833,30.42894,30.59955,30.77016,30.940771,31.111382,31.28199,31.4526,31.62321,31.793821,31.964432,32.135044,32.305653,32.476265,32.646873,32.817482,32.988094,33.158703,33.329315,33.499924,33.670536,33.841145,34.011757,34.182365,34.352978,34.523586,34.6942,34.864807,35.03542,35.206028,35.376637,35.54725,35.717857,35.88847,36.05908,36.22969,36.4003,36.57091,36.74152,36.912132,37.08274,37.253353,37.42396,37.594574,37.765182,37.93579,38.106403,38.27701,38.447624,38.618233,38.788845,38.959454,39.130066,39.300674,39.471287,39.641895,39.812508,39.983116,40.15373,40.324337,40.49495,40.665558,40.836166,41.00678,41.177387,41.348,41.51861,41.68922,41.85983,42.03044,42.20105,42.371662,42.54227,42.712883,42.88349,43.054104,43.224712,43.39532,43.565933,43.73654,43.907154,44.077763,44.248375,44.418983,44.589596,44.760204,44.930817,45.101425,45.272038,45.442646,45.61326,45.783867,45.954475,46.125088,46.295696,46.46631,46.636917,46.80753,46.978138,47.14875,47.31936,47.48997,47.66058,47.831192,48.0018,48.172413,48.34302,48.51363,48.684242,48.85485,49.025463,49.19607,49.366684,49.537292,49.707905,49.878513,50.049126,50.219734,50.390347,50.560955,50.731567,50.902176,51.07279,51.243397,51.414005,51.584618,51.755226,51.92584,52.096447,52.26706,52.437668,52.60828,52.77889,52.9495,53.12011,53.29072,53.46133,53.631943,53.80255,53.97316,54.143772,54.31438,54.484993,54.6556,54.826214,54.996822,55.167435,55.338043,55.508656,55.679264,55.849876,56.020485,56.191097,56.361706,56.532314,56.702927,56.873535,57.044147,57.214756,57.38537,57.555977,57.72659,57.897198,58.06781,58.23842,58.40903,58.57964,58.75025,58.92086,59.091473,59.26208,59.43269,59.603302,59.77391,59.944523,60.11513,60.285744,60.456352,60.626965,60.797573,60.968185,61.138794,61.309406,61.480015,61.650627,61.821236,61.991844,62.162457,62.333065,62.503677,62.674286,62.8449,63.015507,63.18612,63.356728,63.52734,63.69795,63.86856,64.03917,64.20978,64.380394,64.551,64.72161,64.89222,65.06283,65.233444,65.40405,65.57466,65.74527,65.915886,66.086494,66.2571,66.42771,66.59833,66.768936,66.939545,67.11015,67.28076,67.45138,67.62199,67.792595,67.9632,68.13382,68.30443,68.47504,68.645645,68.81626,68.98687,69.15748,69.32809,69.4987,69.66931,69.83992,70.01053,70.18114,70.35175,70.52236,70.69297,70.86358,71.034195,71.2048,71.37541,71.54602,71.71664,71.887245,72.05785,72.22846,72.39907,72.56969,72.740295,72.910904,73.08151,73.25213,73.42274,73.593346,73.763954,73.93457,74.10518,74.27579,74.446396,74.61701,74.78762,74.95823,75.12884,75.299446,75.47006,75.64067,75.81128,75.98189,76.152504,76.32311,76.49372,76.66433,76.834946,77.005554,77.17616,77.34677,77.51739,77.687996,77.858604,78.02921,78.19982,78.37044,78.541046,78.711655,78.88226,79.05288,79.22349,79.3941,79.564705,79.73532,79.90593,80.07654,80.24715,80.417755,80.58837,80.75898,80.92959,81.1002,81.27081,81.44142,81.61203,81.78264,81.953255,82.12386,82.29447,82.46508,82.6357,82.806305,82.97691,83.14752,83.31813,83.48875,83.659355,83.82996,84.00057,84.17119,84.3418,84.512405,84.683014,84.85363,85.02424,85.19485,85.365456,85.53607,85.70668,85.87729,86.0479,86.218506,86.38912,86.55973,86.73034,86.90095,87.07156,87.24217,87.41278,87.58339,87.754005,87.924614,88.09522,88.26583,88.43644,88.607056,88.777664,88.94827,89.11888,89.2895,89.460106,89.630714,89.80132,89.97194,90.14255,90.313156,90.483765,90.65438,90.82499,90.9956,91.16621,91.336815,91.50743,91.67804,91.84865,92.01926,92.18987,92.36048,92.53109,92.7017,92.872314,93.04292,93.21353,93.38414,93.554756,93.725365,93.89597,94.06658,94.23719,94.40781,94.578415,94.74902,94.91963,95.09025,95.26086,95.431465,95.60207,95.77269,95.9433,96.11391,96.284515,96.455124,96.62574,96.79635,96.96696,97.137566,97.30818,97.47879,97.6494,97.82001,97.99062,98.16123,98.33184,98.50245,98.673065,98.84367,99.01428,99.18489,99.3555,99.526115,99.696724,99.86733,100.03794,100.20856,100.379166,100.549774,100.72038,100.891,101.06161,101.232216,101.402824,101.57343,101.74405,101.91466,102.085266,102.255875,102.42649,102.5971,102.76771,102.93832,103.10893,103.27954,103.45015,103.62076,103.791374,103.96198,104.13259,104.3032,104.47381,104.644424,104.81503,104.98564,105.15625,105.326866,105.497475,105.66808,105.83869,106.00931,106.17992,106.350525,106.52113,106.69175,106.86236,107.03297,107.203575,107.37418,107.5448,107.71541,107.88602,108.056625,108.22724,108.39785,108.56846,108.73907,108.90968,109.08029,109.2509,109.42151,109.59212,109.76273,109.93334,110.10395,110.27456,110.445175,110.61578,110.78639,110.957,111.12762,111.298225,111.468834,111.63944,111.81006,111.98067,112.151276,112.321884,112.49249,112.66311,112.83372,113.004326,113.174934,113.34555,113.51616,113.68677,113.857376,114.02799,114.1986,114.36921,114.53982,114.710434,114.88104,115.05165,115.22226,115.39287,115.563484,115.73409,115.9047,116.07531,116.245926,116.416534,116.58714,116.75775,116.92837,117.098976,117.269585,117.44019,117.6108,117.78142,117.95203,118.122635,118.29324,118.46386,118.63447,118.80508,118.975685,119.1463,119.31691,119.48752,119.65813,119.82874,119.99935,120.16996,120.34057,120.51118,120.68179,120.8524,121.02301,121.19362,121.364235,121.53484,121.70545,121.87606,122.04668,122.217285,122.38789,122.5585,122.72912,122.89973,123.070335,123.240944,123.41155,123.58217,123.75278,123.923386,124.093994,124.26461,124.43522,124.60583,124.776436,124.94705,125.11766,125.28827,125.45888,125.629486,125.8001,125.97071,126.14132,126.31193,126.482544,126.65315,126.82376,126.99437,127.164986,127.335594,127.5062,127.67681,127.84743,128.01804,128.18864,128.35925,128.52986,128.70047,128.87108,129.0417,129.21231,129.38292,129.55353,129.72414,129.89474,130.06535,130.23596,130.40659,130.5772,130.7478,130.91841,131.08902,131.25963,131.43024,131.60085,131.77145,131.94208,132.11269,132.2833,132.4539,132.62451,132.79512,132.96573,133.13634,133.30696,133.47757,133.64818,133.81879,133.9894,134.16,134.33061,134.50122,134.67183,134.84245,135.01306,135.18367,135.35428,135.52489,135.6955,135.8661,136.03671,136.20732,136.37794,136.54855,136.71916,136.88977,137.06038,137.23099,137.4016,137.5722,137.74283,137.91344,138.08405,138.25465,138.42526,138.59587,138.76648,138.93709,139.1077,139.27832,139.44893,139.61954,139.79015,139.96075,140.13136,140.30197,140.47258,140.6432,140.81381,140.98442,141.15503,141.32564,141.49625,141.66685,141.83746,142.00807,142.1787,142.3493,142.51991,142.69052,142.86113,143.03174,143.20235,143.37296,143.54358,143.71419,143.8848,144.0554,144.22601,144.39662,144.56723,144.73784,144.90845,145.07907,145.24968,145.42029,145.5909,145.7615,145.93211,146.10272,146.27333,146.44395,146.61456,146.78517,146.95578,147.12639,147.297,147.4676,147.63821,147.80882,147.97945,148.15005,148.32066,148.49127,148.66188,148.83249,149.0031,149.1737,149.34431,149.51494,149.68555,149.85616,150.02676,150.19737,150.36798,150.53859,150.7092,150.87982,151.05043,151.22104,151.39165,151.56226,151.73286,151.90347,152.07408,152.24469,152.41531,152.58592,152.75653,152.92714,153.09775,153.26836,153.43896,153.60957,153.7802,153.9508,154.12141,154.29202,154.46263,154.63324,154.80385,154.97446,155.14507,155.31569,155.4863,155.6569,155.82751,155.99812,156.16873,156.33934,156.50995,156.68057,156.85118,157.02179,157.1924,157.363,157.53362,157.70422,157.87483,158.04544,158.21606,158.38667,158.55728,158.72789,158.8985,159.0691,159.23972,159.41032,159.58095,159.75156,159.92216,160.09277,160.26338,160.43399,160.6046,160.7752,160.94582,161.11644,161.28705,161.45766,161.62827,161.79887,161.96948,162.14009,162.3107,162.48132,162.65193,162.82254,162.99315,163.16376,163.33437,163.50497,163.67558,163.84619,164.01682,164.18742,164.35803,164.52864,164.69925,164.86986,165.04047,165.21107,165.38168,165.5523,165.72292,165.89352,166.06413,166.23474,166.40535,166.57596,166.74657,166.91719,167.0878,167.2584,167.42902,167.59962,167.77023,167.94084,168.11145,168.28206,168.45268,168.62329,168.7939,168.96451,169.13512,169.30573,169.47633,169.64694,169.81757,169.98817,170.15878,170.32939,170.5]} diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/fixtures/julia/integers.json b/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/fixtures/julia/integers.json new file mode 100644 index 000000000000..4e9eb26400a2 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/fixtures/julia/integers.json @@ -0,0 +1 @@ +{"expected":[[0.0,1],[0.0,1],[0.6931472,1],[1.7917595,1],[3.1780539,1],[4.787492,1],[6.5792513,1],[8.525162,1],[10.604603,1],[12.801827,1],[15.104413,1],[17.502308,1],[19.987215,1],[22.552166,1],[25.191223,1],[27.899271,1],[30.67186,1],[33.505074,1],[36.395447,1],[39.33988,1],[42.335617,1],[45.38014,1],[48.471184,1],[51.606674,1],[54.78473,1],[58.0036,1],[61.261703,1],[64.55754,1],[67.88974,1],[71.25704,1],[74.65823,1],[78.092224,1],[81.55796,1],[85.05447,1],[88.580826,1],[92.13618,1],[95.71969,1],[99.33061,1],[102.96819,1],[106.63176,1],[110.32064,1],[114.03422,1],[117.77188,1],[121.53308,1],[125.317276,1],[129.12393,1],[132.95258,1],[136.80272,1],[140.67392,1],[144.56575,1],[148.47777,1],[152.40959,1],[156.36084,1],[160.33113,1],[164.32011,1],[168.32744,1],[172.35278,1],[176.39584,1],[180.4563,1],[184.53384,1],[188.62816,1],[192.73904,1],[196.86617,1],[201.00932,1],[205.16821,1],[209.34259,1],[213.53226,1],[217.73694,1],[221.95645,1],[226.19055,1],[230.43906,1],[234.70172,1],[238.9784,1],[243.26886,1],[247.57292,1],[251.8904,1],[256.22113,1],[260.56497,1],[264.92163,1],[269.2911,1],[273.67313,1],[278.06757,1],[282.47427,1],[286.89313,1],[291.32394,1],[295.7666,1],[300.22095,1],[304.68686,1],[309.16418,1],[313.65283,1],[318.15265,1],[322.66348,1],[327.18527,1],[331.7179,1],[336.2612,1],[340.81506,1],[345.3794,1],[349.95413,1],[354.5391,1],[359.13422,1],[363.73938,1],[368.35452,1],[372.97946,1],[377.61423,1],[382.25858,1],[386.91257,1],[391.57596,1],[396.2488,1],[400.93097,1],[405.6223,1],[410.32278,1],[415.0323,1],[419.75082,1],[424.4782,1],[429.21442,1],[433.9593,1],[438.71292,1],[443.4751,1],[448.24576,1],[453.0249,1],[457.81238,1],[462.60815,1],[467.4122,1],[472.2244,1],[477.04468,1],[481.87296,1],[486.7093,1],[491.55344,1],[496.40546,1],[501.26532,1],[506.13284,1],[511.00803,1],[515.8908,1],[520.7812,1],[525.679,1],[530.5843,1],[535.49695,1],[540.41693,1],[545.3442,1],[550.2786,1],[555.22034,1],[560.1691,1],[565.1249,1],[570.0877,1],[575.0575,1],[580.0343,1],[585.0179,1],[590.0083,1],[595.0055,1],[600.00946,1],[605.0201,1],[610.0374,1],[615.0613,1],[620.0917,1],[625.12866,1],[630.1721,1],[635.222,1],[640.2782,1],[645.34076,1],[650.40967,1],[655.4848,1],[660.5663,1],[665.6538,1],[670.74756,1],[675.8475,1],[680.95337,1],[686.0654,1],[691.18335,1],[696.3073,1],[701.43726,1],[706.57306,1]],"x":[1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0,26.0,27.0,28.0,29.0,30.0,31.0,32.0,33.0,34.0,35.0,36.0,37.0,38.0,39.0,40.0,41.0,42.0,43.0,44.0,45.0,46.0,47.0,48.0,49.0,50.0,51.0,52.0,53.0,54.0,55.0,56.0,57.0,58.0,59.0,60.0,61.0,62.0,63.0,64.0,65.0,66.0,67.0,68.0,69.0,70.0,71.0,72.0,73.0,74.0,75.0,76.0,77.0,78.0,79.0,80.0,81.0,82.0,83.0,84.0,85.0,86.0,87.0,88.0,89.0,90.0,91.0,92.0,93.0,94.0,95.0,96.0,97.0,98.0,99.0,100.0,101.0,102.0,103.0,104.0,105.0,106.0,107.0,108.0,109.0,110.0,111.0,112.0,113.0,114.0,115.0,116.0,117.0,118.0,119.0,120.0,121.0,122.0,123.0,124.0,125.0,126.0,127.0,128.0,129.0,130.0,131.0,132.0,133.0,134.0,135.0,136.0,137.0,138.0,139.0,140.0,141.0,142.0,143.0,144.0,145.0,146.0,147.0,148.0,149.0,150.0,151.0,152.0,153.0,154.0,155.0,156.0,157.0,158.0,159.0,160.0,161.0,162.0,163.0,164.0,165.0,166.0,167.0,168.0,169.0,170.0,171.0]} diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/fixtures/julia/runner.jl new file mode 100755 index 000000000000..289cc3bfedad --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/fixtures/julia/runner.jl @@ -0,0 +1,71 @@ +#!/usr/bin/env julia +# +# @license Apache-2.0 +# +# Copyright (c) 2025 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 JSON +using SpecialFunctions + +""" + gen( domain, name ) + +Generate fixture data and write to file. + +# Arguments + +* `domain`: domain +* `name::AbstractString`: output filename + +# Examples + +``` julia +julia> x = range( -1000, stop = 1000, length = 2001 ); +julia> gen( x, \"data.json\" ); +``` +""" +function gen( domain, name ) + x = collect( domain ); + y = logabsgamma.( x ); + + # Store data to be written to file as a collection: + data = Dict([ + ("x", x), + ("expected", y) + ]); + + # Based on the script directory, create an output filepath: + filepath = joinpath( dir, name ); + + # Write the data to the output filepath as JSON: + outfile = open( filepath, "w" ); + write( outfile, JSON.json(data) ); + write( outfile, "\n" ); + close( outfile ); +end + +# Get the filename: +file = @__FILE__; + +# Extract the directory in which this file resides: +dir = dirname( file ); + +# Generate fixture data for positive values: +x = Float32.( range( 1.0, stop = 171.0, step = 1 ) ); +gen( x, "integers.json" ); + +# Generate fixture data for negative values: +x = Float32.( range( -170.55, stop = 170.5, length = 2000 ) ); +gen( x, "decimals.json" ); diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/test.js b/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/test.js new file mode 100644 index 000000000000..fbb5e6ab9ae1 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/test.js @@ -0,0 +1,147 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var lnf = require( '@stdlib/math/base/special/lnf' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var ulpdiff = require( '@stdlib/number/float32/base/ulp-difference' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var PINF = require( '@stdlib/constants/float32/pinf' ); +var NINF = require( '@stdlib/constants/float32/ninf' ); +var absgammalnf = require( './../lib' ); + + +// FIXTURES // + +var decimals = require( './fixtures/julia/decimals.json' ); +var integers = require( './fixtures/julia/integers.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof absgammalnf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'if provided `NaN`, the function returns `NaN`', function test( t ) { + var v = absgammalnf( NaN ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `infinity` when provided `infinity`', function test( t ) { + var v = absgammalnf( PINF ); + t.strictEqual( v, PINF, 'returns expected value' ); + + v = absgammalnf( NINF ); + t.strictEqual( v, NINF, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns `+infinity` when provided `0`', function test( t ) { + var v = absgammalnf( f32( 0.0 ) ); + t.strictEqual( v, PINF, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `+infinity` for x smaller than or equal to `-2^23`', function test( t ) { + // TODO: Replace with `powf` once available: + var v = absgammalnf( f32( -pow( 2.0, 23 ) ) ); + t.strictEqual( v, PINF, 'returns expected value' ); + + v = absgammalnf( f32( -pow( 2.0, 24 ) ) ); + t.strictEqual( v, PINF, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns `-ln(x)` for very small x', function test( t ) { + var x; + var v; + + x = f32( 2.0e-30 ); + v = absgammalnf( x ); + t.strictEqual( v, -lnf( x ), 'returns expected value' ); + + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of the gamma function (positive integers)', function test( t ) { + var expected; + var x; + var y; + var i; + + x = integers.x; + expected = integers.expected; + + for ( i = 0; i < x.length; i++ ) { + x[ i ] = f32( x[ i ] ); + expected[ i ][ 0 ] = f32( expected[ i ][ 0 ] ); + y = absgammalnf( x[ i ] ); + t.strictEqual( ulpdiff( y, expected[ i ][ 0 ] ) <= 1, true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of the gamma function (decimal values)', function test( t ) { + var expected; + var x; + var y; + var i; + + x = decimals.x; + expected = decimals.expected; + + for ( i = 0; i < 1000; i++ ) { + x[ i ] = f32( x[ i ] ); + expected[ i ][ 0 ] = f32( expected[ i ][ 0 ] ); + y = absgammalnf( x[ i ] ); + t.strictEqual( ulpdiff( y, expected[ i ][ 0 ] ) <= 16, true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of the gamma function for x >= 2^27', function test( t ) { + var expected; + var x; + var v; + + // TODO: Replace with `powf` once available: + x = f32( pow( 2.0, 27 ) ); + v = absgammalnf( x ); + expected = f32( x * f32( lnf( x ) - f32( 1.0 ) ) ); + t.strictEqual( v, expected, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a positive integer, the function returns the natural logarithm of the factorial of (n-1)', function test( t ) { + t.strictEqual( absgammalnf( 4.0 ), lnf( 6.0 ), 'returns expected value' ); + t.strictEqual( absgammalnf( 5.0 ), lnf( 24.0 ), 'returns expected value' ); + t.strictEqual( absgammalnf( 6.0 ), lnf( 120.0 ), 'returns expected value' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/test.native.js new file mode 100644 index 000000000000..34a99e0bea3f --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/absgammalnf/test/test.native.js @@ -0,0 +1,156 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 resolve = require( 'path' ).resolve; +var tape = require( 'tape' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var lnf = require( '@stdlib/math/base/special/lnf' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var ulpdiff = require( '@stdlib/number/float32/base/ulp-difference' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var PINF = require( '@stdlib/constants/float32/pinf' ); +var NINF = require( '@stdlib/constants/float32/ninf' ); +var tryRequire = require( '@stdlib/utils/try-require' ); + + +// FIXTURES // + +var decimals = require( './fixtures/julia/decimals.json' ); +var integers = require( './fixtures/julia/integers.json' ); + + +// VARIABLES // + +var absgammalnf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( absgammalnf instanceof Error ) +}; + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof absgammalnf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'if provided `NaN`, the function returns `NaN`', opts, function test( t ) { + var v = absgammalnf( NaN ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `infinity` when provided `infinity`', opts, function test( t ) { + var v = absgammalnf( PINF ); + t.strictEqual( v, PINF, 'returns expected value' ); + + v = absgammalnf( NINF ); + t.strictEqual( v, NINF, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns `+infinity` when provided `0`', opts, function test( t ) { + var v = absgammalnf( f32( 0.0 ) ); + t.strictEqual( v, PINF, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `+infinity` for x smaller than or equal to `-2^23`', opts, function test( t ) { + // TODO: Replace with `powf` once available: + var v = absgammalnf( f32( -pow( 2.0, 23 ) ) ); + t.strictEqual( v, PINF, 'returns expected value' ); + + v = absgammalnf( f32( -pow( 2.0, 24 ) ) ); + t.strictEqual( v, PINF, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns `-ln(x)` for very small x', opts, function test( t ) { + var x; + var v; + + x = f32( 2.0e-30 ); + v = absgammalnf( x ); + t.strictEqual( v, -lnf( x ), 'returns expected value' ); + + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of the absolute value of the gamma function (positive integers)', opts, function test( t ) { + var expected; + var x; + var y; + var i; + + x = integers.x; + expected = integers.expected; + + for ( i = 0; i < x.length; i++ ) { + x[ i ] = f32( x[ i ] ); + expected[ i ][ 0 ] = f32( expected[ i ][ 0 ] ); + y = absgammalnf( x[ i ] ); + t.strictEqual( ulpdiff( y, expected[ i ][ 0 ] ) <= 1, true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of the absolute value of the gamma function (decimal values)', opts, function test( t ) { + var expected; + var x; + var y; + var i; + + x = decimals.x; + expected = decimals.expected; + + for ( i = 0; i < 1000; i++ ) { + x[ i ] = f32( x[ i ] ); + expected[ i ][ 0 ] = f32( expected[ i ][ 0 ] ); + y = absgammalnf( x[ i ] ); + t.strictEqual( ulpdiff( y, expected[ i ][ 0 ] ) <= 16, true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of the absolute value of the gamma function for x >= 2^27', opts, function test( t ) { + var expected; + var x; + var v; + + // TODO: Replace with `powf` once available: + x = f32( pow( 2.0, 27 ) ); + v = absgammalnf( x ); + expected = f32( x * f32( lnf( x ) - f32( 1.0 ) ) ); + t.strictEqual( v, expected, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a positive integer, the function returns the natural logarithm of the factorial of (n-1)', opts, function test( t ) { + t.strictEqual( absgammalnf( 4.0 ), lnf( 6.0 ), 'returns expected value' ); + t.strictEqual( absgammalnf( 5.0 ), lnf( 24.0 ), 'returns expected value' ); + t.strictEqual( absgammalnf( 6.0 ), lnf( 120.0 ), 'returns expected value' ); + t.end(); +});