Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stdlib/math-base-special-gamma

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stdlib/math-base-special-gamma - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

include/stdlib/math/base/special/gamma.h

2

lib/polyval_s.js
/**
* @license Apache-2.0
*
* Copyright (c) 2022 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.
*

@@ -6,0 +6,0 @@ * Licensed under the Apache License, Version 2.0 (the "License");

/**
* @license Apache-2.0
*
* Copyright (c) 2022 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.
*

@@ -25,3 +25,3 @@ * Licensed under the Apache License, Version 2.0 (the "License");

/**
* Evaluates a rational function, i.e., the ratio of two polynomials described by the coefficients stored in \\(P\\) and \\(Q\\).
* Evaluates a rational function (i.e., the ratio of two polynomials described by the coefficients stored in \\(P\\) and \\(Q\\)).
*

@@ -28,0 +28,0 @@ * ## Notes

{
"name": "@stdlib/math-base-special-gamma",
"version": "0.2.1",
"version": "0.3.0",
"description": "Gamma function.",

@@ -17,6 +17,9 @@ "license": "Apache-2.0",

"main": "./lib",
"gypfile": false,
"directories": {
"doc": "./docs",
"include": "./include",
"lib": "./lib",
"scripts": "./scripts",
"src": "./src",
"dist": "./dist"

@@ -35,15 +38,17 @@ },

"dependencies": {
"@stdlib/constants-float64-eulergamma": "^0.2.1",
"@stdlib/constants-float64-ninf": "^0.2.1",
"@stdlib/constants-float64-pi": "^0.2.1",
"@stdlib/constants-float64-pinf": "^0.2.1",
"@stdlib/constants-float64-sqrt-two-pi": "^0.2.1",
"@stdlib/math-base-assert-is-integer": "^0.2.1",
"@stdlib/math-base-assert-is-nan": "^0.2.1",
"@stdlib/math-base-assert-is-negative-zero": "^0.2.1",
"@stdlib/math-base-special-abs": "^0.2.1",
"@stdlib/math-base-special-exp": "^0.2.1",
"@stdlib/math-base-special-floor": "^0.2.1",
"@stdlib/math-base-special-pow": "^0.2.1",
"@stdlib/math-base-special-sin": "^0.2.1"
"@stdlib/constants-float64-eulergamma": "^0.2.2",
"@stdlib/constants-float64-ninf": "^0.2.2",
"@stdlib/constants-float64-pi": "^0.2.2",
"@stdlib/constants-float64-pinf": "^0.2.2",
"@stdlib/constants-float64-sqrt-two-pi": "^0.2.2",
"@stdlib/math-base-assert-is-integer": "^0.2.5",
"@stdlib/math-base-assert-is-nan": "^0.2.2",
"@stdlib/math-base-assert-is-negative-zero": "^0.2.2",
"@stdlib/math-base-napi-unary": "^0.2.3",
"@stdlib/math-base-special-abs": "^0.2.2",
"@stdlib/math-base-special-exp": "^0.2.4",
"@stdlib/math-base-special-floor": "^0.2.3",
"@stdlib/math-base-special-pow": "^0.3.0",
"@stdlib/math-base-special-sin": "^0.2.1",
"@stdlib/utils-library-manifest": "^0.2.2"
},

@@ -50,0 +55,0 @@ "devDependencies": {},

@@ -139,2 +139,90 @@ <!--

<!-- C interface documentation. -->
* * *
<section class="c">
## C APIs
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
<section class="intro">
</section>
<!-- /.intro -->
<!-- C usage documentation. -->
<section class="usage">
### Usage
```c
#include "stdlib/math/base/special/gamma.h"
```
#### stdlib_base_gamma( x )
Evaluates the [gamma function][gamma-function].
```c
double out = stdlib_base_gamma( 4.0 );
// returns 6.0
out = stdlib_base_gamma( -1.5 );
// returns ~2.363
```
The function accepts the following arguments:
- **x**: `[in] double` input value.
```c
double stdlib_base_gamma( const double x );
```
</section>
<!-- /.usage -->
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
<section class="notes">
</section>
<!-- /.notes -->
<!-- C API usage examples. -->
<section class="examples">
### Examples
```c
#include "stdlib/math/base/special/gamma.h"
#include <stdio.h>
int main( void ) {
const double x[] = { 4.0, -1.5, -0.5, 0.5 };
double y;
int i;
for ( i = 0; i < 4; i++ ) {
y = stdlib_base_gamma( x[ i ] );
printf( "gamma(%lf) = %lf\n", x[ i ], y );
}
}
```
</section>
<!-- /.examples -->
</section>
<!-- /.c -->
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

@@ -191,4 +279,4 @@

[test-image]: https://github.com/stdlib-js/math-base-special-gamma/actions/workflows/test.yml/badge.svg?branch=v0.2.1
[test-url]: https://github.com/stdlib-js/math-base-special-gamma/actions/workflows/test.yml?query=branch:v0.2.1
[test-image]: https://github.com/stdlib-js/math-base-special-gamma/actions/workflows/test.yml/badge.svg?branch=v0.3.0
[test-url]: https://github.com/stdlib-js/math-base-special-gamma/actions/workflows/test.yml?query=branch:v0.3.0

@@ -195,0 +283,0 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-gamma/main.svg

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc