Skip to content

Commit 49ec909

Browse files
feat: add JS implementations
1 parent f29381d commit 49ec909

File tree

12 files changed

+621
-0
lines changed

12 files changed

+621
-0
lines changed
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
<!--
2+
3+
@license Apache-2.0
4+
5+
Copyright (c) 2025 The Stdlib Authors.
6+
7+
Licensed under the Apache License, Version 2.0 (the "License");
8+
you may not use this file except in compliance with the License.
9+
You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
19+
-->
20+
21+
# FLOAT32_GLAISHER
22+
23+
> [Glaisher-Kinkelin][glaisher-constant] constant.
24+
25+
<section class="intro">
26+
27+
[Glaisher-Kinkelin][glaisher-constant] constant is defined as
28+
29+
<!-- <equation class="equation" label="eq:glaisher_kinkelin_constant" align="center" raw="A = \lim_{n\to\infty} \frac{K(n + 1)}{n^{n^2/2 + n/2 + 1/12}e^{-n^2/4}}" alt="Glaisher-Kinkelin constant"> -->
30+
31+
```math
32+
A = \lim_{n\to\infty} \frac{K(n + 1)}{n^{n^2/2 + n/2 + 1/12}e^{-n^2/4}}
33+
```
34+
35+
<!-- <div class="equation" align="center" data-raw-text="A = \lim_{n\to\infty} \frac{K(n + 1)}{n^{n^2/2 + n/2 + 1/12}e^{-n^2/4}}" data-equation="eq:glaisher_kinkelin_constant">
36+
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@6e1cf583c4854b3d982f22f361f53a30c9f552dc/lib/node_modules/@stdlib/constants/float64/glaisher-kinkelin/docs/img/equation_glaisher_kinkelin_constant.svg" alt="Glaisher-Kinkelin constant">
37+
<br>
38+
</div> -->
39+
40+
<!-- </equation> -->
41+
42+
where
43+
44+
<!-- <equation class="equation" label="eq:k_function" align="center" raw="K(n) = \prod_{k=1}^{n-1} k^k" alt="K-function"> -->
45+
46+
```math
47+
K(n) = \prod_{k=1}^{n-1} k^k
48+
```
49+
50+
<!-- <div class="equation" align="center" data-raw-text="K(n) = \prod_{k=1}^{n-1} k^k" data-equation="eq:k_function">
51+
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@6e1cf583c4854b3d982f22f361f53a30c9f552dc/lib/node_modules/@stdlib/constants/float64/glaisher-kinkelin/docs/img/equation_k_function.svg" alt="K-function">
52+
<br>
53+
</div> -->
54+
55+
<!-- </equation> -->
56+
57+
is the [K-function][k-function].
58+
59+
</section>
60+
61+
<!-- /.intro -->
62+
63+
<section class="usage">
64+
65+
## Usage
66+
67+
```javascript
68+
var FLOAT32_GLAISHER = require( '@stdlib/constants/float32/glaisher-kinkelin' );
69+
```
70+
71+
#### FLOAT32_GLAISHER
72+
73+
The [Glaisher-Kinkelin][glaisher-constant] constant.
74+
75+
```javascript
76+
var bool = ( FLOAT32_GLAISHER === 1.2824270725250244 );
77+
// returns true
78+
```
79+
80+
</section>
81+
82+
<!-- /.usage -->
83+
84+
<section class="examples">
85+
86+
## Examples
87+
88+
<!-- TODO: better example -->
89+
90+
<!-- eslint no-undef: "error" -->
91+
92+
```javascript
93+
var FLOAT32_GLAISHER = require( '@stdlib/constants/float32/glaisher-kinkelin' );
94+
95+
console.log( 'Glaisher\'s constant: %d', FLOAT32_GLAISHER );
96+
// => 'Glaisher\'s constant: 1.2824270725250244'
97+
```
98+
99+
</section>
100+
101+
<!-- /.examples -->
102+
103+
<!-- C interface documentation. -->
104+
105+
* * *
106+
107+
<section class="c">
108+
109+
## C APIs
110+
111+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
112+
113+
<section class="intro">
114+
115+
</section>
116+
117+
<!-- /.intro -->
118+
119+
<!-- C usage documentation. -->
120+
121+
<section class="usage">
122+
123+
### Usage
124+
125+
```c
126+
#include "stdlib/constants/float32/glaisher_kinkelin.h"
127+
```
128+
129+
#### STDLIB_CONSTANT_FLOAT32_GLAISHER
130+
131+
Macro for the [Glaisher-Kinkelin][glaisher-constant] constant.
132+
133+
</section>
134+
135+
<!-- /.usage -->
136+
137+
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
138+
139+
<section class="notes">
140+
141+
</section>
142+
143+
<!-- /.notes -->
144+
145+
<!-- C API usage examples. -->
146+
147+
<section class="examples">
148+
149+
</section>
150+
151+
<!-- /.examples -->
152+
153+
</section>
154+
155+
<!-- /.c -->
156+
157+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
158+
159+
<section class="related">
160+
161+
</section>
162+
163+
<!-- /.related -->
164+
165+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
166+
167+
<section class="links">
168+
169+
[glaisher-constant]: https://en.wikipedia.org/wiki/Glaisher%E2%80%93Kinkelin_constant
170+
171+
[k-function]: https://en.wikipedia.org/wiki/K-function
172+
173+
</section>
174+
175+
<!-- /.links -->
Lines changed: 84 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)