Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Jul 13, 2024
1 parent b50eaa5 commit 87c5524
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

<details>

- [`ed638e3`](https://github.com/stdlib-js/stdlib/commit/ed638e392f7425c899abda488b943d0ffbd37f78) - **docs:** update Boost version and fix C function name in README.md [(##2577)](#2577) _(by Gunj Joshi)_
- [`337adbf`](https://github.com/stdlib-js/stdlib/commit/337adbf93822a5ab1adb5256594855e344e9414c) - **feat:** add C implementation for `math/base/special/digamma` [(##2533)](#2533 ) _(by Gunj Joshi)_

</details>
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,15 @@ for ( i = 0; i < 10; i++ ) {
#include "stdlib/math/base/special/digamma.h"
```

#### digamma( x )
#### stdlib_base_digamma( x )

Evaluates the [digamma function][digamma-function].

```c
double out = digamma( -2.5 );
double out = stdlib_base_digamma( -2.5 );
// returns ~1.103

out = digamma( 1.0 );
out = stdlib_base_digamma( 1.0 );
// returns ~-0.577
```

Expand All @@ -191,7 +191,7 @@ The function accepts the following arguments:
- **x**: `[in] double` input value.

```c
double digamma( const double x );
double stdlib_base_digamma( const double x );
```
</section>
Expand Down
1 change: 1 addition & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* ## Notice
*
* The original C++ code and copyright notice are from the [Boost library]{@link http://www.boost.org/doc/libs/1_53_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/digamma.html}. The implementation follows the original but has been modified for JavaScript.
* The original C++ code and copyright notice are from the [Boost library]{@link https://www.boost.org/doc/libs/1_85_0/boost/math/special_functions/digamma.hpp}. The implementation follows the original but has been modified for JavaScript.
*
* ```text
* (C) Copyright John Maddock 2006.
Expand Down
10 changes: 6 additions & 4 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* ## Notice
*
* The original C++ code and copyright notice are from the [Boost library]{@link http://www.boost.org/doc/libs/1_53_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/digamma.html}. The implementation follows the original but has been modified for JavaScript.
* The original C++ code and copyright notice are from the [Boost library]{@link https://www.boost.org/doc/libs/1_85_0/boost/math/special_functions/digamma.hpp}. The implementation follows the original but has been modified for JavaScript.
*
* ```text
* (C) Copyright John Maddock 2006.
Expand Down Expand Up @@ -62,7 +62,9 @@ static double polyval_p( const double x ) {
return 0.08333333333333333 + (x * (-0.008333333333333333 + (x * (0.003968253968253968 + (x * (-0.004166666666666667 + (x * (0.007575757575757576 + (x * (-0.021092796092796094 + (x * (0.08333333333333333 + (x * -0.4432598039215686)))))))))))));
}

// END: polyval_p// BEGIN: rational_pq
// END: polyval_p

// BEGIN: rational_pq

/**
* Evaluates a rational function (i.e., the ratio of two polynomials described by the coefficients stored in \\(P\\) and \\(Q\\)).
Expand Down Expand Up @@ -111,7 +113,7 @@ static double rational_pq( const double x ) {
* @param x input value
* @returns function value
*/
double asymptoticApprox( const double x ) {
static double asymptoticApprox( const double x ) {
double y;
double z;
double xc;
Expand All @@ -129,7 +131,7 @@ double asymptoticApprox( const double x ) {
* @param x input value
* @returns function value
*/
double rationalApprox( const double x ) {
static double rationalApprox( const double x ) {
double g;
double r;

Expand Down

0 comments on commit 87c5524

Please sign in to comment.