From f5e707d41d6998995223b8dad1af4c13e053cfb5 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 7 Jun 2024 22:48:34 +0530 Subject: [PATCH 1/7] feat: add math/base/special/lnf --- .../@stdlib/math/base/special/lnf/LICENSE | 192 ++++++++++++++ .../@stdlib/math/base/special/lnf/README.md | 193 ++++++++++++++ .../base/special/lnf/benchmark/benchmark.js | 51 ++++ .../special/lnf/benchmark/benchmark.native.js | 60 +++++ .../special/lnf/benchmark/c/native/Makefile | 146 ++++++++++ .../lnf/benchmark/c/native/benchmark.c | 136 ++++++++++ .../@stdlib/math/base/special/lnf/binding.gyp | 170 ++++++++++++ .../math/base/special/lnf/docs/repl.txt | 32 +++ .../base/special/lnf/docs/types/index.d.ts | 52 ++++ .../math/base/special/lnf/docs/types/test.ts | 44 +++ .../math/base/special/lnf/examples/c/Makefile | 146 ++++++++++ .../base/special/lnf/examples/c/example.c | 33 +++ .../math/base/special/lnf/examples/index.js | 31 +++ .../math/base/special/lnf/include.gypi | 53 ++++ .../include/stdlib/math/base/special/lnf.h | 38 +++ .../math/base/special/lnf/lib/index.js | 52 ++++ .../@stdlib/math/base/special/lnf/lib/main.js | 181 +++++++++++++ .../math/base/special/lnf/lib/native.js | 62 +++++ .../math/base/special/lnf/lib/polyval_p.js | 47 ++++ .../math/base/special/lnf/lib/polyval_q.js | 47 ++++ .../math/base/special/lnf/manifest.json | 94 +++++++ .../math/base/special/lnf/package.json | 66 +++++ .../math/base/special/lnf/scripts/evalpoly.js | 130 +++++++++ .../math/base/special/lnf/src/Makefile | 70 +++++ .../@stdlib/math/base/special/lnf/src/addon.c | 23 ++ .../@stdlib/math/base/special/lnf/src/main.c | 197 ++++++++++++++ .../special/lnf/test/fixtures/julia/REQUIRE | 2 + .../test/fixtures/julia/large_positive.json | 1 + .../test/fixtures/julia/medium_positive.json | 1 + .../special/lnf/test/fixtures/julia/runner.jl | 94 +++++++ .../test/fixtures/julia/small_positive.json | 1 + .../lnf/test/fixtures/julia/smaller.json | 1 + .../lnf/test/fixtures/julia/subnormal.json | 1 + .../test/fixtures/julia/tiny_positive.json | 1 + .../fixtures/julia/very_large_positive.json | 1 + .../math/base/special/lnf/test/test.js | 241 +++++++++++++++++ .../math/base/special/lnf/test/test.native.js | 250 ++++++++++++++++++ 37 files changed, 2940 insertions(+) create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/LICENSE create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/README.md create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/benchmark/benchmark.native.js create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/benchmark/c/native/Makefile create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/benchmark/c/native/benchmark.c create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/binding.gyp create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/examples/c/Makefile create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/examples/c/example.c create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/examples/index.js create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/include.gypi create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/include/stdlib/math/base/special/lnf.h create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/lib/index.js create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/lib/native.js create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/lib/polyval_p.js create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/lib/polyval_q.js create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/manifest.json create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/package.json create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/scripts/evalpoly.js create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/src/Makefile create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/src/addon.c create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/src/main.c create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/REQUIRE create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/large_positive.json create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/medium_positive.json create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/runner.jl create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/small_positive.json create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/smaller.json create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/subnormal.json create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/tiny_positive.json create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/very_large_positive.json create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/test/test.js create mode 100644 lib/node_modules/@stdlib/math/base/special/lnf/test/test.native.js diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/LICENSE b/lib/node_modules/@stdlib/math/base/special/lnf/LICENSE new file mode 100644 index 000000000000..a7566ad6f2c3 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/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/lnf/README.md b/lib/node_modules/@stdlib/math/base/special/lnf/README.md new file mode 100644 index 000000000000..a5a2822f0bde --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/README.md @@ -0,0 +1,193 @@ + + +# lnf + +> Evaluate the [natural logarithm][natural-logarithm] of a single-precision floating-point number. + +
+ +## Usage + +```javascript +var lnf = require( '@stdlib/math/base/special/lnf' ); +``` + +#### lnf( x ) + +Evaluates the [natural logarithm][natural-logarithm] of a single-precision floating-point number. + +```javascript +var v = lnf( 4.0 ); +// returns ~1.386 + +v = lnf( 0.0 ); +// returns -Infinity + +v = lnf( Infinity ); +// returns Infinity + +v = lnf( NaN ); +// returns NaN +``` + +For negative numbers, the [natural logarithm][natural-logarithm] is **not** defined. + +```javascript +var v = lnf( -4.0 ); +// returns NaN +``` + +
+ + + +
+ +## Examples + + + +```javascript +var randu = require( '@stdlib/random/base/randu' ); +var round = require( '@stdlib/math/base/special/round' ); +var lnf = require( '@stdlib/math/base/special/lnf' ); + +var x; +var i; + +for ( i = 0; i < 100; i++ ) { + x = round( randu() * 100.0 ); + console.log( 'lnf(%d) = %d', x, lnf( x ) ); +} +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/lnf.h" +``` + +#### stdlib_base_lnf( x ) + +Evaluates the [natural logarithm][natural-logarithm] of a single-precision floating-point number. + +```c +float v = stdlib_base_lnf( 2.0f ); +// returns ~0.693f +``` + +The function accepts the following arguments: + +- **x**: `[in] float` input value. + +```c +float stdlib_base_lnf( const float x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/lnf.h" +#include +#include + +int main( void ) { + float out; + float x; + int i; + + for ( i = 0; i < 100; i++ ) { + x = ( (float)rand() / (float)RAND_MAX ) * 100.0f; + out = stdlib_base_lnf( x ); + printf( "lnf(%f) = %f\n", x, out ); + } +} +``` + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/lnf/benchmark/benchmark.js new file mode 100644 index 000000000000..561be698f52d --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/benchmark/benchmark.js @@ -0,0 +1,51 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var randu = require( '@stdlib/random/base/randu' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var pkg = require( './../package.json' ).name; +var lnf = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var x; + var y; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + x = ( randu() * 10000.0 ) - 0.0; + y = lnf( x ); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/lnf/benchmark/benchmark.native.js new file mode 100644 index 000000000000..f1a5338b1091 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/benchmark/benchmark.native.js @@ -0,0 +1,60 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var bench = require( '@stdlib/bench' ); +var randu = require( '@stdlib/random/base/randu' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var lnf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( lnf instanceof Error ) +}; + + +// MAIN // + +bench( pkg+'::native', opts, function benchmark( b ) { + var x; + var y; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + x = ( randu() * 10000.0 ) - 0.0; + y = lnf( x ); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/benchmark/c/native/Makefile b/lib/node_modules/@stdlib/math/base/special/lnf/benchmark/c/native/Makefile new file mode 100644 index 000000000000..f69e9da2b4d3 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/benchmark/c/native/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2024 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# 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/lnf/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/lnf/benchmark/c/native/benchmark.c new file mode 100644 index 000000000000..d4d5023e7395 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/benchmark/c/native/benchmark.c @@ -0,0 +1,136 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** +* Benchmark `lnf`. +*/ +#include "stdlib/math/base/special/lnf.h" +#include +#include +#include +#include +#include + +#define NAME "lnf" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +void print_version() { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +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 +*/ +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 +*/ +double tic() { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Generates a random number on the interval [0,1]. +* +* @return random number +*/ +float rand_float() { + int r = rand(); + return (float)r / ( (float)RAND_MAX + 1.0f ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +double benchmark() { + double elapsed; + double t; + float x; + float y; + int i; + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + x = ( 10000.0f * rand_float() ) - 0.0f; + y = stdlib_base_lnf( x ); + 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/lnf/binding.gyp b/lib/node_modules/@stdlib/math/base/special/lnf/binding.gyp new file mode 100644 index 000000000000..ec3992233442 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/binding.gyp @@ -0,0 +1,170 @@ +# @license Apache-2.0 +# +# Copyright (c) 2024 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# 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/lnf/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/lnf/docs/repl.txt new file mode 100644 index 000000000000..8f3c024e7ebb --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/docs/repl.txt @@ -0,0 +1,32 @@ + +{{alias}}( x ) + Evaluates the natural logarithm of a single-precision floating-point number. + + For negative numbers, the natural logarithm is not defined. + + Parameters + ---------- + x: number + Input value. + + Returns + ------- + y: number + Function value. + + Examples + -------- + > var y = {{alias}}( 4.0 ) + ~1.386 + > y = {{alias}}( 0.0 ) + -Infinity + > y = {{alias}}( {{alias:@stdlib/constants/float32/pinf}} ) + Infinity + > y = {{alias}}( NaN ) + NaN + > y = {{alias}}( -4.0 ) + NaN + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/lnf/docs/types/index.d.ts new file mode 100644 index 000000000000..11651f15b8b1 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/docs/types/index.d.ts @@ -0,0 +1,52 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* Evaluates the natural logarithm of a single-precision floating-point number. +* +* @param x - input value +* @returns function value +* +* @example +* var v = lnf( 4.0 ); +* // returns ~1.386 +* +* @example +* var v = lnf( 0.0 ); +* // returns -Infinity +* +* @example +* var v = lnf( Infinity ); +* // returns Infinity +* +* @example +* var v = lnf( NaN ); +* // returns NaN +* +* @example +* var v = lnf( -4.0 ); +* // returns NaN +*/ +declare function lnf( x: number ): number; + + +// EXPORTS // + +export = lnf; diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/special/lnf/docs/types/test.ts new file mode 100644 index 000000000000..cdec86974f8f --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/docs/types/test.ts @@ -0,0 +1,44 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import lnf = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + lnf( 8 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided a value other than a number... +{ + lnf( true ); // $ExpectError + lnf( false ); // $ExpectError + lnf( null ); // $ExpectError + lnf( undefined ); // $ExpectError + lnf( '5' ); // $ExpectError + lnf( [] ); // $ExpectError + lnf( {} ); // $ExpectError + lnf( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + lnf(); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/examples/c/Makefile b/lib/node_modules/@stdlib/math/base/special/lnf/examples/c/Makefile new file mode 100644 index 000000000000..6aed70daf167 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2024 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# 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/lnf/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/lnf/examples/c/example.c new file mode 100644 index 000000000000..8510b3bf4b41 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/examples/c/example.c @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/math/base/special/lnf.h" +#include +#include + +int main( void ) { + float out; + float x; + int i; + + for ( i = 0; i < 100; i++ ) { + x = ( (float)rand() / (float)RAND_MAX ) * 100.0f; + out = stdlib_base_lnf( x ); + printf( "ln(%f) = %f\n", x, out ); + } +} diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/examples/index.js b/lib/node_modules/@stdlib/math/base/special/lnf/examples/index.js new file mode 100644 index 000000000000..e475247daee4 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/examples/index.js @@ -0,0 +1,31 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var randu = require( '@stdlib/random/base/randu' ); +var round = require( '@stdlib/math/base/special/round' ); +var lnf = require( './../lib' ); + +var x; +var i; + +for ( i = 0; i < 100; i++ ) { + x = round( randu() * 100.0 ); + console.log( 'lnf(%d) = %d', x, lnf( x ) ); +} diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/include.gypi b/lib/node_modules/@stdlib/math/base/special/lnf/include.gypi new file mode 100644 index 000000000000..575cb043c0bf --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/include.gypi @@ -0,0 +1,53 @@ +# @license Apache-2.0 +# +# Copyright (c) 2024 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# 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': [ + '= FLOAT32_EXPONENT_MASK ) { + return float64ToFloat32( x + x ); + } + k = float64ToFloat32( k + float64ToFloat32( ( ix >> 23 ) - FLOAT32_EXPONENT_BIAS ) ); // eslint-disable-line max-len + ix &= FLOAT32_SIGNIFICAND_MASK; + i = float64ToFloat32( ix + ( 0x95f64 << 3 ) ) & 0x800000; + + // Normalize x or x/2 + x = fromWordf( ix | ( i ^ 0x3f800000 ) ); + k = float64ToFloat32( k + ( i >> 23 ) ); + f = float64ToFloat32( x - 1.0 ); + + // -2**-9 <= f < 2**-9 + if ( ( FLOAT32_SIGNIFICAND_MASK & float64ToFloat32( 0x8000 + ix ) ) < 0xc000 ) { // eslint-disable-line max-len + if ( f === 0.0 ) { + if ( k === 0 ) { + return 0.0; + } + dk = k; + return float64ToFloat32( float64ToFloat32( dk * LN2_HI ) + float64ToFloat32( dk * LN2_LO ) ); // eslint-disable-line max-len + } + R = float64ToFloat32( float64ToFloat32( f * f ) * float64ToFloat32( 0.5 - float64ToFloat32( ONE_THIRD * f ) ) ); // eslint-disable-line max-len + if ( k === 0 ) { + return float64ToFloat32( f - R ); + } + dk = k; + return float64ToFloat32( float64ToFloat32( dk * LN2_HI ) - float64ToFloat32( float64ToFloat32( R - float64ToFloat32( dk * LN2_LO ) ) - f ) ); // eslint-disable-line max-len + } + s = float64ToFloat32( f / float64ToFloat32( 2.0 + f ) ); + dk = k; + z = float64ToFloat32( s * s ); + i = float64ToFloat32( ix - ( 0x6147a << 3 ) ); + w = float64ToFloat32( z * z ); + j = float64ToFloat32( ( 0x6b851 << 3 ) - ix ); + t1 = float64ToFloat32( w * float64ToFloat32( polyvalP( w ) ) ); + t2 = float64ToFloat32( z * float64ToFloat32( polyvalQ( w ) ) ); + i |= j; + R = float64ToFloat32( t2 + t1 ); + if ( i > 0 ) { + hfsq = float64ToFloat32( 0.5 * float64ToFloat32( f * f ) ); + if ( k === 0 ) { + return float64ToFloat32( f - float64ToFloat32( hfsq - float64ToFloat32( s * float64ToFloat32( hfsq + R ) ) ) ); // eslint-disable-line max-len + } + return float64ToFloat32( float64ToFloat32( dk * LN2_HI ) - float64ToFloat32( float64ToFloat32( hfsq - float64ToFloat32( ( s * float64ToFloat32( hfsq + R ) ) + float64ToFloat32( dk * LN2_LO ) ) ) - f ) ); // eslint-disable-line max-len + } + if ( k === 0 ) { + return float64ToFloat32( f - float64ToFloat32( s * float64ToFloat32( f - R ) ) ); // eslint-disable-line max-len + } + return float64ToFloat32( float64ToFloat32( dk * LN2_HI ) - float64ToFloat32( float64ToFloat32( float64ToFloat32( s * float64ToFloat32( f - R ) ) - float64ToFloat32( dk * LN2_LO ) ) - f ) ); // eslint-disable-line max-len +} + + +// EXPORTS // + +module.exports = lnf; diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/lib/native.js b/lib/node_modules/@stdlib/math/base/special/lnf/lib/native.js new file mode 100644 index 000000000000..e19714ae28a4 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/lib/native.js @@ -0,0 +1,62 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var addon = require( './../src/addon.node' ); + + +// MAIN // + +/** +* Evaluates the natural logarithm of a single-precision floating-point number. +* +* @private +* @param {NonNegativeNumber} x - input value +* @returns {number} function value +* +* @example +* var v = lnf( 4.0 ); +* // returns ~1.386 +* +* @example +* var v = lnf( 0.0 ); +* // returns -Infinity +* +* @example +* var v = lnf( Infinity ); +* // returns Infinity +* +* @example +* var v = lnf( NaN ); +* // returns NaN +* +* @example +* var v = lnf( -4.0 ); +* // returns NaN +*/ +function lnf( x ) { + return addon( x ); +} + + +// EXPORTS // + +module.exports = lnf; diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/lib/polyval_p.js b/lib/node_modules/@stdlib/math/base/special/lnf/lib/polyval_p.js new file mode 100644 index 000000000000..d26d323a299e --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/lib/polyval_p.js @@ -0,0 +1,47 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* This is a generated file. Do not edit directly. */ +'use strict'; + +// 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.40000972152; + } + return 0.40000972152 + (x * 0.24279078841); +} + + +// EXPORTS // + +module.exports = evalpoly; diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/lib/polyval_q.js b/lib/node_modules/@stdlib/math/base/special/lnf/lib/polyval_q.js new file mode 100644 index 000000000000..9e8a4085beb4 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/lib/polyval_q.js @@ -0,0 +1,47 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* This is a generated file. Do not edit directly. */ +'use strict'; + +// 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.66666662693; + } + return 0.66666662693 + (x * 0.28498786688); +} + + +// EXPORTS // + +module.exports = evalpoly; diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/manifest.json b/lib/node_modules/@stdlib/math/base/special/lnf/manifest.json new file mode 100644 index 000000000000..c4694b703894 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/manifest.json @@ -0,0 +1,94 @@ +{ + "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/number/float32/base/to-word", + "@stdlib/number/float32/base/from-word", + "@stdlib/math/base/assert/is-nan", + "@stdlib/constants/float32/ninf", + "@stdlib/constants/float32/exponent-bias", + "@stdlib/constants/float32/exponent-mask", + "@stdlib/constants/float32/abs-mask", + "@stdlib/constants/float32/significand-mask" + ] + }, + { + "task": "benchmark", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/number/float32/base/to-word", + "@stdlib/number/float32/base/from-word", + "@stdlib/math/base/assert/is-nan", + "@stdlib/constants/float32/ninf", + "@stdlib/constants/float32/exponent-bias", + "@stdlib/constants/float32/exponent-mask", + "@stdlib/constants/float32/abs-mask", + "@stdlib/constants/float32/significand-mask" + ] + }, + { + "task": "examples", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/number/float32/base/to-word", + "@stdlib/number/float32/base/from-word", + "@stdlib/math/base/assert/is-nan", + "@stdlib/constants/float32/ninf", + "@stdlib/constants/float32/exponent-bias", + "@stdlib/constants/float32/exponent-mask", + "@stdlib/constants/float32/abs-mask", + "@stdlib/constants/float32/significand-mask" + ] + } + ] +} + diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/package.json b/lib/node_modules/@stdlib/math/base/special/lnf/package.json new file mode 100644 index 000000000000..d6bfeb66a26f --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/package.json @@ -0,0 +1,66 @@ +{ + "name": "@stdlib/math/base/special/lnf", + "version": "0.0.0", + "description": "Evaluate the natural logarithm of 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", + "math.log", + "lnf", + "natural", + "logarithm", + "log" + ] +} diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/scripts/evalpoly.js b/lib/node_modules/@stdlib/math/base/special/lnf/scripts/evalpoly.js new file mode 100644 index 000000000000..20beb4c5897a --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/scripts/evalpoly.js @@ -0,0 +1,130 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* +* 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 substringBefore = require( '@stdlib/string/substring-before' ); +var substringAfter = require( '@stdlib/string/substring-after' ); +var format = require( '@stdlib/string/format' ); +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' ); + + +// VARIABLES // + +// Polynomial coefficients ordered in ascending degree... +var P = [ + 0.40000972152, + 0.24279078841 +]; +var Q = [ + 0.66666662693, + 0.28498786688 +]; + +// 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' + }; + + fpath = resolve( __dirname, '..', 'lib', 'polyval_p.js' ); + str = header + compile( P ); + writeFileSync( fpath, str, opts ); + + fpath = resolve( __dirname, '..', 'lib', 'polyval_q.js' ); + str = header + compile( Q ); + writeFileSync( fpath, str, opts ); + + copts = { + 'dtype': 'float', + 'name': '' + }; + + fpath = resolve( __dirname, '..', 'src', 'main.c' ); + file = readFileSync( fpath, opts ); + + copts.name = 'polyval_p'; + str = compileC( P, copts ); + file = insert( file, copts.name, str ); + + copts.name = 'polyval_q'; + str = compileC( Q, copts ); + file = insert( file, copts.name, str ); + + writeFileSync( fpath, file, opts ); +} + +main(); diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/src/Makefile b/lib/node_modules/@stdlib/math/base/special/lnf/src/Makefile new file mode 100644 index 000000000000..bcf18aa46655 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/src/Makefile @@ -0,0 +1,70 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2024 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# 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/lnf/src/addon.c b/lib/node_modules/@stdlib/math/base/special/lnf/src/addon.c new file mode 100644 index 000000000000..4b9a4df67f36 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/src/addon.c @@ -0,0 +1,23 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/math/base/special/lnf.h" +#include "stdlib/math/base/napi/unary.h" + +// cppcheck-suppress shadowFunction +STDLIB_MATH_BASE_NAPI_MODULE_F_F( stdlib_base_lnf ) diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/src/main.c b/lib/node_modules/@stdlib/math/base/special/lnf/src/main.c new file mode 100644 index 000000000000..eaccd6172649 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/src/main.c @@ -0,0 +1,197 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* ## Notice +* +* The following copyright and license were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/9.3.0/lib/msun/src/e_log.c}. The implementation follows the original, but has been modified according to project 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/lnf.h" +#include "stdlib/number/float32/base/to_word.h" +#include "stdlib/number/float32/base/from_word.h" +#include "stdlib/math/base/assert/is_nan.h" +#include "stdlib/constants/float32/ninf.h" +#include "stdlib/constants/float32/exponent_bias.h" +#include "stdlib/constants/float32/exponent_mask.h" +#include "stdlib/constants/float32/abs_mask.h" +#include "stdlib/constants/float32/significand_mask.h" +#include + +static const float LN2_HI = 6.9313812256e-01f; // 0x3f317180 +static const float LN2_LO = 9.0580006145e-06f; // 0x3717f7d1 +static const float TWO25 = 3.355443200e+07f; // 0x4c000000 +static const float ONE_THIRD = 0.33333333333333333f; + +/* Begin auto-generated functions. The following functions are auto-generated. Do not edit directly. */ + +// BEGIN: polyval_p + +/** +* 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_p( const float x ) { + return 0.40000972152f + (x * 0.24279078841f); +} + +// END: polyval_p + +// BEGIN: polyval_q + +/** +* 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_q( const float x ) { + return 0.66666662693f + (x * 0.28498786688f); +} + +// END: polyval_q + +/* End auto-generated functions. */ + +/** +* Evaluates the natural-logarithm of a single-precision floating-point number. +* +* @param x input value +* @return natural logarithm +* +* @example +* float out = stdlib_base_lnf( 2.0f ); +* // returns ~0.693f +*/ +float stdlib_base_lnf( const float x ) { + uint32_t uix; + int32_t ix; + float hfsq; + int32_t k; + int32_t i; + int32_t j; + float dk; + float t1; + float t2; + float xc; + float f; + float R; + float s; + float z; + float w; + + if ( x == 0.0f ) { + return STDLIB_CONSTANT_FLOAT32_NINF; + } + if ( stdlib_base_is_nan( x ) || x < 0.0f ) { + return 0.0f / 0.0f; // NaN + } + stdlib_base_float32_to_word( x, &uix ); + ix = (int32_t)uix; + xc = x; + k = 0; + // x < 2**-126 + if ( ix < 0x00800000 ) { + if ( ( ix & STDLIB_CONSTANT_FLOAT32_ABS_MASK ) == 0 ) { + // log(+-0)=-inf + return -TWO25 / 0.0f; + } + if ( ix < 0 ) { + // log(-#) = NaN + return 0.0f / 0.0f; // NaN + } + k -= 25; + // subnormal number, scale up x + xc *= TWO25; + stdlib_base_float32_to_word( xc, &uix ); + ix = (int32_t)uix; + } + if ( ix >= STDLIB_CONSTANT_FLOAT32_EXPONENT_MASK ) { + return ( xc + xc ); + } + k += ( ( ix >> 23 ) - STDLIB_CONSTANT_FLOAT32_EXPONENT_BIAS ); + ix &= STDLIB_CONSTANT_FLOAT_SIGNIFICAND_MASK; + i = ( ix + ( 0x95f64 << 3 ) ) & 0x800000; + // normalize x or x/2 + stdlib_base_float32_from_word( (uint32_t)( ix | ( i ^ 0x3f800000 ) ), &xc ); + k += ( i >> 23 ); + f = ( xc - 1.0f ); + // -2**-9 <= f < 2**-9 + if ( ( STDLIB_CONSTANT_FLOAT_SIGNIFICAND_MASK & ( 0x8000 + ix ) ) < 0xc000 ) { + if ( f == 0.0f ) { + if ( k == 0 ) { + return 0.0f; + } else { + dk = k; + return ( ( dk * LN2_HI ) + ( dk * LN2_LO ) ); + } + } + R = ( ( f * f ) * ( 0.5f - ( ONE_THIRD * f ) ) ); + if( k == 0 ) { + return ( f - R ); + } else { + dk = k; + return ( ( dk * LN2_HI ) - ( ( R - ( dk * LN2_LO ) ) - f ) ); + } + } + s = ( f / ( 2.0f + f ) ); + dk = k; + z = ( s * s ); + i = ( ix - ( 0x6147a << 3 ) ); + w = ( z * z ); + j = ( ( 0x6b851 << 3 ) - ix ); + t1 = ( w * ( polyval_p( w ) ) ); + t2 = ( z * ( polyval_q( w ) ) ); + i |= j; + R = ( t2 + t1 ); + if ( i > 0 ) { + hfsq = ( 0.5f * ( f * f ) ); + if ( k == 0 ) { + return ( f - ( hfsq - ( s * ( hfsq + R ) ) ) ); + } else { + return ( ( dk * LN2_HI ) - ( ( hfsq - ( s * ( hfsq + R ) + ( dk * LN2_LO ) ) ) - f ) ); + } + } else { + if ( k == 0 ) { + return ( f - ( s * ( f - R ) ) ); + } else { + return ( ( dk * LN2_HI ) - ( ( ( s * ( f - R ) ) - ( dk * LN2_LO ) ) - f ) ); + } + } +} diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/REQUIRE b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/REQUIRE new file mode 100644 index 000000000000..308c3be89c85 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/REQUIRE @@ -0,0 +1,2 @@ +julia 1.5 +JSON 0.21 diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/large_positive.json b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/large_positive.json new file mode 100644 index 000000000000..b44118d4e7b9 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/large_positive.json @@ -0,0 +1 @@ +{"expected":[2.9957323,2.9987338,3.0017264,3.00471,3.0076847,3.0106504,3.0136077,3.016556,3.0194957,3.0224268,3.0253494,3.0282636,3.031169,3.0340662,3.0369549,3.0398355,3.0427077,3.0455716,3.0484273,3.051275,3.0541146,3.056946,3.0597696,3.0625854,3.065393,3.0681927,3.0709848,3.0737689,3.0765455,3.0793142,3.0820754,3.084829,3.087575,3.0903134,3.0930445,3.095768,3.0984843,3.101193,3.1038945,3.1065886,3.1092756,3.1119554,3.114628,3.1172936,3.119952,3.1226032,3.1252475,3.1278849,3.1305153,3.133139,3.1357555,3.1383655,3.1409686,3.1435647,3.1461542,3.1487372,3.1513133,3.153883,3.156446,3.1590025,3.1615524,3.1640959,3.166633,3.1691635,3.1716876,3.1742053,3.176717,3.179222,3.1817212,3.1842139,3.1867003,3.1891809,3.191655,3.194123,3.1965852,3.1990411,3.201491,3.2039351,3.2063732,3.2088053,3.2112315,3.213652,3.2160664,3.2184749,3.220878,3.223275,3.2256663,3.2280521,3.230432,3.2328064,3.2351751,3.2375383,3.2398958,3.2422478,3.2445943,3.2469354,3.249271,3.251601,3.2539258,3.256245,3.258559,3.2608674,3.2631707,3.2654686,3.2677615,3.2700489,3.272331,3.2746081,3.27688,3.2791467,3.2814083,3.2836647,3.2859163,3.2881625,3.2904038,3.2926402,3.2948716,3.297098,3.2993193,3.3015358,3.3037474,3.305954,3.3081558,3.3103528,3.312545,3.3147323,3.316915,3.319093,3.321266,3.3234344,3.3255982,3.3277571,3.3299115,3.3320613,3.3342066,3.336347,3.338483,3.3406146,3.3427415,3.344864,3.3469818,3.349095,3.3512042,3.3533087,3.3554087,3.3575044,3.3595958,3.3616827,3.3637652,3.3658435,3.3679175,3.3699872,3.3720527,3.3741138,3.3761706,3.3782234,3.380272,3.382316,3.3843563,3.3863924,3.3884242,3.390452,3.3924754,3.394495,3.3965104,3.398522,3.4005291,3.4025326,3.4045317,3.4065273,3.4085186,3.410506,3.4124894,3.414469,3.4164445,3.4184163,3.4203842,3.4223483,3.4243083,3.4262648,3.4282172,3.4301658,3.4321108,3.4340518,3.4359891,3.4379227,3.4398527,3.441779,3.4437013,3.44562,3.4475353,3.4494467,3.4513545,3.4532585,3.4551592,3.457056,3.4589493,3.4608393,3.4627254,3.464608,3.4664872,3.4683628,3.4702349,3.4721034,3.4739685,3.47583,3.4776883,3.479543,3.4813943,3.483242,3.4850864,3.4869275,3.4887652,3.4905996,3.4924304,3.4942582,3.4960823,3.4979033,3.499721,3.5015352,3.5033464,3.5051541,3.5069587,3.50876,3.510558,3.5123527,3.5141442,3.5159326,3.5177178,3.5194998,3.5212786,3.5230544,3.5248268,3.5265963,3.5283625,3.5301256,3.5318856,3.5336428,3.5353966,3.5371473,3.5388951,3.5406399,3.5423815,3.54412,3.5458558,3.5475883,3.5493178,3.5510445,3.5527682,3.554489,3.5562065,3.5579214,3.5596333,3.561342,3.5630481,3.5647511,3.5664513,3.5681486,3.569843,3.5715346,3.5732234,3.5749092,3.5765922,3.5782726,3.5799499,3.5816245,3.5832963,3.5849652,3.5866315,3.588295,3.5899556,3.5916135,3.5932686,3.594921,3.5965707,3.5982177,3.599862,3.6015036,3.6031425,3.6047788,3.6064124,3.6080432,3.6096714,3.611297,3.6129198,3.6145403,3.616158,3.617773,3.6193855,3.6209953,3.6226027,3.6242073,3.6258094,3.627409,3.6290061,3.6306005,3.6321924,3.633782,3.6353688,3.636953,3.638535,3.6401143,3.6416912,3.6432655,3.6448376,3.646407,3.647974,3.6495385,3.6511006,3.6526601,3.6542175,3.6557722,3.6573248,3.6588748,3.6604223,3.6619675,3.6635103,3.6650507,3.6665888,3.6681244,3.6696577,3.6711888,3.6727176,3.674244,3.675768,3.6772895,3.678809,3.680326,3.6818407,3.6833532,3.6848633,3.6863713,3.687877,3.6893804,3.6908815,3.6923804,3.693877,3.6953714,3.6968634,3.6983535,3.6998413,3.7013266,3.70281,3.704291,3.70577,3.7072468,3.7087214,3.7101939,3.711664,3.7131321,3.714598,3.7160618,3.7175233,3.718983,3.7204401,3.7218955,3.7233486,3.7247996,3.7262485,3.7276955,3.7291403,3.7305827,3.7320235,3.7334619,3.7348983,3.7363327,3.737765,3.7391953,3.7406235,3.7420497,3.743474,3.744896,3.7463162,3.7477343,3.7491503,3.7505646,3.7519765,3.7533867,3.7547948,3.756201,3.757605,3.7590072,3.7604074,3.7618058,3.7632022,3.7645965,3.7659888,3.7673795,3.768768,3.7701547,3.7715394,3.7729223,3.774303,3.775682,3.777059,3.7784343,3.7798076,3.7811792,3.7825487,3.7839162,3.7852821,3.7866461,3.7880082,3.7893684,3.790727,3.7920833,3.793438,3.794791,3.7961419,3.797491,3.7988386,3.8001842,3.801528,3.80287,3.8042102,3.8055484,3.8068852,3.80822,3.809553,3.8108842,3.8122137,3.8135414,3.8148675,3.8161917,3.8175142,3.8188348,3.8201537,3.821471,3.8227866,3.8241003,3.8254123,3.8267226,3.8280313,3.8293383,3.8306434,3.8319468,3.8332486,3.8345487,3.8358471,3.837144,3.838439,3.8397324,3.8410242,3.8423142,3.8436027,3.8448892,3.8461742,3.8474576,3.8487396,3.8500197,3.851298,3.852575,3.8538504,3.855124,3.856396,3.8576663,3.858935,3.8602023,3.8614678,3.8627317,3.8639941,3.8652549,3.866514,3.8677716,3.8690276,3.8702822,3.871535,3.8727863,3.874036,3.8752842,3.876531,3.877776,3.8790195,3.8802614,3.881502,3.8827407,3.8839781,3.8852139,3.8864481,3.887681,3.8889122,3.890142,3.8913703,3.892597,3.8938222,3.895046,3.8962684,3.897489,3.8987083,3.8999262,3.9011424,3.902357,3.9035707,3.9047825,3.9059927,3.9072018,3.9084094,3.9096153,3.9108198,3.912023],"x":[20.0,20.060120240480963,20.120240480961925,20.180360721442884,20.240480961923847,20.30060120240481,20.360721442885772,20.420841683366735,20.480961923847694,20.541082164328657,20.60120240480962,20.661322645290582,20.721442885771545,20.781563126252504,20.841683366733466,20.90180360721443,20.96192384769539,21.022044088176354,21.082164328657313,21.142284569138276,21.20240480961924,21.2625250501002,21.322645290581164,21.382765531062123,21.442885771543086,21.50300601202405,21.56312625250501,21.62324649298597,21.683366733466933,21.743486973947896,21.803607214428858,21.86372745490982,21.92384769539078,21.983967935871743,22.044088176352705,22.104208416833668,22.16432865731463,22.22444889779559,22.284569138276552,22.344689378757515,22.404809619238478,22.46492985971944,22.5250501002004,22.585170340681362,22.645290581162325,22.705410821643287,22.76553106212425,22.82565130260521,22.88577154308617,22.945891783567134,23.006012024048097,23.06613226452906,23.12625250501002,23.18637274549098,23.246492985971944,23.306613226452907,23.36673346693387,23.42685370741483,23.48697394789579,23.547094188376754,23.607214428857716,23.66733466933868,23.727454909819638,23.7875751503006,23.847695390781563,23.907815631262526,23.96793587174349,24.028056112224448,24.08817635270541,24.148296593186373,24.208416833667336,24.268537074148295,24.328657314629258,24.38877755511022,24.448897795591183,24.509018036072145,24.569138276553105,24.629258517034067,24.68937875751503,24.749498997995993,24.809619238476955,24.869739478957914,24.929859719438877,24.98997995991984,25.050100200400802,25.110220440881765,25.170340681362724,25.230460921843687,25.29058116232465,25.350701402805612,25.410821643286575,25.470941883767534,25.531062124248496,25.59118236472946,25.65130260521042,25.711422845691384,25.771543086172343,25.831663326653306,25.89178356713427,25.95190380761523,26.012024048096194,26.072144288577153,26.132264529058116,26.19238476953908,26.25250501002004,26.312625250501004,26.372745490981963,26.432865731462925,26.492985971943888,26.55310621242485,26.613226452905813,26.673346693386772,26.733466933867735,26.793587174348698,26.85370741482966,26.91382765531062,26.973947895791582,27.034068136272545,27.094188376753507,27.15430861723447,27.21442885771543,27.274549098196392,27.334669338677354,27.394789579158317,27.45490981963928,27.51503006012024,27.5751503006012,27.635270541082164,27.695390781563127,27.75551102204409,27.81563126252505,27.87575150300601,27.935871743486974,27.995991983967937,28.0561122244489,28.11623246492986,28.17635270541082,28.236472945891784,28.296593186372746,28.35671342685371,28.416833667334668,28.47695390781563,28.537074148296593,28.597194388777556,28.65731462925852,28.717434869739478,28.77755511022044,28.837675350701403,28.897795591182366,28.95791583166333,29.018036072144287,29.07815631262525,29.138276553106213,29.198396793587175,29.258517034068138,29.318637274549097,29.37875751503006,29.438877755511022,29.498997995991985,29.559118236472944,29.619238476953907,29.67935871743487,29.739478957915832,29.799599198396795,29.859719438877754,29.919839679358716,29.97995991983968,30.04008016032064,30.100200400801604,30.160320641282564,30.220440881763526,30.28056112224449,30.34068136272545,30.400801603206414,30.460921843687373,30.521042084168336,30.5811623246493,30.64128256513026,30.701402805611224,30.761523046092183,30.821643286573146,30.881763527054108,30.94188376753507,31.002004008016034,31.062124248496993,31.122244488977955,31.182364729458918,31.24248496993988,31.302605210420843,31.362725450901802,31.422845691382765,31.482965931863728,31.54308617234469,31.603206412825653,31.663326653306612,31.723446893787575,31.783567134268537,31.8436873747495,31.903807615230463,31.96392785571142,32.02404809619239,32.08416833667334,32.144288577154306,32.20440881763527,32.26452905811623,32.324649298597194,32.38476953907816,32.44488977955912,32.50501002004008,32.565130260521045,32.62525050100201,32.68537074148296,32.745490981963925,32.80561122244489,32.86573146292585,32.92585170340681,32.985971943887776,33.04609218436874,33.1062124248497,33.166332665330664,33.22645290581163,33.28657314629258,33.346693386773545,33.40681362725451,33.46693386773547,33.52705410821643,33.587174348697395,33.64729458917836,33.70741482965932,33.76753507014028,33.82765531062124,33.8877755511022,33.947895791583164,34.00801603206413,34.06813627254509,34.12825651302605,34.188376753507015,34.24849699398798,34.30861723446894,34.3687374749499,34.42885771543086,34.48897795591182,34.549098196392784,34.609218436873746,34.66933867735471,34.72945891783567,34.789579158316634,34.8496993987976,34.90981963927856,34.96993987975952,35.03006012024048,35.09018036072144,35.1503006012024,35.210420841683366,35.27054108216433,35.33066132264529,35.390781563126254,35.450901803607216,35.51102204408818,35.57114228456914,35.6312625250501,35.69138276553106,35.75150300601202,35.811623246492985,35.87174348697395,35.93186372745491,35.99198396793587,36.052104208416836,36.1122244488978,36.17234468937876,36.23246492985972,36.29258517034068,36.35270541082164,36.412825651302605,36.47294589178357,36.53306613226453,36.59318637274549,36.653306613226455,36.71342685370742,36.77354709418837,36.833667334669336,36.8937875751503,36.95390781563126,37.014028056112224,37.07414829659319,37.13426853707415,37.19438877755511,37.254509018036075,37.31462925851704,37.37474949899799,37.434869739478955,37.49498997995992,37.55511022044088,37.61523046092184,37.675350701402806,37.73547094188377,37.79559118236473,37.855711422845694,37.91583166332666,37.97595190380761,38.036072144288575,38.09619238476954,38.1563126252505,38.21643286573146,38.276553106212425,38.33667334669339,38.39679358717435,38.45691382765531,38.517034068136276,38.57715430861723,38.637274549098194,38.69739478957916,38.75751503006012,38.81763527054108,38.877755511022045,38.93787575150301,38.99799599198397,39.05811623246493,39.11823647294589,39.17835671342685,39.23847695390781,39.298597194388776,39.35871743486974,39.4188376753507,39.478957915831664,39.53907815631263,39.59919839679359,39.65931863727455,39.71943887775551,39.77955911823647,39.83967935871743,39.899799599198396,39.95991983967936,40.02004008016032,40.08016032064128,40.140280561122246,40.20040080160321,40.26052104208417,40.32064128256513,40.38076152304609,40.44088176352705,40.501002004008015,40.56112224448898,40.62124248496994,40.6813627254509,40.741482965931866,40.80160320641283,40.86172344689379,40.921843687374746,40.98196392785571,41.04208416833667,41.102204408817634,41.1623246492986,41.22244488977956,41.28256513026052,41.342685370741485,41.40280561122245,41.46292585170341,41.523046092184366,41.58316633266533,41.64328657314629,41.703406813627254,41.763527054108216,41.82364729458918,41.88376753507014,41.943887775551104,42.00400801603207,42.06412825651302,42.124248496993985,42.18436873747495,42.24448897795591,42.30460921843687,42.364729458917836,42.4248496993988,42.48496993987976,42.545090180360724,42.605210420841686,42.66533066132264,42.725450901803605,42.78557114228457,42.84569138276553,42.90581162324649,42.965931863727455,43.02605210420842,43.08617234468938,43.14629258517034,43.206412825651306,43.26653306613226,43.326653306613224,43.38677354709419,43.44689378757515,43.50701402805611,43.567134268537075,43.62725450901804,43.687374749499,43.74749498997996,43.807615230460925,43.86773547094188,43.92785571142284,43.987975951903806,44.04809619238477,44.10821643286573,44.168336673346694,44.22845691382766,44.28857715430862,44.34869739478958,44.408817635270545,44.4689378757515,44.52905811623246,44.589178356713425,44.64929859719439,44.70941883767535,44.76953907815631,44.829659318637276,44.88977955911824,44.9498997995992,45.01002004008016,45.07014028056112,45.13026052104208,45.190380761523045,45.25050100200401,45.31062124248497,45.37074148296593,45.430861723446895,45.49098196392786,45.55110220440882,45.611222444889776,45.67134268537074,45.7314629258517,45.791583166332664,45.85170340681363,45.91182364729459,45.97194388777555,46.032064128256515,46.09218436873748,46.15230460921844,46.212424849699396,46.27254509018036,46.33266533066132,46.392785571142284,46.452905811623246,46.51302605210421,46.57314629258517,46.633266533066134,46.6933867735471,46.75350701402806,46.813627254509015,46.87374749498998,46.93386773547094,46.9939879759519,47.054108216432866,47.11422845691383,47.17434869739479,47.234468937875754,47.294589178356716,47.35470941883767,47.414829659318634,47.4749498997996,47.53507014028056,47.59519038076152,47.655310621242485,47.71543086172345,47.77555110220441,47.83567134268537,47.895791583166336,47.95591182364729,48.016032064128254,48.07615230460922,48.13627254509018,48.19639278557114,48.256513026052104,48.31663326653307,48.37675350701403,48.43687374749499,48.496993987975955,48.55711422845691,48.61723446893787,48.677354709418836,48.7374749498998,48.79759519038076,48.857715430861724,48.91783567134269,48.97795591182365,49.03807615230461,49.098196392785574,49.15831663326653,49.21843687374749,49.278557114228455,49.33867735470942,49.39879759519038,49.45891783567134,49.519038076152306,49.57915831663327,49.63927855711423,49.699398797595194,49.75951903807615,49.81963927855711,49.879759519038075,49.93987975951904,50.0]} diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/medium_positive.json b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/medium_positive.json new file mode 100644 index 000000000000..de73f2d7a64a --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/medium_positive.json @@ -0,0 +1 @@ +{"expected":[1.0986123,1.1099043,1.1210703,1.132113,1.143035,1.1538391,1.1645277,1.1751032,1.185568,1.1959245,1.2061747,1.2163211,1.2263654,1.23631,1.2461566,1.2559072,1.2655636,1.2751276,1.2846011,1.2939857,1.303283,1.3124946,1.3216223,1.3306673,1.3396312,1.3485155,1.3573215,1.3660507,1.3747044,1.3832839,1.3917903,1.4002249,1.4085891,1.4168838,1.4251103,1.4332697,1.4413631,1.4493915,1.4573559,1.4652574,1.473097,1.4808755,1.488594,1.4962535,1.5038548,1.5113986,1.518886,1.5263177,1.5336946,1.5410174,1.5482872,1.5555043,1.5626698,1.5697843,1.5768485,1.5838631,1.590829,1.5977466,1.6046166,1.61144,1.6182169,1.6249483,1.6316346,1.6382766,1.6448747,1.6514295,1.6579417,1.6644118,1.6708403,1.6772276,1.6835746,1.6898813,1.6961486,1.702377,1.7085667,1.7147182,1.7208323,1.7269092,1.7329494,1.7389532,1.7449213,1.750854,1.7567517,1.7626147,1.7684437,1.7742388,1.7800006,1.7857293,1.7914255,1.7970892,1.8027213,1.8083216,1.8138908,1.8194292,1.8249371,1.8304148,1.8358626,1.8412809,1.8466702,1.8520304,1.857362,1.8626654,1.8679409,1.8731886,1.8784089,1.8836021,1.8887686,1.8939084,1.899022,1.9041095,1.9091713,1.9142076,1.9192187,1.9242048,1.9291661,1.934103,1.9390155,1.9439042,1.948769,1.9536102,1.9584281,1.9632229,1.9679948,1.9727441,1.977471,1.9821756,1.9868581,1.9915189,1.996158,2.0007756,2.005372,2.0099475,2.014502,2.019036,2.0235496,2.0280428,2.0325158,2.036969,2.0414026,2.0458164,2.050211,2.0545862,2.0589423,2.0632796,2.067598,2.0718982,2.0761797,2.0804431,2.0846882,2.0889156,2.093125,2.097317,2.1014912,2.1056483,2.109788,2.1139107,2.1180165,2.1221056,2.1261778,2.1302338,2.134273,2.1382964,2.1423035,2.1462946,2.1502697,2.1542292,2.158173,2.1621015,2.1660144,2.169912,2.1737947,2.1776624,2.1815152,2.185353,2.1891763,2.1929848,2.1967793,2.2005591,2.2043247,2.2080762,2.2118137,2.2155373,2.219247,2.222943,2.2266254,2.2302945,2.23395,2.2375922,2.2412212,2.244837,2.24844,2.25203,2.255607,2.2591712,2.262723,2.266262,2.2697885,2.2733028,2.2768047,2.2802944,2.283772,2.2872374,2.290691,2.2941327,2.2975626,2.3009806,2.304387,2.307782,2.3111653,2.3145375,2.317898,2.3212476,2.3245857,2.3279128,2.331229,2.3345342,2.3378284,2.341112,2.3443847,2.3476465,2.350898,2.3541389,2.3573692,2.3605893,2.3637989,2.3669984,2.3701875,2.3733666,2.3765357,2.3796945,2.3828435,2.3859828,2.389112,2.3922317,2.3953414,2.3984416,2.4015324,2.4046135,2.407685,2.4107473,2.4138002,2.416844,2.4198782,2.4229033,2.4259193,2.4289265,2.4319243,2.4349134,2.4378934,2.4408648,2.4438272,2.446781,2.4497259,2.4526622,2.45559,2.4585092,2.4614198,2.464322,2.467216,2.4701016,2.4729788,2.4758477,2.4787085,2.481561,2.4844055,2.487242,2.4900703,2.4928908,2.4957032,2.4985077,2.5013046,2.5040934,2.5068746,2.509648,2.512414,2.515172,2.5179226,2.5206656,2.5234013,2.5261295,2.52885,2.5315633,2.5342693,2.5369678,2.5396593,2.5423434,2.5450203,2.5476902,2.5503528,2.5530086,2.5556571,2.5582986,2.5609334,2.563561,2.566182,2.568796,2.571403,2.5740035,2.576597,2.5791838,2.5817642,2.5843377,2.5869048,2.5894651,2.592019,2.5945666,2.5971074,2.599642,2.60217,2.6046917,2.607207,2.6097162,2.6122189,2.6147153,2.6172056,2.6196897,2.6221678,2.6246395,2.6271052,2.629565,2.6320186,2.6344662,2.6369078,2.6393435,2.6417735,2.6441972,2.6466153,2.6490276,2.651434,2.6538346,2.6562295,2.6586185,2.661002,2.66338,2.665752,2.6681185,2.6704795,2.6728349,2.6751847,2.677529,2.679868,2.6822014,2.6845293,2.6868517,2.689169,2.6914809,2.6937873,2.6960886,2.6983843,2.700675,2.7029605,2.7052407,2.7075157,2.7097855,2.7120502,2.7143097,2.7165642,2.7188137,2.7210581,2.7232974,2.7255318,2.727761,2.7299855,2.732205,2.7344196,2.7366292,2.738834,2.741034,2.7432292,2.7454193,2.7476048,2.7497857,2.7519617,2.754133,2.7562995,2.7584612,2.7606184,2.7627711,2.764919,2.7670624,2.7692013,2.7713354,2.7734652,2.7755902,2.777711,2.7798269,2.7819386,2.784046,2.7861488,2.788247,2.7903411,2.7924306,2.7945158,2.7965968,2.7986734,2.8007457,2.8028138,2.8048775,2.806937,2.8089921,2.8110433,2.81309,2.8151326,2.817171,2.8192055,2.8212357,2.8232617,2.8252838,2.8273017,2.8293157,2.8313255,2.833331,2.8353329,2.8373308,2.8393245,2.8413143,2.8433,2.845282,2.8472602,2.8492343,2.8512044,2.8531709,2.8551333,2.857092,2.8590467,2.8609977,2.8629448,2.8648884,2.866828,2.868764,2.870696,2.8726244,2.8745492,2.87647,2.8783875,2.8803012,2.8822112,2.8841176,2.8860202,2.8879194,2.8898149,2.891707,2.8935952,2.8954802,2.8973613,2.899239,2.9011133,2.902984,2.9048512,2.906715,2.908575,2.9104319,2.9122853,2.9141352,2.9159818,2.917825,2.9196646,2.921501,2.923334,2.9251635,2.9269898,2.9288127,2.9306326,2.9324489,2.9342618,2.9360716,2.9378781,2.9396813,2.9414814,2.943278,2.9450717,2.946862,2.9486492,2.950433,2.9522138,2.9539914,2.9557657,2.9575372,2.9593053,2.9610703,2.9628322,2.964591,2.9663467,2.9680994,2.969849,2.9715955,2.973339,2.9750795,2.9768171,2.9785514,2.9802828,2.9820113,2.9837368,2.9854593,2.9871788,2.9888954,2.990609,2.9923196,2.9940274,2.9957323],"x":[3.0,3.0340681362725452,3.06813627254509,3.1022044088176353,3.1362725450901805,3.1703406813627253,3.2044088176352705,3.2384769539078158,3.2725450901803605,3.306613226452906,3.340681362725451,3.374749498997996,3.408817635270541,3.4428857715430863,3.476953907815631,3.5110220440881763,3.5450901803607215,3.5791583166332663,3.6132264529058116,3.647294589178357,3.6813627254509016,3.715430861723447,3.749498997995992,3.783567134268537,3.817635270541082,3.8517034068136273,3.8857715430861726,3.9198396793587174,3.9539078156312626,3.987975951903808,4.022044088176353,4.056112224448897,4.090180360721443,4.124248496993988,4.158316633266533,4.192384769539078,4.226452905811623,4.260521042084168,4.294589178356714,4.328657314629258,4.362725450901803,4.396793587174349,4.430861723446894,4.4649298597194385,4.498997995991984,4.533066132264529,4.567134268537074,4.601202404809619,4.635270541082164,4.669338677354709,4.703406813627255,4.7374749498997994,4.771543086172345,4.80561122244489,4.839679358717435,4.87374749498998,4.907815631262525,4.94188376753507,4.975951903807616,5.01002004008016,5.044088176352705,5.078156312625251,5.112224448897796,5.1462925851703405,5.180360721442886,5.214428857715431,5.248496993987976,5.282565130260521,5.316633266533066,5.350701402805611,5.384769539078157,5.4188376753507015,5.452905811623246,5.486973947895792,5.521042084168337,5.5551102204408815,5.589178356713427,5.623246492985972,5.657314629258517,5.6913827655310625,5.725450901803607,5.759519038076152,5.793587174348698,5.8276553106212425,5.861723446893787,5.895791583166333,5.929859719438878,5.963927855711423,5.997995991983968,6.032064128256513,6.066132264529058,6.1002004008016035,6.134268537074148,6.168336673346693,6.202404809619239,6.236472945891784,6.270541082164328,6.304609218436874,6.338677354709419,6.372745490981964,6.406813627254509,6.440881763527054,6.474949899799599,6.509018036072145,6.543086172344689,6.577154308617234,6.61122244488978,6.645290581162325,6.679358717434869,6.713426853707415,6.74749498997996,6.781563126252505,6.81563126252505,6.849699398797595,6.88376753507014,6.917835671342686,6.95190380761523,6.985971943887775,7.020040080160321,7.054108216432866,7.0881763527054105,7.122244488977956,7.156312625250501,7.190380761523046,7.224448897795591,7.258517034068136,7.292585170340681,7.326653306613227,7.3607214428857715,7.394789579158316,7.428857715430862,7.462925851703407,7.4969939879759515,7.531062124248497,7.565130260521042,7.599198396793587,7.6332665330661325,7.667334669338677,7.701402805611222,7.735470941883768,7.7695390781563125,7.803607214428857,7.837675350701403,7.871743486973948,7.905811623246493,7.939879759519038,7.973947895791583,8.008016032064129,8.042084168336673,8.076152304609218,8.110220440881763,8.144288577154308,8.178356713426854,8.2124248496994,8.246492985971944,8.280561122244489,8.314629258517034,8.348697394789578,8.382765531062125,8.41683366733467,8.450901803607215,8.48496993987976,8.519038076152304,8.553106212424849,8.587174348697395,8.62124248496994,8.655310621242485,8.68937875751503,8.723446893787575,8.75751503006012,8.791583166332666,8.82565130260521,8.859719438877756,8.8937875751503,8.927855711422845,8.96192384769539,8.995991983967937,9.030060120240481,9.064128256513026,9.098196392785571,9.132264529058116,9.16633266533066,9.200400801603207,9.234468937875752,9.268537074148297,9.302605210420841,9.336673346693386,9.370741482965931,9.404809619238478,9.438877755511022,9.472945891783567,9.507014028056112,9.541082164328657,9.575150300601202,9.609218436873748,9.643286573146293,9.677354709418838,9.711422845691382,9.745490981963927,9.779559118236472,9.813627254509019,9.847695390781563,9.881763527054108,9.915831663326653,9.949899799599198,9.983967935871744,10.01803607214429,10.052104208416834,10.086172344689379,10.120240480961924,10.154308617234468,10.188376753507015,10.22244488977956,10.256513026052104,10.29058116232465,10.324649298597194,10.358717434869739,10.392785571142285,10.42685370741483,10.460921843687375,10.49498997995992,10.529058116232465,10.56312625250501,10.597194388777556,10.6312625250501,10.665330661322646,10.69939879759519,10.733466933867735,10.76753507014028,10.801603206412826,10.835671342685371,10.869739478957916,10.90380761523046,10.937875751503006,10.97194388777555,11.006012024048097,11.040080160320642,11.074148296593187,11.108216432865731,11.142284569138276,11.176352705410821,11.210420841683367,11.244488977955912,11.278557114228457,11.312625250501002,11.346693386773547,11.380761523046091,11.414829659318638,11.448897795591183,11.482965931863728,11.517034068136272,11.551102204408817,11.585170340681362,11.619238476953909,11.653306613226453,11.687374749498998,11.721442885771543,11.755511022044088,11.789579158316633,11.823647294589179,11.857715430861724,11.891783567134269,11.925851703406813,11.959919839679358,11.993987975951903,12.02805611222445,12.062124248496994,12.09619238476954,12.130260521042084,12.164328657314629,12.198396793587174,12.23246492985972,12.266533066132265,12.30060120240481,12.334669338677354,12.3687374749499,12.402805611222444,12.43687374749499,12.470941883767535,12.50501002004008,12.539078156312625,12.57314629258517,12.607214428857715,12.641282565130261,12.675350701402806,12.70941883767535,12.743486973947896,12.77755511022044,12.811623246492985,12.845691382765532,12.879759519038076,12.913827655310621,12.947895791583166,12.98196392785571,13.016032064128256,13.050100200400802,13.084168336673347,13.118236472945892,13.152304609218437,13.186372745490981,13.220440881763528,13.254509018036073,13.288577154308618,13.322645290581162,13.356713426853707,13.390781563126252,13.424849699398798,13.458917835671343,13.492985971943888,13.527054108216433,13.561122244488978,13.595190380761522,13.629258517034069,13.663326653306614,13.697394789579159,13.731462925851703,13.765531062124248,13.799599198396793,13.83366733466934,13.867735470941884,13.901803607214429,13.935871743486974,13.969939879759519,14.004008016032063,14.03807615230461,14.072144288577155,14.1062124248497,14.140280561122244,14.17434869739479,14.208416833667334,14.24248496993988,14.276553106212425,14.31062124248497,14.344689378757515,14.37875751503006,14.412825651302605,14.446893787575151,14.480961923847696,14.51503006012024,14.549098196392785,14.58316633266533,14.617234468937875,14.651302605210422,14.685370741482966,14.719438877755511,14.753507014028056,14.7875751503006,14.821643286573146,14.855711422845692,14.889779559118237,14.923847695390782,14.957915831663327,14.991983967935871,15.026052104208416,15.060120240480963,15.094188376753507,15.128256513026052,15.162324649298597,15.196392785571142,15.230460921843687,15.264529058116233,15.298597194388778,15.332665330661323,15.366733466933868,15.400801603206412,15.434869739478957,15.468937875751504,15.503006012024048,15.537074148296593,15.571142284569138,15.605210420841683,15.639278557114228,15.673346693386774,15.707414829659319,15.741482965931864,15.775551102204409,15.809619238476953,15.843687374749498,15.877755511022045,15.91182364729459,15.945891783567134,15.97995991983968,16.014028056112224,16.04809619238477,16.082164328657313,16.11623246492986,16.150300601202403,16.18436873747495,16.218436873747496,16.25250501002004,16.286573146292586,16.32064128256513,16.354709418837675,16.38877755511022,16.422845691382765,16.45691382765531,16.490981963927855,16.5250501002004,16.559118236472944,16.593186372745492,16.627254509018037,16.661322645290582,16.695390781563127,16.72945891783567,16.763527054108216,16.79759519038076,16.831663326653306,16.86573146292585,16.899799599198396,16.93386773547094,16.96793587174349,17.002004008016034,17.03607214428858,17.070140280561123,17.104208416833668,17.138276553106213,17.172344689378757,17.206412825651302,17.240480961923847,17.274549098196392,17.308617234468937,17.34268537074148,17.37675350701403,17.410821643286575,17.44488977955912,17.478957915831664,17.51302605210421,17.547094188376754,17.5811623246493,17.615230460921843,17.649298597194388,17.683366733466933,17.717434869739478,17.751503006012022,17.78557114228457,17.819639278557116,17.85370741482966,17.887775551102205,17.92184368737475,17.955911823647295,17.98997995991984,18.024048096192384,18.05811623246493,18.092184368737474,18.12625250501002,18.160320641282564,18.194388777555112,18.228456913827657,18.2625250501002,18.296593186372746,18.33066132264529,18.364729458917836,18.39879759519038,18.432865731462925,18.46693386773547,18.501002004008015,18.53507014028056,18.569138276553105,18.603206412825653,18.637274549098198,18.671342685370742,18.705410821643287,18.739478957915832,18.773547094188377,18.80761523046092,18.841683366733466,18.87575150300601,18.909819639278556,18.9438877755511,18.977955911823646,19.012024048096194,19.04609218436874,19.080160320641284,19.11422845691383,19.148296593186373,19.182364729458918,19.216432865731463,19.250501002004007,19.284569138276552,19.318637274549097,19.352705410821642,19.386773547094187,19.420841683366735,19.45490981963928,19.488977955911825,19.52304609218437,19.557114228456914,19.59118236472946,19.625250501002004,19.65931863727455,19.693386773547093,19.727454909819638,19.761523046092183,19.795591182364728,19.829659318637276,19.86372745490982,19.897795591182366,19.93186372745491,19.965931863727455,20.0]} diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/runner.jl new file mode 100644 index 000000000000..4f4966772468 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/runner.jl @@ -0,0 +1,94 @@ +#!/usr/bin/env julia +# +# @license Apache-2.0 +# +# Copyright (c) 2024 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import JSON + +""" + gen( x, filepath ) + +Generate fixture data and write to file. + +# Arguments + +* `x`: domain +* `filepath::AbstractString`: filepath of the output file + +# Examples + +``` julia +julia> x = range( 0.0, stop = 1000.0, length = 2001 ); +julia> gen( x, \"./data.json\" ); +``` +""" +function gen( x, filepath ) + y = Array{Float32}( undef, length(x) ); + for i in eachindex(x) + y[i] = log( x[i] ); + end + + data = Dict([ + ("x", x), + ("expected", y) + ]); + + 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 ); + +# Subnormal values: +x = range( 1.0e-39, stop = 1.4e-45, length = 500 ); +out = joinpath( dir, "subnormal.json" ); +gen( x, out ); + +# Positive tiny values: +x = range( 1.0e-30, stop = 1.0e-38, length = 500 ); +out = joinpath( dir, "tiny_positive.json" ); +gen( x, out ); + +# Small(er) values: +x = range( 1.0e-30, stop = 0.8, length = 500 ); +out = joinpath( dir, "smaller.json" ); +gen( x, out ); + +# Positive small values: +x = range( 0.8, stop = 3.0, length = 500 ); +out = joinpath( dir, "small_positive.json" ); +gen( x, out ); + +# Positive medium values: +x = range( 3.0, stop = 20.0, length = 500 ); +out = joinpath( dir, "medium_positive.json" ); +gen( x, out ); + +# Large positive values: +x = range( 20.0, stop = 50.0, length = 500 ); +out = joinpath( dir, "large_positive.json" ); +gen( x, out ); + +# Very large positive values: +x = range( 50.0, stop = 500.0, length = 500 ); +out = joinpath( dir, "very_large_positive.json" ); +gen( x, out ); diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/small_positive.json b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/small_positive.json new file mode 100644 index 000000000000..b41245b67444 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/small_positive.json @@ -0,0 +1 @@ +{"expected":[-0.22314355,-0.21764766,-0.2121818,-0.20674567,-0.20133892,-0.19596125,-0.19061235,-0.1852919,-0.1799996,-0.17473517,-0.16949831,-0.16428874,-0.15910617,-0.1539503,-0.14882089,-0.14371765,-0.13864033,-0.13358866,-0.12856236,-0.12356122,-0.11858496,-0.11363334,-0.10870612,-0.10380305,-0.098923914,-0.09406847,-0.089236476,-0.08442772,-0.07964198,-0.07487904,-0.07013868,-0.06542067,-0.06072483,-0.05605093,-0.051398773,-0.046768162,-0.042158894,-0.03757077,-0.033003606,-0.028457206,-0.023931378,-0.019425945,-0.014940718,-0.010475519,-0.006030169,-0.0016044929,0.0028016828,0.0071885292,0.011556216,0.015904907,0.020234771,0.024545968,0.028838657,0.033113,0.037369147,0.041607257,0.045827482,0.05002997,0.054214872,0.058382336,0.0625325,0.066665515,0.07078152,0.074880645,0.07896304,0.08302884,0.08707818,0.091111176,0.09512798,0.099128716,0.1031135,0.10708248,0.111035764,0.11497348,0.118895754,0.122802705,0.12669444,0.1305711,0.1344328,0.13827962,0.1421117,0.14592917,0.14973211,0.15352064,0.15729488,0.16105494,0.1648009,0.16853288,0.17225097,0.17595531,0.17964597,0.18332306,0.18698667,0.19063692,0.19427389,0.19789767,0.20150839,0.2051061,0.20869091,0.21226293,0.21582222,0.2193689,0.22290304,0.22642474,0.22993407,0.23343113,0.236916,0.24038878,0.24384955,0.24729836,0.2507353,0.25416052,0.25757402,0.2609759,0.26436627,0.26774517,0.27111268,0.2744689,0.2778139,0.28114775,0.2844705,0.28778228,0.2910831,0.29437307,0.29765224,0.3009207,0.30417854,0.30742577,0.31066248,0.31388876,0.31710467,0.32031026,0.3235056,0.3266908,0.32986587,0.33303088,0.3361859,0.339331,0.34246626,0.3455917,0.3487074,0.35181344,0.35490987,0.3579967,0.36107406,0.364142,0.36720052,0.37024972,0.37328964,0.3763204,0.37934196,0.3823544,0.38535783,0.38835225,0.39133772,0.39431432,0.3972821,0.40024108,0.40319133,0.40613288,0.40906584,0.4119902,0.41490605,0.4178134,0.42071235,0.42360288,0.42648512,0.42935905,0.43222475,0.4350823,0.43793166,0.44077292,0.44360617,0.44643137,0.44924864,0.452058,0.45485947,0.45765314,0.460439,0.46321714,0.46598756,0.46875033,0.4715055,0.47425312,0.47699317,0.47972575,0.4824509,0.4851686,0.48787898,0.49058202,0.49327776,0.49596626,0.49864757,0.5013217,0.5039887,0.5066486,0.5093014,0.5119472,0.5145861,0.517218,0.519843,0.52246106,0.52507234,0.5276768,0.5302745,0.5328655,0.5354498,0.5380274,0.54059845,0.5431628,0.5457207,0.548272,0.55081683,0.55335516,0.5558871,0.5584127,0.56093186,0.5634447,0.5659512,0.5684515,0.57094556,0.5734334,0.5759151,0.5783906,0.58086,0.58332336,0.5857806,0.5882319,0.59067714,0.59311646,0.5955498,0.5979773,0.60039884,0.60281456,0.6052245,0.6076286,0.61002696,0.61241955,0.6148064,0.6171876,0.6195632,0.6219331,0.62429744,0.6266562,0.62900937,0.6313571,0.63369924,0.6360359,0.6383672,0.640693,0.6430134,0.64532846,0.6476382,0.6499426,0.6522417,0.6545355,0.65682405,0.6591074,0.66138554,0.6636585,0.66592634,0.668189,0.6704466,0.67269903,0.6749465,0.6771889,0.6794262,0.68165857,0.683886,0.6861084,0.68832594,0.6905386,0.6927463,0.69494915,0.6971472,0.6993404,0.7015288,0.7037124,0.70589125,0.7080654,0.7102348,0.71239954,0.71455956,0.716715,0.7188657,0.7210118,0.72315335,0.72529036,0.7274227,0.7295506,0.73167396,0.7337928,0.7359072,0.7380171,0.74012256,0.7422236,0.7443202,0.74641246,0.74850035,0.7505839,0.7526631,0.754738,0.7568086,0.7588749,0.7609369,0.7629947,0.7650483,0.7670977,0.76914287,0.77118385,0.7732207,0.7752534,0.777282,0.7793065,0.7813269,0.7833432,0.78535545,0.78736365,0.78936785,0.79136807,0.7933642,0.79535645,0.7973447,0.799329,0.8013094,0.80328584,0.8052584,0.8072271,0.8091919,0.8111529,0.81311,0.8150633,0.8170128,0.81895846,0.8209004,0.82283854,0.82477295,0.8267036,0.82863057,0.8305538,0.8324734,0.83438927,0.83630145,0.83821005,0.84011495,0.8420163,0.843914,0.8458081,0.84769857,0.84958553,0.8514689,0.8533488,0.85522515,0.8570979,0.85896724,0.8608331,0.86269546,0.86455435,0.8664098,0.8682618,0.8701104,0.8719556,0.87379736,0.87563574,0.87747073,0.8793024,0.8811307,0.8829557,0.8847773,0.88659567,0.8884107,0.89022243,0.8920309,0.8938361,0.89563805,0.89743674,0.8992322,0.9010245,0.90281355,0.9045994,0.9063821,0.9081616,0.9099379,0.9117111,0.9134812,0.9152481,0.9170119,0.91877264,0.9205302,0.9222848,0.9240362,0.9257846,0.92752993,0.92927223,0.9310115,0.9327478,0.93448097,0.9362112,0.9379385,0.93966275,0.9413841,0.9431024,0.94481784,0.9465303,0.9482398,0.9499464,0.95165014,0.95335096,0.95504886,0.9567439,0.9584361,0.96012545,0.9618119,0.9634955,0.96517634,0.9668543,0.96852946,0.97020185,0.97187144,0.9735382,0.9752022,0.9768635,0.978522,0.98017776,0.9818308,0.98348105,0.98512864,0.9867735,0.98841566,0.9900551,0.9916919,0.993326,0.99495745,0.9965862,0.99821234,0.99983585,1.0014567,1.003075,1.0046906,1.0063037,1.0079141,1.0095218,1.0111271,1.0127298,1.0143299,1.0159274,1.0175225,1.019115,1.0207049,1.0222924,1.0238773,1.0254596,1.0270395,1.0286169,1.0301918,1.0317643,1.0333343,1.0349017,1.0364668,1.0380294,1.0395896,1.0411474,1.0427027,1.0442556,1.045806,1.0473541,1.0488999,1.0504432,1.0519841,1.0535227,1.0550588,1.0565927,1.0581242,1.0596534,1.0611802,1.0627047,1.0642269,1.0657468,1.0672643,1.0687796,1.0702925,1.0718032,1.0733116,1.0748178,1.0763216,1.0778232,1.0793226,1.0808196,1.0823145,1.0838072,1.0852976,1.0867858,1.0882717,1.0897555,1.0912372,1.0927166,1.0941937,1.0956688,1.0971416,1.0986123],"x":[0.8,0.8044088176352705,0.8088176352705411,0.8132264529058116,0.8176352705410822,0.8220440881763527,0.8264529058116232,0.8308617234468938,0.8352705410821644,0.8396793587174348,0.8440881763527054,0.848496993987976,0.8529058116232465,0.857314629258517,0.8617234468937875,0.8661322645290581,0.8705410821643287,0.8749498997995993,0.8793587174348697,0.8837675350701403,0.8881763527054108,0.8925851703406814,0.8969939879759519,0.9014028056112224,0.905811623246493,0.9102204408817636,0.914629258517034,0.9190380761523046,0.9234468937875752,0.9278557114228457,0.9322645290581162,0.9366733466933868,0.9410821643286573,0.9454909819639279,0.9498997995991983,0.9543086172344689,0.9587174348697395,0.96312625250501,0.9675350701402805,0.9719438877755511,0.9763527054108216,0.9807615230460922,0.9851703406813628,0.9895791583166332,0.9939879759519038,0.9983967935871744,1.0028056112224448,1.0072144288577154,1.011623246492986,1.0160320641282565,1.020440881763527,1.0248496993987977,1.0292585170340682,1.0336673346693386,1.0380761523046091,1.0424849699398797,1.0468937875751503,1.0513026052104208,1.0557114228456914,1.060120240480962,1.0645290581162326,1.068937875751503,1.0733466933867735,1.077755511022044,1.0821643286573146,1.0865731462925852,1.0909819639278557,1.0953907815631263,1.0997995991983969,1.1042084168336674,1.1086172344689378,1.1130260521042084,1.117434869739479,1.1218436873747495,1.12625250501002,1.1306613226452906,1.1350701402805612,1.1394789579158318,1.143887775551102,1.1482965931863727,1.1527054108216432,1.1571142284569138,1.1615230460921844,1.165931863727455,1.1703406813627255,1.174749498997996,1.1791583166332664,1.183567134268537,1.1879759519038076,1.1923847695390781,1.1967935871743487,1.2012024048096193,1.2056112224448898,1.2100200400801604,1.214428857715431,1.2188376753507013,1.2232464929859719,1.2276553106212424,1.232064128256513,1.2364729458917836,1.2408817635270541,1.2452905811623247,1.2496993987975953,1.2541082164328656,1.2585170340681362,1.2629258517034068,1.2673346693386773,1.271743486973948,1.2761523046092185,1.280561122244489,1.2849699398797596,1.28937875751503,1.2937875751503005,1.298196392785571,1.3026052104208417,1.3070140280561122,1.3114228456913828,1.3158316633266534,1.320240480961924,1.3246492985971945,1.3290581162324648,1.3334669338677354,1.337875751503006,1.3422845691382765,1.346693386773547,1.3511022044088177,1.3555110220440882,1.3599198396793588,1.3643286573146292,1.3687374749498997,1.3731462925851703,1.3775551102204409,1.3819639278557114,1.386372745490982,1.3907815631262526,1.3951903807615231,1.3995991983967937,1.404008016032064,1.4084168336673346,1.4128256513026052,1.4172344689378757,1.4216432865731463,1.4260521042084169,1.4304609218436874,1.434869739478958,1.4392785571142284,1.443687374749499,1.4480961923847695,1.45250501002004,1.4569138276553106,1.4613226452905812,1.4657314629258518,1.4701402805611223,1.4745490981963927,1.4789579158316633,1.4833667334669338,1.4877755511022044,1.492184368737475,1.4965931863727455,1.501002004008016,1.5054108216432867,1.5098196392785572,1.5142284569138276,1.5186372745490981,1.5230460921843687,1.5274549098196393,1.5318637274549098,1.5362725450901804,1.540681362725451,1.5450901803607215,1.549498997995992,1.5539078156312625,1.558316633266533,1.5627254509018036,1.5671342685370742,1.5715430861723447,1.5759519038076153,1.5803607214428859,1.5847695390781562,1.5891783567134268,1.5935871743486973,1.597995991983968,1.6024048096192385,1.606813627254509,1.6112224448897796,1.6156312625250502,1.6200400801603208,1.624448897795591,1.6288577154308617,1.6332665330661322,1.6376753507014028,1.6420841683366734,1.646492985971944,1.6509018036072145,1.655310621242485,1.6597194388777554,1.664128256513026,1.6685370741482966,1.6729458917835671,1.6773547094188377,1.6817635270541083,1.6861723446893788,1.6905811623246494,1.6949899799599197,1.6993987975951903,1.7038076152304609,1.7082164328657314,1.712625250501002,1.7170340681362726,1.7214428857715431,1.7258517034068137,1.7302605210420843,1.7346693386773546,1.7390781563126252,1.7434869739478958,1.7478957915831663,1.752304609218437,1.7567134268537075,1.761122244488978,1.7655310621242486,1.769939879759519,1.7743486973947895,1.77875751503006,1.7831663326653306,1.7875751503006012,1.7919839679358718,1.7963927855711423,1.800801603206413,1.8052104208416833,1.8096192384769538,1.8140280561122244,1.818436873747495,1.8228456913827655,1.827254509018036,1.8316633266533067,1.8360721442885772,1.8404809619238478,1.8448897795591181,1.8492985971943887,1.8537074148296593,1.8581162324649299,1.8625250501002004,1.866933867735471,1.8713426853707416,1.8757515030060121,1.8801603206412825,1.884569138276553,1.8889779559118236,1.8933867735470942,1.8977955911823647,1.9022044088176353,1.9066132264529059,1.9110220440881764,1.9154308617234468,1.9198396793587174,1.924248496993988,1.9286573146292585,1.933066132264529,1.9374749498997996,1.9418837675350702,1.9462925851703408,1.9507014028056113,1.9551102204408817,1.9595190380761522,1.9639278557114228,1.9683366733466934,1.972745490981964,1.9771543086172345,1.981563126252505,1.9859719438877756,1.990380761523046,1.9947895791583166,1.9991983967935871,2.003607214428858,2.0080160320641283,2.0124248496993986,2.0168336673346694,2.0212424849699397,2.0256513026052105,2.030060120240481,2.0344689378757517,2.038877755511022,2.043286573146293,2.047695390781563,2.0521042084168335,2.0565130260521043,2.0609218436873746,2.0653306613226454,2.0697394789579158,2.0741482965931866,2.078557114228457,2.0829659318637272,2.087374749498998,2.0917835671342684,2.096192384769539,2.1006012024048095,2.1050100200400803,2.1094188376753507,2.1138276553106214,2.118236472945892,2.122645290581162,2.127054108216433,2.1314629258517033,2.135871743486974,2.1402805611222444,2.144689378757515,2.1490981963927855,2.1535070140280563,2.1579158316633267,2.162324649298597,2.166733466933868,2.171142284569138,2.175551102204409,2.1799599198396793,2.18436873747495,2.1887775551102204,2.1931863727454908,2.1975951903807616,2.202004008016032,2.2064128256513027,2.210821643286573,2.215230460921844,2.219639278557114,2.224048096192385,2.2284569138276553,2.2328657314629257,2.2372745490981965,2.241683366733467,2.2460921843687376,2.250501002004008,2.2549098196392787,2.259318637274549,2.26372745490982,2.26813627254509,2.2725450901803605,2.2769539078156313,2.2813627254509017,2.2857715430861725,2.290180360721443,2.2945891783567136,2.298997995991984,2.3034068136272543,2.307815631262525,2.3122244488977954,2.3166332665330662,2.3210420841683366,2.3254509018036074,2.3298597194388777,2.3342685370741485,2.338677354709419,2.343086172344689,2.34749498997996,2.3519038076152303,2.356312625250501,2.3607214428857715,2.3651302605210422,2.3695390781563126,2.3739478957915834,2.3783567134268537,2.382765531062124,2.387174348697395,2.391583166332665,2.395991983967936,2.4004008016032063,2.404809619238477,2.4092184368737475,2.413627254509018,2.4180360721442886,2.422444889779559,2.4268537074148298,2.4312625250501,2.435671342685371,2.4400801603206412,2.444488977955912,2.4488977955911824,2.4533066132264527,2.4577154308617235,2.462124248496994,2.4665330661322646,2.470941883767535,2.4753507014028058,2.479759519038076,2.484168336673347,2.4885771543086173,2.4929859719438876,2.4973947895791584,2.5018036072144287,2.5062124248496995,2.51062124248497,2.5150300601202407,2.519438877755511,2.5238476953907814,2.528256513026052,2.5326653306613225,2.5370741482965933,2.5414829659318636,2.5458917835671344,2.5503006012024048,2.5547094188376755,2.559118236472946,2.5635270541082162,2.567935871743487,2.5723446893787574,2.576753507014028,2.5811623246492985,2.5855711422845693,2.5899799599198396,2.5943887775551104,2.598797595190381,2.603206412825651,2.607615230460922,2.6120240480961923,2.616432865731463,2.6208416833667334,2.625250501002004,2.6296593186372745,2.634068136272545,2.6384769539078157,2.642885771543086,2.647294589178357,2.651703406813627,2.656112224448898,2.6605210420841683,2.664929859719439,2.6693386773547094,2.6737474949899798,2.6781563126252506,2.682565130260521,2.6869739478957917,2.691382765531062,2.695791583166333,2.700200400801603,2.704609218436874,2.7090180360721443,2.7134268537074147,2.7178356713426854,2.722244488977956,2.7266533066132266,2.731062124248497,2.7354709418837677,2.739879759519038,2.7442885771543084,2.748697394789579,2.7531062124248495,2.7575150300601203,2.7619238476953907,2.7663326653306615,2.770741482965932,2.7751503006012026,2.779559118236473,2.7839679358717433,2.788376753507014,2.7927855711422844,2.797194388777555,2.8016032064128256,2.8060120240480964,2.8104208416833667,2.8148296593186375,2.819238476953908,2.823647294589178,2.828056112224449,2.8324649298597193,2.83687374749499,2.8412825651302605,2.8456913827655312,2.8501002004008016,2.854509018036072,2.8589178356713427,2.863326653306613,2.867735470941884,2.872144288577154,2.876553106212425,2.8809619238476953,2.885370741482966,2.8897795591182365,2.894188376753507,2.8985971943887776,2.903006012024048,2.9074148296593187,2.911823647294589,2.91623246492986,2.9206412825651302,2.925050100200401,2.9294589178356714,2.9338677354709417,2.9382765531062125,2.942685370741483,2.9470941883767536,2.951503006012024,2.9559118236472948,2.960320641282565,2.9647294589178355,2.9691382765531062,2.9735470941883766,2.9779559118236474,2.9823647294589177,2.9867735470941885,2.991182364729459,2.9955911823647297,3.0]} diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/smaller.json b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/smaller.json new file mode 100644 index 000000000000..a17ca327dbcc --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/smaller.json @@ -0,0 +1 @@ +{"expected":[-69.07755,-6.4357495,-5.7426023,-5.337137,-5.049455,-4.8263116,-4.64399,-4.4898396,-4.356308,-4.238525,-4.1331644,-4.037854,-3.950843,-3.8708003,-3.7966924,-3.7276995,-3.663161,-3.6025362,-3.545378,-3.4913106,-3.4400175,-3.3912272,-3.3447073,-3.3002555,-3.257696,-3.216874,-3.177653,-3.1399128,-3.1035452,-3.0684538,-3.0345523,-3.0017624,-2.9700139,-2.9392421,-2.909389,-2.8804016,-2.8522308,-2.8248317,-2.7981634,-2.772188,-2.7468703,-2.7221775,-2.69808,-2.6745496,-2.65156,-2.6290872,-2.6071084,-2.585602,-2.5645487,-2.5439293,-2.5237267,-2.5039241,-2.484506,-2.4654577,-2.4467657,-2.4284165,-2.410398,-2.3926983,-2.3753066,-2.3582122,-2.3414052,-2.3248758,-2.3086152,-2.292615,-2.2768667,-2.2613623,-2.246095,-2.231057,-2.2162418,-2.2016432,-2.1872544,-2.1730697,-2.1590836,-2.1452901,-2.1316845,-2.1182616,-2.1050162,-2.0919442,-2.0790408,-2.0663018,-2.053723,-2.0413005,-2.0290303,-2.0169091,-2.0049329,-1.9930984,-1.9814024,-1.9698415,-1.9584129,-1.9471133,-1.93594,-1.9248902,-1.913961,-1.9031502,-1.8924549,-1.8818728,-1.8714014,-1.8610387,-1.8507822,-1.8406298,-1.8305795,-1.8206291,-1.8107768,-1.8010206,-1.7913587,-1.7817893,-1.7723105,-1.7629209,-1.7536185,-1.7444018,-1.7352693,-1.7262194,-1.7172508,-1.7083619,-1.6995512,-1.6908175,-1.6821594,-1.6735758,-1.665065,-1.6566261,-1.6482579,-1.6399591,-1.6317286,-1.6235653,-1.615468,-1.607436,-1.5994678,-1.5915625,-1.5837194,-1.5759373,-1.5682153,-1.5605524,-1.5529478,-1.5454005,-1.5379099,-1.5304749,-1.5230948,-1.5157688,-1.5084959,-1.5012757,-1.4941072,-1.4869897,-1.4799225,-1.472905,-1.4659363,-1.4590158,-1.4521431,-1.445317,-1.4385374,-1.4318033,-1.4251144,-1.4184698,-1.4118692,-1.4053117,-1.398797,-1.3923246,-1.3858936,-1.3795038,-1.3731546,-1.3668455,-1.3605758,-1.3543453,-1.3481534,-1.3419994,-1.3358833,-1.3298042,-1.3237618,-1.3177558,-1.3117857,-1.305851,-1.2999512,-1.2940861,-1.2882552,-1.2824581,-1.2766943,-1.2709637,-1.2652657,-1.2595999,-1.2539661,-1.2483639,-1.2427928,-1.2372526,-1.231743,-1.2262635,-1.2208139,-1.2153938,-1.210003,-1.204641,-1.1993077,-1.1940026,-1.1887256,-1.1834762,-1.1782542,-1.1730595,-1.1678915,-1.1627501,-1.157635,-1.1525459,-1.1474826,-1.1424448,-1.1374323,-1.1324447,-1.1274819,-1.1225437,-1.1176296,-1.1127397,-1.1078734,-1.1030308,-1.0982115,-1.0934154,-1.0886421,-1.0838915,-1.0791633,-1.0744575,-1.0697737,-1.0651116,-1.0604713,-1.0558523,-1.0512546,-1.046678,-1.0421221,-1.0375869,-1.0330722,-1.0285779,-1.0241036,-1.0196493,-1.0152147,-1.0107996,-1.006404,-1.0020276,-0.99767035,-0.9933319,-0.9890123,-0.98471117,-0.9804285,-0.97616416,-0.97191787,-0.9676895,-0.963479,-0.9592861,-0.9551107,-0.9509527,-0.9468119,-0.9426882,-0.9385814,-0.93449146,-0.93041813,-0.9263613,-0.9223209,-0.91829675,-0.9142887,-0.9102967,-0.9063206,-0.90236014,-0.8984154,-0.8944861,-0.8905722,-0.88667357,-0.8827901,-0.87892157,-0.875068,-0.87122923,-0.8674051,-0.8635956,-0.8598005,-0.8560198,-0.8522533,-0.84850097,-0.8447627,-0.8410383,-0.83732766,-0.8336308,-0.8299476,-0.82627785,-0.8226215,-0.81897855,-0.8153488,-0.8117321,-0.80812854,-0.8045379,-0.80096006,-0.797395,-0.79384255,-0.79030275,-0.7867754,-0.78326046,-0.77975786,-0.7762674,-0.7727892,-0.76932293,-0.7658687,-0.7624264,-0.75899583,-0.755577,-0.7521699,-0.7487743,-0.7453902,-0.7420175,-0.73865616,-0.7353061,-0.73196715,-0.72863936,-0.7253226,-0.7220169,-0.7187219,-0.7154379,-0.7121645,-0.7089019,-0.70564985,-0.7024084,-0.6991773,-0.6959567,-0.69274646,-0.68954647,-0.68635666,-0.683177,-0.68000746,-0.6768479,-0.67369825,-0.6705586,-0.6674287,-0.66430855,-0.6611981,-0.6580973,-0.6550061,-0.6519245,-0.6488523,-0.6457895,-0.642736,-0.6396919,-0.636657,-0.6336313,-0.6306147,-0.62760717,-0.62460864,-0.6216191,-0.6186385,-0.6156667,-0.61270374,-0.60974956,-0.606804,-0.6038672,-0.6009389,-0.5980192,-0.595108,-0.5922052,-0.5893109,-0.5864249,-0.5835472,-0.58067775,-0.5778165,-0.57496345,-0.57211846,-0.5692816,-0.56645274,-0.56363183,-0.5608189,-0.55801386,-0.55521667,-0.55242723,-0.5496456,-0.54687166,-0.5441054,-0.5413468,-0.5385958,-0.5358523,-0.53311634,-0.5303878,-0.5276667,-0.524953,-0.52224666,-0.5195476,-0.5168558,-0.51417124,-0.51149386,-0.50882363,-0.5061605,-0.50350446,-0.50085545,-0.49821344,-0.4955784,-0.49295026,-0.49032903,-0.48771465,-0.4851071,-0.4825063,-0.47991228,-0.47732496,-0.47474432,-0.4721703,-0.4696029,-0.4670421,-0.46448782,-0.46194002,-0.45939875,-0.45686388,-0.45433542,-0.45181337,-0.44929764,-0.44678822,-0.4442851,-0.44178823,-0.43929756,-0.4368131,-0.43433475,-0.4318626,-0.42939648,-0.42693645,-0.42448246,-0.4220345,-0.4195925,-0.41715643,-0.4147263,-0.41230205,-0.40988368,-0.40747112,-0.40506437,-0.40266344,-0.40026823,-0.39787874,-0.39549494,-0.3931168,-0.39074433,-0.38837746,-0.3860162,-0.38366047,-0.3813103,-0.37896565,-0.37662646,-0.37429273,-0.37196442,-0.36964154,-0.36732405,-0.36501193,-0.3627051,-0.36040363,-0.35810742,-0.35581645,-0.35353073,-0.35125023,-0.3489749,-0.34670478,-0.34443977,-0.34217986,-0.33992508,-0.33767536,-0.33543068,-0.33319107,-0.33095643,-0.32872677,-0.32650205,-0.32428232,-0.32206747,-0.3198575,-0.31765246,-0.31545222,-0.31325683,-0.31106627,-0.30888045,-0.30669942,-0.30452317,-0.3023516,-0.30018476,-0.2980226,-0.2958651,-0.29371223,-0.29156402,-0.2894204,-0.28728136,-0.2851469,-0.28301695,-0.28089157,-0.27877066,-0.27665427,-0.27454233,-0.27243483,-0.2703318,-0.26823315,-0.2661389,-0.26404905,-0.26196355,-0.2598824,-0.25780553,-0.25573298,-0.25366473,-0.25160074,-0.24954103,-0.24748552,-0.24543424,-0.24338716,-0.24134426,-0.23930553,-0.23727094,-0.23524047,-0.23321413,-0.23119189,-0.22917372,-0.22715962,-0.22514957,-0.22314355],"x":[1.0e-30,0.0016032064128256513,0.0032064128256513026,0.0048096192384769546,0.006412825651302605,0.008016032064128258,0.009619238476953909,0.011222444889779559,0.01282565130260521,0.014428857715430862,0.016032064128256515,0.017635270541082167,0.019238476953907818,0.02084168336673347,0.022444889779559118,0.02404809619238477,0.02565130260521042,0.027254509018036072,0.028857715430861724,0.030460921843687375,0.03206412825651303,0.03366733466933868,0.03527054108216433,0.036873747494989985,0.038476953907815636,0.04008016032064129,0.04168336673346694,0.04328657314629259,0.044889779559118236,0.04649298597194389,0.04809619238476954,0.04969939879759519,0.05130260521042084,0.05290581162324649,0.054509018036072145,0.056112224448897796,0.05771543086172345,0.0593186372745491,0.06092184368737475,0.0625250501002004,0.06412825651302606,0.0657314629258517,0.06733466933867736,0.06893787575150301,0.07054108216432867,0.07214428857715431,0.07374749498997997,0.07535070140280561,0.07695390781563127,0.07855711422845692,0.08016032064128258,0.08176352705410822,0.08336673346693388,0.08496993987975952,0.08657314629258518,0.08817635270541083,0.08977955911823647,0.09138276553106213,0.09298597194388777,0.09458917835671343,0.09619238476953908,0.09779559118236474,0.09939879759519038,0.10100200400801604,0.10260521042084168,0.10420841683366734,0.10581162324649299,0.10741482965931864,0.10901803607214429,0.11062124248496995,0.11222444889779559,0.11382765531062125,0.1154308617234469,0.11703406813627255,0.1186372745490982,0.12024048096192386,0.1218436873747495,0.12344689378757516,0.1250501002004008,0.12665330661322646,0.12825651302605212,0.12985971943887775,0.1314629258517034,0.13306613226452907,0.13466933867735473,0.13627254509018036,0.13787575150300602,0.13947895791583168,0.14108216432865733,0.14268537074148296,0.14428857715430862,0.14589178356713428,0.14749498997995994,0.14909819639278557,0.15070140280561123,0.1523046092184369,0.15390781563126255,0.15551102204408818,0.15711422845691383,0.1587174348697395,0.16032064128256515,0.16192384769539078,0.16352705410821644,0.1651302605210421,0.16673346693386776,0.1683366733466934,0.16993987975951905,0.1715430861723447,0.17314629258517036,0.174749498997996,0.17635270541082165,0.1779559118236473,0.17955911823647294,0.1811623246492986,0.18276553106212426,0.18436873747494992,0.18597194388777555,0.1875751503006012,0.18917835671342687,0.19078156312625252,0.19238476953907815,0.1939879759519038,0.19559118236472947,0.19719438877755513,0.19879759519038076,0.20040080160320642,0.20200400801603208,0.20360721442885774,0.20521042084168337,0.20681362725450902,0.20841683366733468,0.21002004008016034,0.21162324649298597,0.21322645290581163,0.2148296593186373,0.21643286573146295,0.21803607214428858,0.21963927855711424,0.2212424849699399,0.22284569138276555,0.22444889779559118,0.22605210420841684,0.2276553106212425,0.22925851703406816,0.2308617234468938,0.23246492985971945,0.2340681362725451,0.23567134268537077,0.2372745490981964,0.23887775551102206,0.2404809619238477,0.24208416833667337,0.243687374749499,0.24529058116232466,0.24689378757515032,0.24849699398797598,0.2501002004008016,0.2517034068136273,0.2533066132264529,0.25490981963927856,0.25651302605210424,0.2581162324649299,0.2597194388777555,0.2613226452905812,0.2629258517034068,0.2645290581162325,0.26613226452905814,0.26773547094188377,0.26933867735470945,0.2709418837675351,0.2725450901803607,0.2741482965931864,0.27575150300601203,0.27735470941883766,0.27895791583166335,0.280561122244489,0.28216432865731467,0.2837675350701403,0.28537074148296593,0.2869739478957916,0.28857715430861725,0.2901803607214429,0.29178356713426856,0.2933867735470942,0.2949899799599199,0.2965931863727455,0.29819639278557114,0.2997995991983968,0.30140280561122246,0.3030060120240481,0.3046092184368738,0.3062124248496994,0.3078156312625251,0.3094188376753507,0.31102204408817635,0.31262525050100204,0.31422845691382767,0.3158316633266533,0.317434869739479,0.3190380761523046,0.3206412825651303,0.32224448897795593,0.32384769539078156,0.32545090180360725,0.3270541082164329,0.3286573146292585,0.3302605210420842,0.33186372745490983,0.3334669338677355,0.33507014028056115,0.3366733466933868,0.33827655310621246,0.3398797595190381,0.3414829659318637,0.3430861723446894,0.34468937875751504,0.3462925851703407,0.34789579158316636,0.349498997995992,0.3511022044088177,0.3527054108216433,0.35430861723446894,0.3559118236472946,0.35751503006012025,0.3591182364729459,0.36072144288577157,0.3623246492985972,0.3639278557114229,0.3655310621242485,0.36713426853707415,0.36873747494989983,0.37034068136272547,0.3719438877755511,0.3735470941883768,0.3751503006012024,0.3767535070140281,0.37835671342685373,0.37995991983967936,0.38156312625250505,0.3831663326653307,0.3847695390781563,0.386372745490982,0.3879759519038076,0.3895791583166333,0.39118236472945894,0.3927855711422846,0.39438877755511026,0.3959919839679359,0.3975951903807615,0.3991983967935872,0.40080160320641284,0.4024048096192385,0.40400801603206415,0.4056112224448898,0.40721442885771547,0.4088176352705411,0.41042084168336673,0.4120240480961924,0.41362725450901805,0.41523046092184374,0.41683366733466937,0.418436873747495,0.4200400801603207,0.4216432865731463,0.42324649298597194,0.42484969939879763,0.42645290581162326,0.42805611222444895,0.4296593186372746,0.4312625250501002,0.4328657314629259,0.4344689378757515,0.43607214428857716,0.43767535070140284,0.4392785571142285,0.44088176352705416,0.4424849699398798,0.4440881763527054,0.4456913827655311,0.44729458917835674,0.44889779559118237,0.45050100200400806,0.4521042084168337,0.4537074148296593,0.455310621242485,0.45691382765531063,0.4585170340681363,0.46012024048096195,0.4617234468937876,0.46332665330661327,0.4649298597194389,0.46653306613226453,0.4681362725450902,0.46973947895791585,0.47134268537074153,0.47294589178356716,0.4745490981963928,0.4761523046092185,0.4777555110220441,0.47935871743486974,0.4809619238476954,0.48256513026052106,0.48416833667334674,0.4857715430861724,0.487374749498998,0.4889779559118237,0.4905811623246493,0.49218436873747495,0.49378757515030064,0.49539078156312627,0.49699398797595196,0.4985971943887776,0.5002004008016032,0.5018036072144288,0.5034068136272546,0.5050100200400802,0.5066132264529059,0.5082164328657315,0.5098196392785571,0.5114228456913827,0.5130260521042085,0.5146292585170341,0.5162324649298597,0.5178356713426854,0.519438877755511,0.5210420841683367,0.5226452905811624,0.524248496993988,0.5258517034068136,0.5274549098196393,0.529058116232465,0.5306613226452906,0.5322645290581163,0.5338677354709419,0.5354709418837675,0.5370741482965932,0.5386773547094189,0.5402805611222445,0.5418837675350702,0.5434869739478958,0.5450901803607214,0.5466933867735472,0.5482965931863728,0.5498997995991984,0.5515030060120241,0.5531062124248497,0.5547094188376753,0.5563126252505011,0.5579158316633267,0.5595190380761523,0.561122244488978,0.5627254509018036,0.5643286573146293,0.565931863727455,0.5675350701402806,0.5691382765531062,0.5707414829659319,0.5723446893787576,0.5739478957915832,0.5755511022044089,0.5771543086172345,0.5787575150300601,0.5803607214428858,0.5819639278557115,0.5835671342685371,0.5851703406813628,0.5867735470941884,0.588376753507014,0.5899799599198398,0.5915831663326654,0.593186372745491,0.5947895791583167,0.5963927855711423,0.597995991983968,0.5995991983967937,0.6012024048096193,0.6028056112224449,0.6044088176352705,0.6060120240480962,0.6076152304609219,0.6092184368737475,0.6108216432865732,0.6124248496993988,0.6140280561122244,0.6156312625250502,0.6172344689378758,0.6188376753507014,0.6204408817635271,0.6220440881763527,0.6236472945891783,0.6252505010020041,0.6268537074148297,0.6284569138276553,0.630060120240481,0.6316633266533066,0.6332665330661323,0.634869739478958,0.6364729458917836,0.6380761523046092,0.6396793587174349,0.6412825651302606,0.6428857715430862,0.6444889779559119,0.6460921843687375,0.6476953907815631,0.6492985971943888,0.6509018036072145,0.6525050100200401,0.6541082164328658,0.6557114228456914,0.657314629258517,0.6589178356713428,0.6605210420841684,0.662124248496994,0.6637274549098197,0.6653306613226453,0.666933867735471,0.6685370741482967,0.6701402805611223,0.6717434869739479,0.6733466933867736,0.6749498997995992,0.6765531062124249,0.6781563126252506,0.6797595190380762,0.6813627254509018,0.6829659318637274,0.6845691382765532,0.6861723446893788,0.6877755511022045,0.6893787575150301,0.6909819639278557,0.6925851703406815,0.6941883767535071,0.6957915831663327,0.6973947895791583,0.698997995991984,0.7006012024048096,0.7022044088176354,0.703807615230461,0.7054108216432866,0.7070140280561122,0.7086172344689379,0.7102204408817636,0.7118236472945892,0.7134268537074149,0.7150300601202405,0.7166332665330661,0.7182364729458918,0.7198396793587175,0.7214428857715431,0.7230460921843688,0.7246492985971944,0.72625250501002,0.7278557114228458,0.7294589178356714,0.731062124248497,0.7326653306613227,0.7342685370741483,0.735871743486974,0.7374749498997997,0.7390781563126253,0.7406813627254509,0.7422845691382766,0.7438877755511022,0.7454909819639279,0.7470941883767536,0.7486973947895792,0.7503006012024048,0.7519038076152305,0.7535070140280562,0.7551102204408818,0.7567134268537075,0.7583166332665331,0.7599198396793587,0.7615230460921845,0.7631262525050101,0.7647294589178357,0.7663326653306614,0.767935871743487,0.7695390781563126,0.7711422845691384,0.772745490981964,0.7743486973947896,0.7759519038076153,0.7775551102204409,0.7791583166332666,0.7807615230460923,0.7823647294589179,0.7839679358717435,0.7855711422845691,0.7871743486973949,0.7887775551102205,0.7903807615230461,0.7919839679358718,0.7935871743486974,0.795190380761523,0.7967935871743488,0.7983967935871744,0.8]} diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/subnormal.json b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/subnormal.json new file mode 100644 index 000000000000..f59aa683507d --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/subnormal.json @@ -0,0 +1 @@ +{"expected":[-89.80082,-89.802826,-89.80483,-89.80685,-89.80887,-89.81089,-89.81291,-89.81495,-89.81698,-89.819016,-89.82106,-89.82311,-89.82516,-89.82722,-89.82928,-89.83134,-89.833405,-89.83548,-89.837555,-89.83964,-89.84172,-89.84381,-89.84591,-89.84801,-89.85011,-89.85222,-89.85433,-89.856445,-89.85857,-89.860695,-89.86282,-89.86496,-89.867096,-89.86924,-89.87138,-89.87354,-89.875694,-89.87786,-89.88003,-89.882195,-89.88438,-89.88656,-89.88874,-89.89093,-89.89313,-89.895325,-89.89753,-89.89974,-89.901955,-89.904175,-89.9064,-89.90863,-89.910866,-89.91311,-89.91535,-89.9176,-89.91985,-89.92211,-89.92438,-89.92665,-89.928925,-89.931206,-89.933495,-89.93578,-89.93808,-89.94038,-89.94269,-89.945,-89.94732,-89.94964,-89.951965,-89.9543,-89.95664,-89.958984,-89.961334,-89.96369,-89.96605,-89.96842,-89.970795,-89.97317,-89.975555,-89.97794,-89.98034,-89.98274,-89.985146,-89.98756,-89.989975,-89.9924,-89.994835,-89.99727,-89.99971,-90.00216,-90.00461,-90.00707,-90.00954,-90.01201,-90.01449,-90.016975,-90.01946,-90.02196,-90.02446,-90.02697,-90.02949,-90.03201,-90.03454,-90.03707,-90.03961,-90.04216,-90.044716,-90.04728,-90.04984,-90.05242,-90.055,-90.05759,-90.06018,-90.06278,-90.06539,-90.068,-90.070625,-90.07325,-90.07589,-90.07853,-90.08118,-90.08383,-90.086494,-90.089165,-90.09184,-90.09453,-90.09722,-90.09992,-90.10263,-90.10534,-90.10806,-90.110794,-90.113525,-90.11627,-90.11902,-90.12178,-90.12455,-90.12732,-90.130104,-90.13289,-90.13569,-90.1385,-90.141304,-90.14413,-90.14696,-90.149796,-90.15264,-90.155495,-90.158356,-90.161224,-90.1641,-90.166985,-90.169876,-90.17278,-90.1757,-90.17861,-90.18154,-90.18448,-90.18742,-90.19038,-90.193344,-90.19631,-90.199295,-90.202286,-90.205284,-90.20829,-90.2113,-90.21433,-90.21737,-90.22041,-90.223465,-90.226524,-90.2296,-90.23268,-90.23577,-90.23887,-90.24198,-90.2451,-90.24823,-90.25137,-90.254524,-90.25768,-90.26085,-90.26403,-90.26722,-90.270424,-90.27363,-90.27685,-90.28008,-90.283325,-90.286575,-90.28984,-90.29311,-90.296394,-90.29969,-90.30299,-90.30631,-90.30964,-90.31298,-90.31633,-90.319695,-90.32307,-90.32645,-90.32984,-90.33325,-90.33667,-90.3401,-90.343544,-90.347,-90.350464,-90.35394,-90.35743,-90.36093,-90.36445,-90.36797,-90.37151,-90.37507,-90.37863,-90.38221,-90.3858,-90.389404,-90.39302,-90.39665,-90.4003,-90.40395,-90.40762,-90.41131,-90.415,-90.41871,-90.42244,-90.42618,-90.429924,-90.43369,-90.43748,-90.44127,-90.445076,-90.448906,-90.45274,-90.4566,-90.460464,-90.46435,-90.46825,-90.47216,-90.47609,-90.480034,-90.48399,-90.48797,-90.49196,-90.49597,-90.49999,-90.504036,-90.508095,-90.51216,-90.51626,-90.52036,-90.52448,-90.528625,-90.53278,-90.53696,-90.54115,-90.545364,-90.54959,-90.55384,-90.558105,-90.562386,-90.56669,-90.57101,-90.57534,-90.579704,-90.584076,-90.58847,-90.59289,-90.59732,-90.601776,-90.606255,-90.61075,-90.61526,-90.6198,-90.62435,-90.62893,-90.63352,-90.638145,-90.642784,-90.647446,-90.65213,-90.65684,-90.66157,-90.66631,-90.67109,-90.67589,-90.6807,-90.68555,-90.690414,-90.695305,-90.70022,-90.705154,-90.71012,-90.7151,-90.720116,-90.72516,-90.73022,-90.735306,-90.740425,-90.74557,-90.75073,-90.75593,-90.76115,-90.766396,-90.771675,-90.77698,-90.78231,-90.787674,-90.79307,-90.798485,-90.80394,-90.80942,-90.814926,-90.820465,-90.826035,-90.83164,-90.83727,-90.84294,-90.84863,-90.85437,-90.86013,-90.86593,-90.87176,-90.877625,-90.88352,-90.88946,-90.89543,-90.901436,-90.90748,-90.91356,-90.91967,-90.92583,-90.932014,-90.93825,-90.94452,-90.95083,-90.95718,-90.96356,-90.96999,-90.97647,-90.98299,-90.98954,-90.99614,-91.002785,-91.009476,-91.01621,-91.02299,-91.029816,-91.03669,-91.04361,-91.050575,-91.057594,-91.06466,-91.07178,-91.07895,-91.08617,-91.09344,-91.10077,-91.10815,-91.11558,-91.12307,-91.130615,-91.13822,-91.14589,-91.15361,-91.16139,-91.169235,-91.17714,-91.185104,-91.19314,-91.20123,-91.2094,-91.21763,-91.22593,-91.2343,-91.24274,-91.25124,-91.25983,-91.268486,-91.27722,-91.28603,-91.29492,-91.30389,-91.31294,-91.322075,-91.33129,-91.34059,-91.34998,-91.35946,-91.369026,-91.37869,-91.38844,-91.3983,-91.40825,-91.4183,-91.42845,-91.438705,-91.44907,-91.45954,-91.47012,-91.48082,-91.49163,-91.502556,-91.51361,-91.52478,-91.53608,-91.54751,-91.559074,-91.57077,-91.5826,-91.594574,-91.6067,-91.618965,-91.63139,-91.64397,-91.65671,-91.66961,-91.682686,-91.69593,-91.70935,-91.72295,-91.73675,-91.75074,-91.76492,-91.77931,-91.79391,-91.80872,-91.82376,-91.83903,-91.85453,-91.87028,-91.886284,-91.90254,-91.91907,-91.935875,-91.95297,-91.97036,-91.98806,-92.00608,-92.02443,-92.04312,-92.06217,-92.08159,-92.10139,-92.12159,-92.14221,-92.16326,-92.18477,-92.20675,-92.22922,-92.25221,-92.27574,-92.299835,-92.32453,-92.349846,-92.375824,-92.40249,-92.429886,-92.45806,-92.487045,-92.5169,-92.54767,-92.579414,-92.612206,-92.6461,-92.6812,-92.71756,-92.7553,-92.794525,-92.83534,-92.8779,-92.922356,-92.96887,-93.01766,-93.06895,-93.12302,-93.18017,-93.24079,-93.30533,-93.37432,-93.448425,-93.52846,-93.61547,-93.71077,-93.816124,-93.9339,-94.06741,-94.22155,-94.40385,-94.62696,-94.91458,-95.31993,-96.012726,-103.279854],"x":[1.0e-39,9.97995994789579e-40,9.959919895791582e-40,9.939879843687375e-40,9.919839791583166e-40,9.899799739478957e-40,9.879759687374748e-40,9.85971963527054e-40,9.839679583166332e-40,9.819639531062124e-40,9.799599478957915e-40,9.779559426853706e-40,9.759519374749499e-40,9.73947932264529e-40,9.719439270541082e-40,9.699399218436873e-40,9.679359166332664e-40,9.659319114228457e-40,9.639279062124248e-40,9.61923901002004e-40,9.59919895791583e-40,9.579158905811622e-40,9.559118853707415e-40,9.539078801603206e-40,9.519038749498997e-40,9.498998697394788e-40,9.478958645290581e-40,9.458918593186373e-40,9.438878541082164e-40,9.418838488977955e-40,9.398798436873746e-40,9.378758384769539e-40,9.35871833266533e-40,9.338678280561122e-40,9.318638228456913e-40,9.298598176352704e-40,9.278558124248497e-40,9.258518072144288e-40,9.23847802004008e-40,9.21843796793587e-40,9.198397915831662e-40,9.178357863727455e-40,9.158317811623246e-40,9.138277759519037e-40,9.118237707414828e-40,9.098197655310621e-40,9.078157603206413e-40,9.058117551102204e-40,9.038077498997995e-40,9.018037446893786e-40,8.997997394789579e-40,8.97795734268537e-40,8.957917290581162e-40,8.937877238476953e-40,8.917837186372744e-40,8.897797134268537e-40,8.877757082164328e-40,8.85771703006012e-40,8.83767697795591e-40,8.817636925851704e-40,8.797596873747495e-40,8.777556821643286e-40,8.757516769539077e-40,8.737476717434869e-40,8.717436665330661e-40,8.697396613226453e-40,8.677356561122244e-40,8.657316509018035e-40,8.637276456913826e-40,8.61723640480962e-40,8.59719635270541e-40,8.577156300601202e-40,8.557116248496993e-40,8.537076196392784e-40,8.517036144288577e-40,8.496996092184368e-40,8.47695604008016e-40,8.45691598797595e-40,8.436875935871744e-40,8.416835883767535e-40,8.396795831663326e-40,8.376755779559117e-40,8.356715727454909e-40,8.336675675350701e-40,8.316635623246493e-40,8.296595571142284e-40,8.276555519038075e-40,8.256515466933866e-40,8.23647541482966e-40,8.21643536272545e-40,8.196395310621242e-40,8.176355258517033e-40,8.156315206412826e-40,8.136275154308617e-40,8.116235102204408e-40,8.0961950501002e-40,8.076154997995991e-40,8.056114945891784e-40,8.036074893787575e-40,8.016034841683366e-40,7.995994789579157e-40,7.975954737474949e-40,7.955914685370742e-40,7.935874633266533e-40,7.915834581162324e-40,7.895794529058115e-40,7.875754476953906e-40,7.8557144248497e-40,7.83567437274549e-40,7.815634320641282e-40,7.795594268537073e-40,7.775554216432866e-40,7.755514164328657e-40,7.735474112224448e-40,7.71543406012024e-40,7.695394008016031e-40,7.675353955911824e-40,7.655313903807615e-40,7.635273851703406e-40,7.615233799599197e-40,7.595193747494989e-40,7.575153695390782e-40,7.555113643286573e-40,7.535073591182364e-40,7.515033539078155e-40,7.494993486973948e-40,7.47495343486974e-40,7.45491338276553e-40,7.434873330661322e-40,7.414833278557113e-40,7.394793226452906e-40,7.374753174348697e-40,7.354713122244488e-40,7.33467307014028e-40,7.314633018036072e-40,7.294592965931863e-40,7.274552913827655e-40,7.254512861723446e-40,7.234472809619238e-40,7.2144327575150296e-40,7.194392705410821e-40,7.174352653306613e-40,7.154312601202404e-40,7.134272549098196e-40,7.114232496993987e-40,7.0941924448897795e-40,7.074152392785571e-40,7.054112340681362e-40,7.034072288577154e-40,7.014032236472945e-40,6.993992184368737e-40,6.9739521322645285e-40,6.95391208016032e-40,6.933872028056112e-40,6.913831975951903e-40,6.893791923847695e-40,6.873751871743486e-40,6.853711819639278e-40,6.83367176753507e-40,6.813631715430861e-40,6.793591663326653e-40,6.773551611222444e-40,6.753511559118236e-40,6.7334715070140275e-40,6.7134314549098195e-40,6.693391402805611e-40,6.673351350701402e-40,6.653311298597194e-40,6.633271246492985e-40,6.613231194388777e-40,6.5931911422845686e-40,6.573151090180361e-40,6.553111038076152e-40,6.533070985971943e-40,6.513030933867735e-40,6.492990881763526e-40,6.4729508296593185e-40,6.45291077755511e-40,6.432870725450902e-40,6.412830673346693e-40,6.392790621242484e-40,6.372750569138276e-40,6.3527105170340675e-40,6.3326704649298596e-40,6.312630412825651e-40,6.292590360721442e-40,6.272550308617234e-40,6.252510256513025e-40,6.232470204408817e-40,6.212430152304609e-40,6.192390100200401e-40,6.172350048096192e-40,6.152309995991983e-40,6.132269943887775e-40,6.1122298917835665e-40,6.0921898396793585e-40,6.07214978757515e-40,6.052109735470942e-40,6.032069683366733e-40,6.012029631262524e-40,5.991989579158316e-40,5.9719495270541076e-40,5.9519094749499e-40,5.931869422845691e-40,5.911829370741483e-40,5.891789318637274e-40,5.871749266533065e-40,5.8517092144288574e-40,5.831669162324649e-40,5.811629110220441e-40,5.791589058116232e-40,5.771549006012024e-40,5.751508953907815e-40,5.7314689018036065e-40,5.7114288496993986e-40,5.69138879759519e-40,5.671348745490982e-40,5.651308693386773e-40,5.631268641282564e-40,5.611228589178356e-40,5.591188537074148e-40,5.57114848496994e-40,5.551108432865731e-40,5.531068380761523e-40,5.511028328657314e-40,5.4909882765531055e-40,5.4709482244488975e-40,5.450908172344689e-40,5.430868120240481e-40,5.410828068136272e-40,5.390788016032064e-40,5.370747963927855e-40,5.3507079118236466e-40,5.330667859719439e-40,5.31062780761523e-40,5.290587755511022e-40,5.270547703406813e-40,5.250507651302605e-40,5.2304675991983964e-40,5.210427547094188e-40,5.19038749498998e-40,5.170347442885771e-40,5.150307390781563e-40,5.130267338677354e-40,5.110227286573146e-40,5.0901872344689376e-40,5.070147182364729e-40,5.050107130260521e-40,5.030067078156312e-40,5.010027026052104e-40,4.989986973947895e-40,4.969946921843687e-40,4.949906869739479e-40,4.92986681763527e-40,4.909826765531062e-40,4.889786713426853e-40,4.869746661322645e-40,4.8497066092184365e-40,4.829666557114228e-40,4.80962650501002e-40,4.789586452905811e-40,4.769546400801603e-40,4.749506348697394e-40,4.729466296593186e-40,4.709426244488978e-40,4.689386192384769e-40,4.669346140280561e-40,4.649306088176352e-40,4.629266036072144e-40,4.6092259839679354e-40,4.5891859318637275e-40,4.569145879759519e-40,4.54910582765531e-40,4.529065775551102e-40,4.509025723446893e-40,4.488985671342685e-40,4.4689456192384766e-40,4.448905567134269e-40,4.42886551503006e-40,4.408825462925851e-40,4.388785410821643e-40,4.368745358717434e-40,4.3487053066132264e-40,4.328665254509018e-40,4.308625202404809e-40,4.288585150300601e-40,4.268545098196392e-40,4.248505046092184e-40,4.2284649939879755e-40,4.2084249418837676e-40,4.188384889779559e-40,4.16834483767535e-40,4.148304785571142e-40,4.128264733466933e-40,4.108224681362725e-40,4.088184629258517e-40,4.068144577154309e-40,4.0481045250501e-40,4.028064472945891e-40,4.008024420841683e-40,3.9879843687374744e-40,3.9679443166332665e-40,3.947904264529058e-40,3.92786421242485e-40,3.907824160320641e-40,3.887784108216432e-40,3.867744056112224e-40,3.8477040040080156e-40,3.827663951903808e-40,3.807623899799599e-40,3.787583847695391e-40,3.767543795591182e-40,3.747503743486973e-40,3.7274636913827654e-40,3.707423639278557e-40,3.687383587174349e-40,3.66734353507014e-40,3.6473034829659316e-40,3.6272634308617233e-40,3.607223378757515e-40,3.5871833266533066e-40,3.5671432745490978e-40,3.5471032224448894e-40,3.527063170340681e-40,3.5070231182364727e-40,3.4869830661322644e-40,3.466943014028056e-40,3.4469029619238473e-40,3.426862909819639e-40,3.4068228577154306e-40,3.3867828056112222e-40,3.366742753507014e-40,3.3467027014028055e-40,3.326662649298597e-40,3.3066225971943884e-40,3.28658254509018e-40,3.2665424929859717e-40,3.2465024408817633e-40,3.226462388777555e-40,3.2064223366733466e-40,3.186382284569138e-40,3.1663422324649295e-40,3.146302180360721e-40,3.1262621282565128e-40,3.1062220761523044e-40,3.086182024048096e-40,3.0661419719438877e-40,3.046101919839679e-40,3.0260618677354706e-40,3.0060218156312623e-40,2.985981763527054e-40,2.9659417114228456e-40,2.945901659318637e-40,2.925861607214429e-40,2.90582155511022e-40,2.8857815030060117e-40,2.8657414509018034e-40,2.845701398797595e-40,2.8256613466933867e-40,2.8056212945891783e-40,2.7855812424849696e-40,2.765541190380761e-40,2.745501138276553e-40,2.7254610861723445e-40,2.705421034068136e-40,2.6853809819639278e-40,2.6653409298597194e-40,2.6453008777555107e-40,2.6252608256513023e-40,2.605220773547094e-40,2.5851807214428856e-40,2.5651406693386773e-40,2.545100617234469e-40,2.52506056513026e-40,2.5050205130260518e-40,2.4849804609218434e-40,2.464940408817635e-40,2.4449003567134267e-40,2.4248603046092184e-40,2.40482025250501e-40,2.3847802004008013e-40,2.364740148296593e-40,2.3447000961923846e-40,2.324660044088176e-40,2.304619991983968e-40,2.2845799398797595e-40,2.264539887775551e-40,2.2444998356713424e-40,2.224459783567134e-40,2.2044197314629257e-40,2.1843796793587173e-40,2.164339627254509e-40,2.1442995751503006e-40,2.124259523046092e-40,2.1042194709418835e-40,2.084179418837675e-40,2.0641393667334668e-40,2.0440993146292584e-40,2.02405926252505e-40,2.0040192104208417e-40,1.983979158316633e-40,1.9639391062124246e-40,1.9438990541082163e-40,1.923859002004008e-40,1.9038189498997996e-40,1.883778897795591e-40,1.8637388456913824e-40,1.843698793587174e-40,1.8236587414829657e-40,1.8036186893787574e-40,1.783578637274549e-40,1.7635385851703405e-40,1.7434985330661321e-40,1.7234584809619238e-40,1.7034184288577154e-40,1.6833783767535068e-40,1.6633383246492985e-40,1.6432982725450901e-40,1.6232582204408816e-40,1.6032181683366732e-40,1.5831781162324649e-40,1.5631380641282563e-40,1.543098012024048e-40,1.5230579599198396e-40,1.5030179078156313e-40,1.4829778557114227e-40,1.4629378036072143e-40,1.442897751503006e-40,1.4228576993987974e-40,1.402817647294589e-40,1.3827775951903807e-40,1.3627375430861722e-40,1.3426974909819638e-40,1.3226574388777555e-40,1.302617386773547e-40,1.2825773346693385e-40,1.2625372825651302e-40,1.2424972304609218e-40,1.2224571783567133e-40,1.202417126252505e-40,1.1823770741482966e-40,1.162337022044088e-40,1.1422969699398797e-40,1.1222569178356713e-40,1.1022168657314628e-40,1.0821768136272544e-40,1.062136761523046e-40,1.0420967094188377e-40,1.0220566573146291e-40,1.0020166052104208e-40,9.819765531062124e-41,9.619365010020039e-41,9.418964488977955e-41,9.218563967935872e-41,9.018163446893787e-41,8.817762925851703e-41,8.617362404809619e-41,8.416961883767534e-41,8.21656136272545e-41,8.016160841683366e-41,7.815760320641282e-41,7.615359799599198e-41,7.414959278557114e-41,7.214558757515029e-41,7.014158236472946e-41,6.813757715430861e-41,6.613357194388778e-41,6.412956673346693e-41,6.212556152304608e-41,6.012155631262525e-41,5.81175511022044e-41,5.611354589178357e-41,5.410954068136272e-41,5.210553547094188e-41,5.010153026052104e-41,4.80975250501002e-41,4.609351983967936e-41,4.4089514629258515e-41,4.2085509418837674e-41,4.008150420841683e-41,3.807749899799599e-41,3.607349378757515e-41,3.4069488577154307e-41,3.2065483366733467e-41,3.006147815631262e-41,2.805747294589178e-41,2.605346773547094e-41,2.40494625250501e-41,2.2045457314629257e-41,2.0041452104208416e-41,1.8037446893787573e-41,1.6033441683366733e-41,1.402943647294589e-41,1.202543126252505e-41,1.0021426052104208e-41,8.017420841683366e-42,6.013415631262524e-42,4.009410420841683e-42,2.0054052104208415e-42,1.4e-45]} diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/tiny_positive.json b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/tiny_positive.json new file mode 100644 index 000000000000..e1ccbdb02b3c --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/tiny_positive.json @@ -0,0 +1 @@ +{"expected":[-69.07755,-69.07956,-69.081566,-69.08358,-69.0856,-69.08762,-69.08965,-69.09168,-69.09371,-69.09576,-69.09779,-69.099846,-69.1019,-69.10395,-69.10601,-69.10807,-69.110146,-69.11221,-69.11429,-69.11637,-69.11846,-69.120544,-69.12264,-69.12474,-69.12685,-69.12895,-69.131065,-69.13318,-69.1353,-69.13743,-69.13956,-69.14169,-69.14383,-69.14597,-69.148125,-69.150276,-69.152435,-69.154594,-69.15676,-69.158936,-69.16111,-69.16329,-69.165474,-69.16766,-69.16986,-69.17206,-69.17426,-69.176476,-69.17869,-69.18091,-69.183136,-69.18536,-69.1876,-69.18984,-69.192085,-69.194336,-69.19659,-69.19885,-69.20111,-69.203384,-69.20566,-69.20794,-69.21023,-69.21252,-69.21481,-69.21712,-69.21942,-69.22173,-69.22405,-69.22637,-69.2287,-69.23103,-69.233376,-69.23572,-69.23807,-69.240425,-69.24279,-69.245155,-69.24753,-69.2499,-69.25229,-69.25468,-69.25707,-69.259476,-69.26188,-69.26429,-69.26671,-69.269135,-69.27157,-69.274,-69.27644,-69.27889,-69.28135,-69.283806,-69.28627,-69.28874,-69.29122,-69.29371,-69.296196,-69.29869,-69.3012,-69.3037,-69.30622,-69.30875,-69.31127,-69.313805,-69.31635,-69.31889,-69.32145,-69.32401,-69.32658,-69.329155,-69.33173,-69.33432,-69.336914,-69.339516,-69.342125,-69.34474,-69.34736,-69.34999,-69.35262,-69.35526,-69.35791,-69.36057,-69.363235,-69.365906,-69.36858,-69.37126,-69.373955,-69.376656,-69.379364,-69.38207,-69.384796,-69.38753,-69.39026,-69.393005,-69.39576,-69.39851,-69.40128,-69.40405,-69.40684,-69.40962,-69.41242,-69.41523,-69.41804,-69.42086,-69.42369,-69.42653,-69.429375,-69.43223,-69.43509,-69.43796,-69.440834,-69.44372,-69.44662,-69.44952,-69.45243,-69.455345,-69.458275,-69.46121,-69.46416,-69.46711,-69.47008,-69.473045,-69.47603,-69.47902,-69.48202,-69.48502,-69.48804,-69.491066,-69.4941,-69.49715,-69.5002,-69.50326,-69.50633,-69.509415,-69.512505,-69.51561,-69.518715,-69.521835,-69.52497,-69.52811,-69.53126,-69.53442,-69.53759,-69.540764,-69.54395,-69.54716,-69.55037,-69.55359,-69.556816,-69.56006,-69.56331,-69.566574,-69.56985,-69.57313,-69.57642,-69.579735,-69.583046,-69.58638,-69.589714,-69.59306,-69.59643,-69.5998,-69.60318,-69.60658,-69.609985,-69.6134,-69.61684,-69.62028,-69.62373,-69.6272,-69.63068,-69.63417,-69.63767,-69.64118,-69.644714,-69.648254,-69.6518,-69.65537,-69.65895,-69.66254,-69.66614,-69.66976,-69.673386,-69.67703,-69.68069,-69.68436,-69.68804,-69.691734,-69.69545,-69.69917,-69.70291,-69.706665,-69.71043,-69.71421,-69.718,-69.72182,-69.72564,-69.72948,-69.73333,-69.7372,-69.74108,-69.74498,-69.74889,-69.75282,-69.75677,-69.76073,-69.76471,-69.7687,-69.772705,-69.77673,-69.78077,-69.78483,-69.7889,-69.79299,-69.7971,-69.80122,-69.80536,-69.80952,-69.8137,-69.81789,-69.8221,-69.826324,-69.830574,-69.83484,-69.83912,-69.84342,-69.84774,-69.85208,-69.85644,-69.86082,-69.86521,-69.86962,-69.87406,-69.87851,-69.88299,-69.88748,-69.892,-69.89653,-69.901085,-69.90566,-69.91026,-69.91488,-69.91952,-69.92418,-69.92886,-69.93357,-69.9383,-69.943054,-69.94782,-69.95262,-69.95744,-69.96228,-69.96715,-69.97204,-69.97695,-69.98189,-69.986855,-69.991844,-69.99686,-70.00189,-70.00696,-70.01205,-70.01716,-70.0223,-70.027466,-70.03266,-70.03789,-70.04314,-70.04841,-70.05372,-70.05905,-70.064415,-70.0698,-70.075226,-70.08067,-70.08615,-70.09166,-70.0972,-70.102776,-70.108376,-70.114006,-70.119675,-70.125374,-70.1311,-70.13686,-70.14266,-70.1485,-70.15436,-70.16026,-70.16619,-70.172165,-70.17817,-70.18421,-70.19029,-70.19641,-70.20256,-70.208755,-70.21499,-70.22125,-70.22756,-70.23391,-70.2403,-70.246735,-70.253204,-70.25972,-70.26628,-70.27288,-70.279526,-70.28621,-70.292946,-70.29973,-70.30655,-70.31342,-70.32034,-70.32732,-70.334335,-70.3414,-70.34852,-70.35568,-70.36291,-70.37018,-70.3775,-70.38489,-70.39232,-70.39981,-70.40736,-70.41496,-70.42262,-70.43034,-70.438126,-70.44597,-70.45388,-70.461845,-70.46988,-70.477974,-70.48614,-70.49437,-70.50267,-70.51103,-70.51948,-70.527985,-70.53657,-70.54523,-70.55396,-70.562775,-70.57166,-70.58063,-70.589676,-70.59881,-70.608025,-70.61733,-70.62672,-70.6362,-70.64577,-70.65543,-70.665184,-70.67504,-70.68499,-70.69504,-70.70519,-70.71545,-70.72581,-70.73628,-70.746864,-70.75756,-70.76837,-70.7793,-70.79035,-70.80152,-70.81282,-70.82425,-70.83581,-70.84751,-70.859344,-70.871315,-70.88344,-70.895706,-70.908134,-70.92071,-70.93345,-70.94635,-70.95943,-70.97267,-70.98609,-70.9997,-71.0135,-71.02748,-71.041664,-71.05605,-71.07065,-71.085464,-71.1005,-71.11577,-71.13128,-71.147026,-71.163025,-71.17928,-71.195816,-71.21262,-71.22971,-71.24711,-71.26481,-71.28283,-71.30118,-71.31987,-71.33891,-71.35833,-71.378136,-71.39834,-71.41896,-71.44001,-71.46152,-71.4835,-71.50597,-71.52896,-71.55249,-71.576584,-71.60128,-71.626595,-71.65257,-71.67924,-71.70664,-71.73481,-71.7638,-71.79365,-71.824425,-71.85617,-71.88896,-71.92286,-71.957954,-71.99432,-72.03206,-72.07128,-72.11211,-72.15466,-72.19912,-72.245636,-72.294426,-72.34572,-72.39979,-72.45695,-72.51757,-72.58211,-72.6511,-72.72521,-72.80525,-72.892265,-72.98757,-73.09293,-73.21072,-73.344246,-73.4984,-73.68072,-73.90386,-74.19154,-74.59701,-75.29015,-87.49823],"x":[1.0e-30,9.979959920040082e-31,9.95991984008016e-31,9.939879760120242e-31,9.91983968016032e-31,9.899799600200402e-31,9.879759520240483e-31,9.859719440280562e-31,9.839679360320643e-31,9.819639280360722e-31,9.799599200400803e-31,9.779559120440882e-31,9.759519040480963e-31,9.739478960521044e-31,9.719438880561123e-31,9.699398800601204e-31,9.679358720641283e-31,9.659318640681364e-31,9.639278560721445e-31,9.619238480761524e-31,9.599198400801605e-31,9.579158320841684e-31,9.559118240881765e-31,9.539078160921844e-31,9.519038080961925e-31,9.498998001002005e-31,9.478957921042085e-31,9.458917841082165e-31,9.438877761122245e-31,9.418837681162326e-31,9.398797601202406e-31,9.378757521242486e-31,9.358717441282566e-31,9.338677361322646e-31,9.318637281362726e-31,9.298597201402806e-31,9.278557121442886e-31,9.258517041482967e-31,9.238476961523046e-31,9.218436881563127e-31,9.198396801603207e-31,9.178356721643287e-31,9.158316641683368e-31,9.138276561723447e-31,9.118236481763528e-31,9.098196401803607e-31,9.078156321843688e-31,9.058116241883767e-31,9.038076161923848e-31,9.01803608196393e-31,8.997996002004008e-31,8.97795592204409e-31,8.957915842084168e-31,8.93787576212425e-31,8.91783568216433e-31,8.89779560220441e-31,8.87775552224449e-31,8.85771544228457e-31,8.83767536232465e-31,8.81763528236473e-31,8.79759520240481e-31,8.777555122444891e-31,8.75751504248497e-31,8.737474962525051e-31,8.71743488256513e-31,8.697394802605211e-31,8.677354722645292e-31,8.657314642685371e-31,8.637274562725452e-31,8.617234482765531e-31,8.597194402805612e-31,8.577154322845693e-31,8.557114242885772e-31,8.537074162925853e-31,8.517034082965932e-31,8.496994003006013e-31,8.476953923046092e-31,8.456913843086173e-31,8.436873763126254e-31,8.416833683166333e-31,8.396793603206414e-31,8.376753523246493e-31,8.356713443286574e-31,8.336673363326655e-31,8.316633283366734e-31,8.296593203406815e-31,8.276553123446894e-31,8.256513043486975e-31,8.236472963527054e-31,8.216432883567135e-31,8.196392803607216e-31,8.176352723647295e-31,8.156312643687376e-31,8.136272563727455e-31,8.116232483767536e-31,8.096192403807617e-31,8.076152323847696e-31,8.056112243887777e-31,8.036072163927856e-31,8.016032083967937e-31,7.995992004008016e-31,7.975951924048097e-31,7.955911844088178e-31,7.935871764128257e-31,7.915831684168338e-31,7.895791604208417e-31,7.875751524248498e-31,7.855711444288578e-31,7.835671364328658e-31,7.815631284368738e-31,7.795591204408819e-31,7.775551124448899e-31,7.755511044488979e-31,7.735470964529059e-31,7.715430884569139e-31,7.695390804609219e-31,7.6753507246493e-31,7.65531064468938e-31,7.63527056472946e-31,7.61523048476954e-31,7.59519040480962e-31,7.5751503248497e-31,7.5551102448897805e-31,7.5350701649298605e-31,7.5150300849699405e-31,7.4949900050100205e-31,7.4749499250501005e-31,7.4549098450901806e-31,7.4348697651302614e-31,7.4148296851703415e-31,7.3947896052104215e-31,7.3747495252505015e-31,7.3547094452905815e-31,7.3346693653306615e-31,7.314629285370742e-31,7.294589205410822e-31,7.274549125450902e-31,7.254509045490982e-31,7.234468965531062e-31,7.214428885571143e-31,7.194388805611223e-31,7.174348725651303e-31,7.154308645691383e-31,7.134268565731463e-31,7.114228485771543e-31,7.094188405811624e-31,7.074148325851704e-31,7.054108245891784e-31,7.034068165931864e-31,7.014028085971944e-31,6.993988006012024e-31,6.973947926052105e-31,6.953907846092185e-31,6.933867766132265e-31,6.913827686172345e-31,6.893787606212425e-31,6.873747526252505e-31,6.853707446292586e-31,6.833667366332666e-31,6.813627286372746e-31,6.793587206412826e-31,6.773547126452906e-31,6.753507046492986e-31,6.733466966533067e-31,6.713426886573147e-31,6.693386806613227e-31,6.673346726653307e-31,6.653306646693387e-31,6.633266566733467e-31,6.613226486773548e-31,6.593186406813628e-31,6.573146326853708e-31,6.553106246893788e-31,6.533066166933868e-31,6.513026086973948e-31,6.492986007014029e-31,6.472945927054109e-31,6.452905847094189e-31,6.432865767134269e-31,6.412825687174349e-31,6.392785607214429e-31,6.37274552725451e-31,6.35270544729459e-31,6.33266536733467e-31,6.31262528737475e-31,6.29258520741483e-31,6.27254512745491e-31,6.252505047494991e-31,6.232464967535071e-31,6.212424887575151e-31,6.192384807615231e-31,6.172344727655311e-31,6.152304647695391e-31,6.132264567735472e-31,6.112224487775552e-31,6.092184407815632e-31,6.072144327855712e-31,6.052104247895792e-31,6.032064167935872e-31,6.012024087975953e-31,5.991984008016033e-31,5.971943928056113e-31,5.951903848096193e-31,5.931863768136273e-31,5.911823688176354e-31,5.891783608216434e-31,5.871743528256514e-31,5.851703448296594e-31,5.831663368336674e-31,5.811623288376754e-31,5.791583208416835e-31,5.771543128456915e-31,5.751503048496995e-31,5.731462968537075e-31,5.711422888577155e-31,5.691382808617235e-31,5.6713427286573155e-31,5.6513026486973955e-31,5.6312625687374755e-31,5.6112224887775555e-31,5.5911824088176355e-31,5.5711423288577156e-31,5.5511022488977964e-31,5.5310621689378765e-31,5.5110220889779565e-31,5.4909820090180365e-31,5.4709419290581165e-31,5.4509018490981965e-31,5.430861769138277e-31,5.410821689178357e-31,5.390781609218437e-31,5.370741529258517e-31,5.350701449298597e-31,5.330661369338677e-31,5.310621289378758e-31,5.290581209418838e-31,5.270541129458918e-31,5.250501049498998e-31,5.230460969539078e-31,5.210420889579158e-31,5.190380809619239e-31,5.170340729659319e-31,5.150300649699399e-31,5.130260569739479e-31,5.110220489779559e-31,5.090180409819639e-31,5.07014032985972e-31,5.0501002498998e-31,5.03006016993988e-31,5.01002008997996e-31,4.98998001002004e-31,4.96993993006012e-31,4.949899850100201e-31,4.929859770140281e-31,4.909819690180361e-31,4.889779610220441e-31,4.869739530260521e-31,4.849699450300601e-31,4.829659370340682e-31,4.809619290380762e-31,4.789579210420842e-31,4.769539130460922e-31,4.749499050501002e-31,4.729458970541082e-31,4.709418890581163e-31,4.689378810621243e-31,4.669338730661323e-31,4.649298650701403e-31,4.629258570741483e-31,4.609218490781564e-31,4.589178410821644e-31,4.569138330861724e-31,4.549098250901804e-31,4.529058170941884e-31,4.509018090981964e-31,4.488978011022045e-31,4.468937931062125e-31,4.448897851102205e-31,4.428857771142285e-31,4.408817691182365e-31,4.388777611222445e-31,4.368737531262526e-31,4.348697451302606e-31,4.328657371342686e-31,4.308617291382766e-31,4.288577211422846e-31,4.268537131462926e-31,4.248497051503007e-31,4.228456971543087e-31,4.208416891583167e-31,4.188376811623247e-31,4.168336731663327e-31,4.148296651703407e-31,4.128256571743488e-31,4.108216491783568e-31,4.088176411823648e-31,4.068136331863728e-31,4.048096251903808e-31,4.028056171943888e-31,4.008016091983969e-31,3.987976012024049e-31,3.967935932064129e-31,3.947895852104209e-31,3.927855772144289e-31,3.907815692184369e-31,3.887775612224449e-31,3.8677355322645296e-31,3.8476954523046096e-31,3.8276553723446896e-31,3.80761529238477e-31,3.78757521242485e-31,3.76753513246493e-31,3.7474950525050105e-31,3.7274549725450905e-31,3.7074148925851705e-31,3.687374812625251e-31,3.667334732665331e-31,3.647294652705411e-31,3.6272545727454915e-31,3.6072144927855715e-31,3.5871744128256515e-31,3.567134332865732e-31,3.547094252905812e-31,3.527054172945892e-31,3.5070140929859724e-31,3.4869740130260524e-31,3.4669339330661324e-31,3.446893853106213e-31,3.426853773146293e-31,3.406813693186373e-31,3.3867736132264533e-31,3.3667335332665334e-31,3.3466934533066134e-31,3.326653373346694e-31,3.306613293386774e-31,3.286573213426854e-31,3.2665331334669343e-31,3.2464930535070143e-31,3.2264529735470943e-31,3.2064128935871747e-31,3.1863728136272548e-31,3.1663327336673348e-31,3.146292653707415e-31,3.1262525737474952e-31,3.1062124937875752e-31,3.0861724138276557e-31,3.0661323338677357e-31,3.0460922539078157e-31,3.026052173947896e-31,3.006012093987976e-31,2.985972014028056e-31,2.9659319340681366e-31,2.9458918541082166e-31,2.9258517741482966e-31,2.905811694188377e-31,2.885771614228457e-31,2.865731534268537e-31,2.8456914543086176e-31,2.8256513743486976e-31,2.8056112943887776e-31,2.785571214428858e-31,2.765531134468938e-31,2.745491054509018e-31,2.7254509745490985e-31,2.7054108945891785e-31,2.6853708146292585e-31,2.665330734669339e-31,2.645290654709419e-31,2.6252505747494994e-31,2.6052104947895794e-31,2.5851704148296595e-31,2.56513033486974e-31,2.54509025490982e-31,2.5250501749499e-31,2.5050100949899804e-31,2.4849700150300604e-31,2.4649299350701404e-31,2.444889855110221e-31,2.424849775150301e-31,2.404809695190381e-31,2.3847696152304613e-31,2.3647295352705413e-31,2.3446894553106213e-31,2.3246493753507018e-31,2.304609295390782e-31,2.284569215430862e-31,2.2645291354709422e-31,2.2444890555110223e-31,2.2244489755511023e-31,2.2044088955911827e-31,2.1843688156312627e-31,2.1643287356713427e-31,2.144288655711423e-31,2.124248575751503e-31,2.104208495791583e-31,2.0841684158316637e-31,2.0641283358717437e-31,2.0440882559118237e-31,2.024048175951904e-31,2.004008095991984e-31,1.983968016032064e-31,1.9639279360721444e-31,1.9438878561122246e-31,1.9238477761523048e-31,1.9038076961923848e-31,1.883767616232465e-31,1.8637275362725453e-31,1.8436874563126253e-31,1.8236473763527055e-31,1.8036072963927858e-31,1.7835672164328658e-31,1.763527136472946e-31,1.7434870565130262e-31,1.7234469765531063e-31,1.7034068965931865e-31,1.6833668166332667e-31,1.663326736673347e-31,1.643286656713427e-31,1.6232465767535072e-31,1.6032064967935874e-31,1.5831664168336674e-31,1.5631263368737477e-31,1.5430862569138279e-31,1.5230461769539079e-31,1.5030060969939881e-31,1.4829660170340683e-31,1.4629259370741484e-31,1.4428858571142286e-31,1.4228457771543088e-31,1.4028056971943888e-31,1.382765617234469e-31,1.3627255372745493e-31,1.3426854573146293e-31,1.3226453773547095e-31,1.3026052973947898e-31,1.2825652174348698e-31,1.26252513747495e-31,1.2424850575150302e-31,1.2224449775551102e-31,1.2024048975951905e-31,1.1823648176352707e-31,1.1623247376753507e-31,1.142284657715431e-31,1.1222445777555112e-31,1.1022044977955912e-31,1.0821644178356714e-31,1.0621243378757516e-31,1.0420842579158316e-31,1.0220441779559119e-31,1.002004097995992e-31,9.819640180360722e-32,9.619239380761523e-32,9.418838581162326e-32,9.218437781563127e-32,9.018036981963928e-32,8.81763618236473e-32,8.617235382765532e-32,8.416834583166333e-32,8.216433783567135e-32,8.016032983967936e-32,7.815632184368739e-32,7.61523138476954e-32,7.414830585170341e-32,7.214429785571143e-32,7.014028985971945e-32,6.813628186372746e-32,6.613227386773548e-32,6.412826587174349e-32,6.21242578757515e-32,6.012024987975953e-32,5.811624188376754e-32,5.611223388777555e-32,5.410822589178357e-32,5.210421789579159e-32,5.01002098997996e-32,4.809620190380762e-32,4.6092193907815633e-32,4.408818591182365e-32,4.208417791583167e-32,4.0080169919839685e-32,3.80761619238477e-32,3.6072153927855715e-32,3.406814593186373e-32,3.2064137935871744e-32,3.006012993987976e-32,2.805612194388778e-32,2.605211394789579e-32,2.4048105951903809e-32,2.2044097955911826e-32,2.004008995991984e-32,1.8036081963927858e-32,1.6032073967935873e-32,1.4028065971943888e-32,1.2024057975951905e-32,1.0020049979959921e-32,8.016041983967936e-33,6.012033987975952e-33,4.008025991983968e-33,2.004017995991984e-33,1.0e-38]} diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/very_large_positive.json b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/very_large_positive.json new file mode 100644 index 000000000000..d4832e4e27e7 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/test/fixtures/julia/very_large_positive.json @@ -0,0 +1 @@ +{"expected":[3.912023,3.9298983,3.9474597,3.964718,3.9816837,3.998366,4.014775,4.0309186,4.0468063,4.062445,4.077843,4.0930076,4.107946,4.122664,4.1371684,4.151466,4.1655617,4.1794615,4.1931705,4.2066946,4.220038,4.233206,4.2462025,4.2590322,4.2716994,4.2842083,4.2965627,4.3087664,4.3208227,4.3327355,4.3445077,4.3561435,4.3676453,4.379016,4.3902593,4.401377,4.412373,4.4232492,4.4340086,4.444653,4.455186,4.4656086,4.475924,4.486134,4.4962406,4.506246,4.516153,4.5259624,4.535676,4.5452967,4.554826,4.564265,4.5736156,4.5828795,4.5920587,4.6011543,4.6101675,4.6191006,4.627955,4.636731,4.645431,4.6540556,4.6626067,4.6710854,4.679493,4.68783,4.6960983,4.704299,4.712433,4.720501,4.7285047,4.7364445,4.744322,4.752138,4.7598934,4.767589,4.7752256,4.782805,4.7903266,4.7977924,4.805203,4.812559,4.8198614,4.827111,4.8343077,4.8414536,4.8485484,4.8555937,4.8625894,4.8695364,4.8764358,4.8832874,4.890093,4.8968525,4.9035664,4.9102354,4.91686,4.923442,4.9299803,4.9364758,4.9429297,4.9493423,4.955714,4.9620457,4.968337,4.9745893,4.9808025,4.9869776,4.9931145,4.999214,5.005277,5.011303,5.017293,5.0232472,5.0291667,5.035051,5.0409007,5.0467167,5.052499,5.058248,5.063964,5.069648,5.0752993,5.080919,5.0865073,5.0920644,5.097591,5.1030874,5.1085534,5.11399,5.1193967,5.124775,5.130124,5.1354446,5.1407375,5.146002,5.151239,5.156449,5.161632,5.166788,5.1719174,5.177021,5.182099,5.1871505,5.1921773,5.197179,5.202155,5.207107,5.212034,5.2169375,5.221817,5.2266726,5.231505,5.236314,5.2411,5.245863,5.2506037,5.255322,5.260018,5.2646923,5.2693443,5.2739754,5.278585,5.283173,5.2877407,5.2922873,5.296813,5.3013186,5.3058043,5.31027,5.3147154,5.319141,5.3235474,5.3279347,5.3323026,5.3366513,5.3409815,5.3452926,5.3495855,5.35386,5.3581166,5.3623548,5.3665752,5.3707776,5.374963,5.3791304,5.3832808,5.387414,5.39153,5.3956294,5.399712,5.403778,5.4078274,5.411861,5.415878,5.4198785,5.4238634,5.4278326,5.431786,5.435724,5.4396462,5.4435534,5.4474454,5.451322,5.455184,5.459031,5.4628634,5.466681,5.470484,5.4742727,5.478047,5.481807,5.4855533,5.4892855,5.493004,5.4967084,5.500399,5.504076,5.50774,5.51139,5.5150275,5.5186515,5.522262,5.52586,5.529445,5.533017,5.5365767,5.5401235,5.543658,5.547179,5.5506887,5.554186,5.557671,5.561144,5.5646048,5.5680537,5.571491,5.5749164,5.57833,5.581732,5.585122,5.5885015,5.591869,5.5952253,5.5985703,5.6019044,5.605227,5.608539,5.6118402,5.61513,5.6184096,5.621678,5.624936,5.6281834,5.63142,5.6346464,5.6378627,5.641068,5.6442637,5.647449,5.6506243,5.653789,5.6569443,5.6600895,5.6632247,5.6663504,5.669466,5.672572,5.6756687,5.6787558,5.6818333,5.684901,5.6879597,5.691009,5.6940494,5.69708,5.700102,5.703114,5.7061176,5.709112,5.7120976,5.7150745,5.7180424,5.7210016,5.723952,5.7268934,5.7298265,5.732751,5.7356668,5.7385745,5.741473,5.744364,5.7472463,5.75012,5.752986,5.7558436,5.758693,5.7615347,5.7643676,5.7671933,5.7700105,5.77282,5.7756214,5.778415,5.781201,5.7839794,5.78675,5.7895126,5.792268,5.795016,5.7977557,5.8004885,5.8032136,5.8059316,5.808642,5.811345,5.8140407,5.8167295,5.819411,5.822085,5.824752,5.827412,5.830065,5.8327107,5.8353496,5.8379817,5.8406067,5.843225,5.845836,5.8484406,5.8510385,5.8536296,5.856214,5.858792,5.861363,5.8639274,5.866485,5.8690367,5.8715816,5.8741198,5.876652,5.8791776,5.8816967,5.8842096,5.8867164,5.8892164,5.8917108,5.8941984,5.8966804,5.899156,5.901625,5.904089,5.906546,5.9089975,5.9114428,5.9138823,5.9163156,5.918743,5.9211645,5.9235806,5.9259906,5.9283943,5.930793,5.9331856,5.9355726,5.937954,5.9403296,5.9426994,5.9450636,5.9474225,5.9497757,5.9521236,5.954466,5.9568024,5.959134,5.9614596,5.9637804,5.9660954,5.9684052,5.97071,5.9730086,5.9753027,5.977591,5.9798746,5.982153,5.984426,5.986694,5.9889565,5.991214,5.9934664,5.995714,5.9979563,6.000194,6.002426,6.004654,6.0068765,6.0090938,6.0113063,6.013514,6.015717,6.0179152,6.0201087,6.022297,6.024481,6.0266595,6.028834,6.031003,6.033168,6.035328,6.037483,6.039634,6.0417805,6.043922,6.046059,6.0481915,6.050319,6.0524426,6.0545616,6.056676,6.058786,6.0608916,6.0629926,6.065089,6.0671816,6.0692697,6.071353,6.0734324,6.075507,6.077578,6.079644,6.0817065,6.083764,6.085818,6.0878673,6.0899124,6.0919533,6.0939903,6.096023,6.0980515,6.100076,6.1020966,6.104113,6.1061254,6.108134,6.110138,6.1121383,6.1141343,6.1161265,6.118115,6.120099,6.12208,6.1240563,6.1260285,6.1279974,6.1299624,6.131923,6.1338806,6.1358337,6.1377835,6.139729,6.141671,6.143609,6.1455436,6.1474743,6.149401,6.1513247,6.153244,6.15516,6.1570725,6.158981,6.160886,6.1627874,6.1646852,6.1665792,6.16847,6.1703568,6.1722403,6.17412,6.1759963,6.1778693,6.1797385,6.1816044,6.183467,6.1853256,6.1871815,6.1890335,6.1908817,6.192727,6.194569,6.1964073,6.1982427,6.200074,6.2019024,6.2037272,6.2055492,6.2073674,6.2091827,6.2109942,6.212803,6.214608],"x":[50.0,50.901803607214426,51.80360721442886,52.705410821643284,53.607214428857716,54.50901803607214,55.410821643286575,56.312625250501,57.21442885771543,58.11623246492986,59.01803607214429,59.91983967935872,60.82164328657315,61.723446893787575,62.62525050100201,63.52705410821643,64.42885771543087,65.33066132264528,66.23246492985972,67.13426853707415,68.03607214428858,68.937875751503,69.83967935871743,70.74148296593187,71.6432865731463,72.54509018036072,73.44689378757515,74.34869739478958,75.25050100200401,76.15230460921843,77.05410821643287,77.9559118236473,78.85771543086172,79.75951903807615,80.66132264529058,81.56312625250501,82.46492985971943,83.36673346693387,84.2685370741483,85.17034068136273,86.07214428857715,86.97394789579158,87.87575150300601,88.77755511022045,89.67935871743487,90.5811623246493,91.48296593186373,92.38476953907815,93.28657314629258,94.18837675350701,95.09018036072145,95.99198396793587,96.8937875751503,97.79559118236473,98.69739478957916,99.59919839679358,100.50100200400801,101.40280561122245,102.30460921843688,103.2064128256513,104.10821643286573,105.01002004008016,105.91182364729458,106.81362725450902,107.71543086172345,108.61723446893788,109.5190380761523,110.42084168336673,111.32264529058116,112.2244488977956,113.12625250501002,114.02805611222445,114.92985971943888,115.83166332665331,116.73346693386773,117.63527054108216,118.5370741482966,119.43887775551102,120.34068136272545,121.24248496993988,122.14428857715431,123.04609218436873,123.94789579158316,124.8496993987976,125.75150300601203,126.65330661322645,127.55511022044088,128.4569138276553,129.35871743486973,130.26052104208418,131.1623246492986,132.06412825651302,132.96593186372746,133.86773547094188,134.7695390781563,135.67134268537075,136.57314629258516,137.4749498997996,138.37675350701403,139.27855711422845,140.1803607214429,141.0821643286573,141.98396793587173,142.88577154308618,143.7875751503006,144.68937875751504,145.59118236472946,146.49298597194388,147.39478957915833,148.29659318637275,149.19839679358716,150.1002004008016,151.00200400801603,151.90380761523045,152.8056112224449,153.7074148296593,154.60921843687376,155.51102204408818,156.4128256513026,157.31462925851704,158.21643286573146,159.11823647294588,160.02004008016033,160.92184368737475,161.82364729458916,162.7254509018036,163.62725450901803,164.52905811623248,165.4308617234469,166.3326653306613,167.23446893787576,168.13627254509018,169.0380761523046,169.93987975951904,170.84168336673346,171.7434869739479,172.64529058116233,173.54709418837675,174.4488977955912,175.3507014028056,176.25250501002003,177.15430861723448,178.0561122244489,178.9579158316633,179.85971943887776,180.76152304609218,181.66332665330663,182.56513026052104,183.46693386773546,184.3687374749499,185.27054108216433,186.17234468937875,187.0741482965932,187.9759519038076,188.87775551102203,189.77955911823648,190.6813627254509,191.58316633266534,192.48496993987976,193.38677354709418,194.28857715430863,195.19038076152304,196.09218436873746,196.9939879759519,197.89579158316633,198.79759519038078,199.6993987975952,200.6012024048096,201.50300601202406,202.40480961923848,203.3066132264529,204.20841683366734,205.11022044088176,206.01202404809618,206.91382765531063,207.81563126252505,208.7174348697395,209.6192384769539,210.52104208416833,211.42284569138278,212.3246492985972,213.2264529058116,214.12825651302606,215.03006012024048,215.9318637274549,216.83366733466934,217.73547094188376,218.6372745490982,219.53907815631263,220.44088176352705,221.3426853707415,222.2444889779559,223.14629258517033,224.04809619238478,224.9498997995992,225.85170340681364,226.75350701402806,227.65531062124248,228.55711422845692,229.45891783567134,230.36072144288576,231.2625250501002,232.16432865731463,233.06613226452905,233.9679358717435,234.8697394789579,235.77154308617236,236.67334669338678,237.5751503006012,238.47695390781564,239.37875751503006,240.28056112224448,241.18236472945893,242.08416833667334,242.98597194388776,243.8877755511022,244.78957915831663,245.69138276553107,246.5931863727455,247.4949899799599,248.39679358717436,249.29859719438878,250.2004008016032,251.10220440881764,252.00400801603206,252.9058116232465,253.80761523046093,254.70941883767534,255.6112224448898,256.5130260521042,257.4148296593186,258.3166332665331,259.2184368737475,260.1202404809619,261.02204408817636,261.9238476953908,262.8256513026052,263.72745490981964,264.6292585170341,265.5310621242485,266.4328657314629,267.3346693386774,268.23647294589176,269.1382765531062,270.04008016032066,270.94188376753505,271.8436873747495,272.74549098196394,273.64729458917833,274.5490981963928,275.4509018036072,276.35270541082167,277.25450901803606,278.1563126252505,279.05811623246495,279.95991983967934,280.8617234468938,281.76352705410824,282.6653306613226,283.5671342685371,284.4689378757515,285.3707414829659,286.27254509018036,287.1743486973948,288.0761523046092,288.97795591182364,289.8797595190381,290.7815631262525,291.6833667334669,292.5851703406814,293.4869739478958,294.3887775551102,295.29058116232466,296.1923847695391,297.0941883767535,297.99599198396794,298.8977955911824,299.7995991983968,300.7014028056112,301.60320641282567,302.50501002004006,303.4068136272545,304.30861723446895,305.21042084168334,306.1122244488978,307.01402805611224,307.9158316633266,308.8176352705411,309.7194388777555,310.6212424849699,311.52304609218436,312.4248496993988,313.32665330661325,314.22845691382764,315.1302605210421,316.03206412825654,316.9338677354709,317.8356713426854,318.7374749498998,319.6392785571142,320.54108216432866,321.4428857715431,322.3446893787575,323.24649298597194,324.1482965931864,325.0501002004008,325.9519038076152,326.85370741482967,327.75551102204406,328.6573146292585,329.55911823647295,330.4609218436874,331.3627254509018,332.26452905811624,333.1663326653307,334.0681362725451,334.9699398797595,335.87174348697397,336.77354709418836,337.6753507014028,338.57715430861725,339.47895791583164,340.3807615230461,341.28256513026054,342.1843687374749,343.0861723446894,343.9879759519038,344.8897795591182,345.79158316633266,346.6933867735471,347.59519038076155,348.49699398797594,349.3987975951904,350.30060120240483,351.2024048096192,352.10420841683367,353.0060120240481,353.9078156312625,354.80961923847696,355.7114228456914,356.6132264529058,357.51503006012024,358.4168336673347,359.3186372745491,360.2204408817635,361.12224448897797,362.02404809619236,362.9258517034068,363.82765531062125,364.72945891783564,365.6312625250501,366.53306613226454,367.434869739479,368.3366733466934,369.2384769539078,370.14028056112227,371.04208416833666,371.9438877755511,372.84569138276555,373.74749498997994,374.6492985971944,375.55110220440883,376.4529058116232,377.3547094188377,378.2565130260521,379.1583166332665,380.06012024048096,380.9619238476954,381.8637274549098,382.76553106212424,383.6673346693387,384.56913827655313,385.4709418837675,386.37274549098197,387.2745490981964,388.1763527054108,389.07815631262525,389.9799599198397,390.8817635270541,391.78356713426854,392.685370741483,393.5871743486974,394.4889779559118,395.39078156312627,396.29258517034066,397.1943887775551,398.09619238476955,398.99799599198394,399.8997995991984,400.80160320641284,401.7034068136273,402.6052104208417,403.5070140280561,404.40881763527057,405.31062124248496,406.2124248496994,407.11422845691385,408.01603206412824,408.9178356713427,409.81963927855713,410.7214428857715,411.62324649298597,412.5250501002004,413.4268537074148,414.32865731462925,415.2304609218437,416.1322645290581,417.03406813627254,417.935871743487,418.8376753507014,419.7394789579158,420.64128256513027,421.5430861723447,422.4448897795591,423.34669338677355,424.248496993988,425.1503006012024,426.05210420841684,426.9539078156313,427.8557114228457,428.7575150300601,429.65931863727457,430.56112224448896,431.4629258517034,432.36472945891785,433.26653306613224,434.1683366733467,435.07014028056113,435.9719438877755,436.87374749498997,437.7755511022044,438.67735470941886,439.57915831663325,440.4809619238477,441.38276553106215,442.28456913827654,443.186372745491,444.08817635270543,444.9899799599198,445.89178356713427,446.7935871743487,447.6953907815631,448.59719438877755,449.498997995992,450.4008016032064,451.30260521042084,452.2044088176353,453.1062124248497,454.0080160320641,454.90981963927857,455.811623246493,456.7134268537074,457.61523046092185,458.5170340681363,459.4188376753507,460.32064128256513,461.2224448897796,462.12424849699397,463.0260521042084,463.92785571142286,464.82965931863725,465.7314629258517,466.63326653306615,467.53507014028054,468.436873747495,469.33867735470943,470.2404809619238,471.14228456913827,472.0440881763527,472.9458917835671,473.84769539078155,474.749498997996,475.65130260521045,476.55310621242484,477.4549098196393,478.35671342685373,479.2585170340681,480.16032064128257,481.062124248497,481.9639278557114,482.86573146292585,483.7675350701403,484.6693386773547,485.57114228456913,486.4729458917836,487.37474949899797,488.2765531062124,489.17835671342687,490.08016032064126,490.9819639278557,491.88376753507015,492.7855711422846,493.687374749499,494.58917835671343,495.4909819639279,496.39278557114227,497.2945891783567,498.19639278557116,499.09819639278555,500.0]} diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/test/test.js b/lib/node_modules/@stdlib/math/base/special/lnf/test/test.js new file mode 100644 index 000000000000..2dcd5d09568b --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/test/test.js @@ -0,0 +1,241 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var PINF = require( '@stdlib/constants/float32/pinf' ); +var NINF = require( '@stdlib/constants/float32/ninf' ); +var EPS = require( '@stdlib/constants/float32/eps' ); +var abs = require( '@stdlib/math/base/special/abs' ); +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); +var lnf = require( './../lib' ); + + +// FIXTURES // + +var veryLargePositive = require( './fixtures/julia/very_large_positive.json' ); +var largePositive = require( './fixtures/julia/large_positive.json' ); +var mediumPositive = require( './fixtures/julia/medium_positive.json' ); +var smallPositive = require( './fixtures/julia/small_positive.json' ); +var smaller = require( './fixtures/julia/smaller.json' ); +var tinyPositive = require( './fixtures/julia/tiny_positive.json' ); +var subnormal = require( './fixtures/julia/subnormal.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof lnf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of `x` (very large positive values)', function test( t ) { + var expected; + var delta; + var tol; + var x; + var y; + var i; + var e; + + expected = veryLargePositive.expected; + x = veryLargePositive.x; + for ( i = 0; i < x.length; i++ ) { + y = lnf( x[i] ); + e = float64ToFloat32( expected[ i ] ); + if ( y === e ) { + t.equal( y, e, 'x: '+x[i]+', y: '+y+', expected: '+e ); + } else { + delta = abs( y - e ); + tol = EPS * abs( e ); + t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. Δ: '+delta+'. Tolerance: '+tol+'.' ); + } + } + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of `x` (large positive values)', function test( t ) { + var expected; + var delta; + var tol; + var x; + var y; + var i; + var e; + + expected = largePositive.expected; + x = largePositive.x; + for ( i = 0; i < x.length; i++ ) { + y = lnf( x[i] ); + e = float64ToFloat32( expected[ i ] ); + if ( y === e ) { + t.equal( y, e, 'x: '+x[i]+', y: '+y+', expected: '+e ); + } else { + delta = abs( y - e ); + tol = EPS * abs( e ); + t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. Δ: '+delta+'. Tolerance: '+tol+'.' ); + } + } + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of `x` (medium positive values)', function test( t ) { + var expected; + var delta; + var tol; + var x; + var y; + var i; + var e; + + expected = mediumPositive.expected; + x = mediumPositive.x; + for ( i = 0; i < x.length; i++ ) { + y = lnf( x[i] ); + e = float64ToFloat32( expected[ i ] ); + if ( y === e ) { + t.equal( y, e, 'x: '+x[i]+', y: '+y+', expected: '+e ); + } else { + delta = abs( y - e ); + tol = EPS * abs( e ); + t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. Δ: '+delta+'. Tolerance: '+tol+'.' ); + } + } + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of `x` (small positive values)', function test( t ) { + var expected; + var delta; + var tol; + var x; + var y; + var i; + var e; + + expected = smallPositive.expected; + x = smallPositive.x; + for ( i = 0; i < x.length; i++ ) { + y = lnf( x[i] ); + e = float64ToFloat32( expected[ i ] ); + if ( y === e ) { + t.equal( y, e, 'x: '+x[i]+', y: '+y+', expected: '+e ); + } else { + delta = abs( y - e ); + tol = 106.0 * EPS * abs( e ); + t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. Δ: '+delta+'. Tolerance: '+tol+'.' ); + } + } + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of `x` (smaller positive values)', function test( t ) { + var expected; + var delta; + var tol; + var x; + var y; + var i; + var e; + + expected = smaller.expected; + x = smaller.x; + for ( i = 0; i < x.length; i++ ) { + y = lnf( x[i] ); + e = float64ToFloat32( expected[ i ] ); + if ( y === e ) { + t.equal( y, e, 'x: '+x[i]+', y: '+y+', expected: '+e ); + } else { + delta = abs( y - e ); + tol = 1.8 * EPS * abs( e ); + t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. Δ: '+delta+'. Tolerance: '+tol+'.' ); + } + } + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of `x` (tiny positive values)', function test( t ) { + var expected; + var delta; + var tol; + var x; + var y; + var i; + var e; + + expected = tinyPositive.expected; + x = tinyPositive.x; + for ( i = 0; i < x.length; i++ ) { + y = lnf( x[i] ); + e = float64ToFloat32( expected[ i ] ); + if ( y === e ) { + t.equal( y, e, 'x: '+x[i]+', y: '+y+', expected: '+e ); + } else { + delta = abs( y - e ); + tol = EPS * abs( e ); + t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. Δ: '+delta+'. Tolerance: '+tol+'.' ); + } + } + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of `x` (subnormal values)', function test( t ) { + var expected; + var delta; + var tol; + var x; + var y; + var i; + var e; + + expected = subnormal.expected; + x = subnormal.x; + for ( i = 0; i < x.length; i++ ) { + y = lnf( x[i] ); + e = float64ToFloat32( expected[ i ] ); + if ( y === e ) { + t.equal( y, e, 'x: '+x[i]+', y: '+y+', expected: '+e ); + } else { + delta = abs( y - e ); + tol = 75.0 * EPS * abs( e ); + t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. Δ: '+delta+'. Tolerance: '+tol+'.' ); + } + } + t.end(); +}); + +tape( 'the function returns `-infinity` if provided `0`', function test( t ) { + t.equal( lnf( 0.0 ), NINF, 'equals -infinity' ); + t.end(); +}); + +tape( 'the function returns `+infinity` if provided `+infinity`', function test( t ) { + t.equal( lnf( PINF ), PINF, 'equals +infinity' ); + t.end(); +}); + +tape( 'the function returns `NaN` if provided a negative number', function test( t ) { + var v = lnf( -1.0 ); + t.equal( isnan( v ), true, 'returns expected value' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/lnf/test/test.native.js new file mode 100644 index 000000000000..524135b64ab6 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/lnf/test/test.native.js @@ -0,0 +1,250 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var tape = require( 'tape' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var PINF = require( '@stdlib/constants/float32/pinf' ); +var NINF = require( '@stdlib/constants/float32/ninf' ); +var EPS = require( '@stdlib/constants/float32/eps' ); +var abs = require( '@stdlib/math/base/special/abs' ); +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); +var tryRequire = require( '@stdlib/utils/try-require' ); + + +// FIXTURES // + +var veryLargePositive = require( './fixtures/julia/very_large_positive.json' ); +var largePositive = require( './fixtures/julia/large_positive.json' ); +var mediumPositive = require( './fixtures/julia/medium_positive.json' ); +var smallPositive = require( './fixtures/julia/small_positive.json' ); +var smaller = require( './fixtures/julia/smaller.json' ); +var tinyPositive = require( './fixtures/julia/tiny_positive.json' ); +var subnormal = require( './fixtures/julia/subnormal.json' ); + + +// VARIABLES // + +var lnf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( lnf instanceof Error ) +}; + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof lnf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of `x` (very large positive values)', opts, function test( t ) { + var expected; + var delta; + var tol; + var x; + var y; + var i; + var e; + + expected = veryLargePositive.expected; + x = veryLargePositive.x; + for ( i = 0; i < x.length; i++ ) { + y = lnf( x[i] ); + e = float64ToFloat32( expected[ i ] ); + if ( y === e ) { + t.equal( y, e, 'x: '+x[i]+', y: '+y+', expected: '+e ); + } else { + delta = abs( y - e ); + tol = EPS * abs( e ); + t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. Δ: '+delta+'. Tolerance: '+tol+'.' ); + } + } + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of `x` (large positive values)', opts, function test( t ) { + var expected; + var delta; + var tol; + var x; + var y; + var i; + var e; + + expected = largePositive.expected; + x = largePositive.x; + for ( i = 0; i < x.length; i++ ) { + y = lnf( x[i] ); + e = float64ToFloat32( expected[ i ] ); + if ( y === e ) { + t.equal( y, e, 'x: '+x[i]+', y: '+y+', expected: '+e ); + } else { + delta = abs( y - e ); + tol = EPS * abs( e ); + t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. Δ: '+delta+'. Tolerance: '+tol+'.' ); + } + } + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of `x` (medium positive values)', opts, function test( t ) { + var expected; + var delta; + var tol; + var x; + var y; + var i; + var e; + + expected = mediumPositive.expected; + x = mediumPositive.x; + for ( i = 0; i < x.length; i++ ) { + y = lnf( x[i] ); + e = float64ToFloat32( expected[ i ] ); + if ( y === e ) { + t.equal( y, e, 'x: '+x[i]+', y: '+y+', expected: '+e ); + } else { + delta = abs( y - e ); + tol = EPS * abs( e ); + t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. Δ: '+delta+'. Tolerance: '+tol+'.' ); + } + } + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of `x` (small positive values)', opts, function test( t ) { + var expected; + var delta; + var tol; + var x; + var y; + var i; + var e; + + expected = smallPositive.expected; + x = smallPositive.x; + for ( i = 0; i < x.length; i++ ) { + y = lnf( x[i] ); + e = float64ToFloat32( expected[ i ] ); + if ( y === e ) { + t.equal( y, e, 'x: '+x[i]+', y: '+y+', expected: '+e ); + } else { + delta = abs( y - e ); + tol = 106.0 * EPS * abs( e ); + t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. Δ: '+delta+'. Tolerance: '+tol+'.' ); + } + } + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of `x` (smaller positive values)', opts, function test( t ) { + var expected; + var delta; + var tol; + var x; + var y; + var i; + var e; + + expected = smaller.expected; + x = smaller.x; + for ( i = 0; i < x.length; i++ ) { + y = lnf( x[i] ); + e = float64ToFloat32( expected[ i ] ); + if ( y === e ) { + t.equal( y, e, 'x: '+x[i]+', y: '+y+', expected: '+e ); + } else { + delta = abs( y - e ); + tol = 1.8 * EPS * abs( e ); + t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. Δ: '+delta+'. Tolerance: '+tol+'.' ); + } + } + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of `x` (tiny positive values)', opts, function test( t ) { + var expected; + var delta; + var tol; + var x; + var y; + var i; + var e; + + expected = tinyPositive.expected; + x = tinyPositive.x; + for ( i = 0; i < x.length; i++ ) { + y = lnf( x[i] ); + e = float64ToFloat32( expected[ i ] ); + if ( y === e ) { + t.equal( y, e, 'x: '+x[i]+', y: '+y+', expected: '+e ); + } else { + delta = abs( y - e ); + tol = EPS * abs( e ); + t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. Δ: '+delta+'. Tolerance: '+tol+'.' ); + } + } + t.end(); +}); + +tape( 'the function evaluates the natural logarithm of `x` (subnormal values)', opts, function test( t ) { + var expected; + var delta; + var tol; + var x; + var y; + var i; + var e; + + expected = subnormal.expected; + x = subnormal.x; + for ( i = 0; i < x.length; i++ ) { + y = lnf( x[i] ); + e = float64ToFloat32( expected[ i ] ); + if ( y === e ) { + t.equal( y, e, 'x: '+x[i]+', y: '+y+', expected: '+e ); + } else { + delta = abs( y - e ); + tol = 75.0 * EPS * abs( e ); + t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. Δ: '+delta+'. Tolerance: '+tol+'.' ); + } + } + t.end(); +}); + +tape( 'the function returns `-infinity` if provided `0`', opts, function test( t ) { + t.equal( lnf( 0.0 ), NINF, 'equals -infinity' ); + t.end(); +}); + +tape( 'the function returns `+infinity` if provided `+infinity`', opts, function test( t ) { + t.equal( lnf( PINF ), PINF, 'equals +infinity' ); + t.end(); +}); + +tape( 'the function returns `NaN` if provided a negative number', opts, function test( t ) { + var v = lnf( -1.0 ); + t.equal( isnan( v ), true, 'returns expected value' ); + t.end(); +}); From 7312ed052105c8a26294e5d04fd23b920d5d719d Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Mon, 10 Jun 2024 08:43:29 +0530 Subject: [PATCH 2/7] refactor: remove initial checks --- lib/node_modules/@stdlib/math/base/special/lnf/src/main.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/src/main.c b/lib/node_modules/@stdlib/math/base/special/lnf/src/main.c index eaccd6172649..1903df88aeac 100644 --- a/lib/node_modules/@stdlib/math/base/special/lnf/src/main.c +++ b/lib/node_modules/@stdlib/math/base/special/lnf/src/main.c @@ -116,12 +116,6 @@ float stdlib_base_lnf( const float x ) { float z; float w; - if ( x == 0.0f ) { - return STDLIB_CONSTANT_FLOAT32_NINF; - } - if ( stdlib_base_is_nan( x ) || x < 0.0f ) { - return 0.0f / 0.0f; // NaN - } stdlib_base_float32_to_word( x, &uix ); ix = (int32_t)uix; xc = x; From 5eca1a514fdb19012032d1a819f6f00735566c8e Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Mon, 10 Jun 2024 08:46:19 +0530 Subject: [PATCH 3/7] Update lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js b/lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js index 18ac3bd7685a..d0f3979319cb 100644 --- a/lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js +++ b/lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js @@ -110,10 +110,6 @@ function lnf( x ) { // x < 2**-126 if ( ix < 0x00800000 ) { - if ( ( ix & FLOAT32_ABS_MASK ) === 0 ) { - // log(+-0)=-inf - return float64ToFloat32( -TWO25 / 0.0 ); - } if ( ix < 0 ) { // log(-#) = NaN return NaN; From 93ffdb26b00d9ac977658147715bd7cf3e54cc3e Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Mon, 10 Jun 2024 08:46:31 +0530 Subject: [PATCH 4/7] Update lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js b/lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js index d0f3979319cb..1812d9d572cf 100644 --- a/lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js +++ b/lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js @@ -110,10 +110,6 @@ function lnf( x ) { // x < 2**-126 if ( ix < 0x00800000 ) { - if ( ix < 0 ) { - // log(-#) = NaN - return NaN; - } k = float64ToFloat32( k - 25 ); // Subnormal number, scale up x From 7b954149933d567bdef7cee3a919144ca843f4e1 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Mon, 10 Jun 2024 08:57:15 +0530 Subject: [PATCH 5/7] Update lib/node_modules/@stdlib/math/base/special/lnf/src/main.c Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- lib/node_modules/@stdlib/math/base/special/lnf/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/src/main.c b/lib/node_modules/@stdlib/math/base/special/lnf/src/main.c index 1903df88aeac..a369664fafe6 100644 --- a/lib/node_modules/@stdlib/math/base/special/lnf/src/main.c +++ b/lib/node_modules/@stdlib/math/base/special/lnf/src/main.c @@ -157,7 +157,7 @@ float stdlib_base_lnf( const float x ) { } } R = ( ( f * f ) * ( 0.5f - ( ONE_THIRD * f ) ) ); - if( k == 0 ) { + if ( k == 0 ) { return ( f - R ); } else { dk = k; From 990fce66e654cda2b5b45db5821f85681af466cb Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Mon, 10 Jun 2024 09:09:44 +0530 Subject: [PATCH 6/7] Update main.c Signed-off-by: GUNJ JOSHI --- .../@stdlib/math/base/special/lnf/src/main.c | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/src/main.c b/lib/node_modules/@stdlib/math/base/special/lnf/src/main.c index a369664fafe6..2ea0ef5baa22 100644 --- a/lib/node_modules/@stdlib/math/base/special/lnf/src/main.c +++ b/lib/node_modules/@stdlib/math/base/special/lnf/src/main.c @@ -151,18 +151,16 @@ float stdlib_base_lnf( const float x ) { if ( f == 0.0f ) { if ( k == 0 ) { return 0.0f; - } else { - dk = k; - return ( ( dk * LN2_HI ) + ( dk * LN2_LO ) ); } + dk = k; + return ( ( dk * LN2_HI ) + ( dk * LN2_LO ) ); } R = ( ( f * f ) * ( 0.5f - ( ONE_THIRD * f ) ) ); if ( k == 0 ) { return ( f - R ); - } else { - dk = k; - return ( ( dk * LN2_HI ) - ( ( R - ( dk * LN2_LO ) ) - f ) ); } + dk = k; + return ( ( dk * LN2_HI ) - ( ( R - ( dk * LN2_LO ) ) - f ) ); } s = ( f / ( 2.0f + f ) ); dk = k; @@ -178,14 +176,11 @@ float stdlib_base_lnf( const float x ) { hfsq = ( 0.5f * ( f * f ) ); if ( k == 0 ) { return ( f - ( hfsq - ( s * ( hfsq + R ) ) ) ); - } else { - return ( ( dk * LN2_HI ) - ( ( hfsq - ( s * ( hfsq + R ) + ( dk * LN2_LO ) ) ) - f ) ); - } - } else { - if ( k == 0 ) { - return ( f - ( s * ( f - R ) ) ); - } else { - return ( ( dk * LN2_HI ) - ( ( ( s * ( f - R ) ) - ( dk * LN2_LO ) ) - f ) ); } + return ( ( dk * LN2_HI ) - ( ( hfsq - ( s * ( hfsq + R ) + ( dk * LN2_LO ) ) ) - f ) ); + } + if ( k == 0 ) { + return ( f - ( s * ( f - R ) ) ); } + return ( ( dk * LN2_HI ) - ( ( ( s * ( f - R ) ) - ( dk * LN2_LO ) ) - f ) ); } From 4980622935e7c6db5c04a2fad2bd359ca985ea72 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Mon, 10 Jun 2024 09:21:09 +0530 Subject: [PATCH 7/7] remove FLOAT32_ABS_MASK Signed-off-by: GUNJ JOSHI --- lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js b/lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js index 1812d9d572cf..cbeec957edba 100644 --- a/lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js +++ b/lib/node_modules/@stdlib/math/base/special/lnf/lib/main.js @@ -40,7 +40,6 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' ); var NINF = require( '@stdlib/constants/float32/ninf' ); var FLOAT32_EXPONENT_MASK = require( '@stdlib/constants/float32/exponent-mask' ); var FLOAT32_EXPONENT_BIAS = require( '@stdlib/constants/float32/exponent-bias' ); -var FLOAT32_ABS_MASK = require( '@stdlib/constants/float32/abs-mask' ); var FLOAT32_SIGNIFICAND_MASK = require( '@stdlib/constants/float32/significand-mask' ); var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); var polyvalP = require( './polyval_p.js' );