From d1478198997e3b83114e8faf3ef99ed4e72f680e Mon Sep 17 00:00:00 2001 From: ShabiShett07 Date: Tue, 31 Dec 2024 01:00:30 +0530 Subject: [PATCH 1/5] feat: add math/base/special/bessely1 --- .../math/base/special/bessely1/README.md | 86 +++++ .../bessely1/benchmark/benchmark.native.js | 60 ++++ .../math/base/special/bessely1/binding.gyp | 170 ++++++++++ .../base/special/bessely1/examples/c/Makefile | 146 +++++++++ .../special/bessely1/examples/c/example.c | 31 ++ .../math/base/special/bessely1/include.gypi | 53 +++ .../stdlib/math/base/special/bessely1.h | 38 +++ .../math/base/special/bessely1/lib/native.js | 74 +++++ .../math/base/special/bessely1/manifest.json | 93 ++++++ .../math/base/special/bessely1/src/Makefile | 70 ++++ .../math/base/special/bessely1/src/addon.c | 22 ++ .../math/base/special/bessely1/src/main.c | 307 ++++++++++++++++++ .../base/special/bessely1/test/test.native.js | 286 ++++++++++++++++ 13 files changed, 1436 insertions(+) create mode 100644 lib/node_modules/@stdlib/math/base/special/bessely1/benchmark/benchmark.native.js create mode 100644 lib/node_modules/@stdlib/math/base/special/bessely1/binding.gyp create mode 100644 lib/node_modules/@stdlib/math/base/special/bessely1/examples/c/Makefile create mode 100644 lib/node_modules/@stdlib/math/base/special/bessely1/examples/c/example.c create mode 100644 lib/node_modules/@stdlib/math/base/special/bessely1/include.gypi create mode 100644 lib/node_modules/@stdlib/math/base/special/bessely1/include/stdlib/math/base/special/bessely1.h create mode 100644 lib/node_modules/@stdlib/math/base/special/bessely1/lib/native.js create mode 100644 lib/node_modules/@stdlib/math/base/special/bessely1/manifest.json create mode 100644 lib/node_modules/@stdlib/math/base/special/bessely1/src/Makefile create mode 100644 lib/node_modules/@stdlib/math/base/special/bessely1/src/addon.c create mode 100644 lib/node_modules/@stdlib/math/base/special/bessely1/src/main.c create mode 100644 lib/node_modules/@stdlib/math/base/special/bessely1/test/test.native.js diff --git a/lib/node_modules/@stdlib/math/base/special/bessely1/README.md b/lib/node_modules/@stdlib/math/base/special/bessely1/README.md index 0b60aa59dc24..5df877592e7c 100644 --- a/lib/node_modules/@stdlib/math/base/special/bessely1/README.md +++ b/lib/node_modules/@stdlib/math/base/special/bessely1/README.md @@ -105,8 +105,94 @@ for ( i = 0; i < 100; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/bessely1.h" +``` + +#### stdlib_base_bessely0( x ) + +Computes the [Bessel function of the second kind][bessel-second-kind] of order one at `x`. + +```c +double out = stdlib_base_bessely1( 0.0 ); +// returns -Infinity + +out = stdlib_base_bessely1( 1.0 ); +// returns ~-0.781 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_bessely1( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/bessely1.h" +#include + +int main( void ) { + const double x[] = { 0.0, 1.0, 2.0, 3.0, 4.0 }; + + double y; + int i; + for ( i = 0; i < 5; i++ ) { + y = stdlib_base_bessely1( x[ i ] ); + printf( "bessely1(%lf) = %lf\n", x[ i ], y ); + } +} +``` + +
+ +
+ + + diff --git a/lib/node_modules/@stdlib/math/base/special/bessely1/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/bessely1/examples/c/example.c index d55a97b04833..8ac6c3413419 100644 --- a/lib/node_modules/@stdlib/math/base/special/bessely1/examples/c/example.c +++ b/lib/node_modules/@stdlib/math/base/special/bessely1/examples/c/example.c @@ -28,4 +28,4 @@ int main( void ) { y = stdlib_base_bessely1( x[ i ] ); printf( "bessely1(%lf) = %lf\n", x[ i ], y ); } -} \ No newline at end of file +} diff --git a/lib/node_modules/@stdlib/math/base/special/bessely1/src/main.c b/lib/node_modules/@stdlib/math/base/special/bessely1/src/main.c index 7f1bcaeabb8d..a291be6e18a7 100644 --- a/lib/node_modules/@stdlib/math/base/special/bessely1/src/main.c +++ b/lib/node_modules/@stdlib/math/base/special/bessely1/src/main.c @@ -304,4 +304,4 @@ double stdlib_base_bessely1(double x) { */ stdlib_base_sincos( xc, &s, &c ); return f * ( ( (y*rs) * ( s - c ) ) - ( rc * ( s + c ) ) ); -} \ No newline at end of file +} From 525a2930d36ae9f8948ace12ea503bf60f4d94b0 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> Date: Fri, 3 Jan 2025 12:40:54 +0530 Subject: [PATCH 5/5] Fixed package.json Signed-off-by: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> --- lib/node_modules/@stdlib/math/base/special/bessely1/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/node_modules/@stdlib/math/base/special/bessely1/package.json b/lib/node_modules/@stdlib/math/base/special/bessely1/package.json index 2be9ca28380d..dfc66a99678c 100644 --- a/lib/node_modules/@stdlib/math/base/special/bessely1/package.json +++ b/lib/node_modules/@stdlib/math/base/special/bessely1/package.json @@ -14,6 +14,7 @@ } ], "main": "./lib", + "gypfile": true, "directories": { "benchmark": "./benchmark", "doc": "./docs",