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 Dec 13, 2024
1 parent eedb8d2 commit 54e658a
Show file tree
Hide file tree
Showing 11 changed files with 513 additions and 2 deletions.
39 changes: 37 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,40 @@

<!-- /.package -->

<section class="package" id="constants-float32-ln-half-unreleased">

#### [@stdlib/constants/float32/ln-half](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float32/ln-half)

<details>

<section class="features">

##### Features

- [`5a4f6ed`](https://github.com/stdlib-js/stdlib/commit/5a4f6edd9eb9e71c3b86e37bebc0d9125efe4931) - add `constants/float32/ln-half` [(#3333)](https://github.com/stdlib-js/stdlib/pull/3333)

</section>

<!-- /.features -->

<section class="issues">

##### Closed Issues

This release closes the following issue:

[#3332](https://github.com/stdlib-js/stdlib/issues/3332)

</section>

<!-- /.issues -->

</details>

</section>

<!-- /.package -->

<section class="package" id="constants-float32-ln-pi-unreleased">

#### [@stdlib/constants/float32/ln-pi](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float32/ln-pi)
Expand Down Expand Up @@ -448,9 +482,9 @@ This release closes the following issue:

### Closed Issues

A total of 6 issues were closed in this release:
A total of 7 issues were closed in this release:

[#3090](https://github.com/stdlib-js/stdlib/issues/3090), [#3093](https://github.com/stdlib-js/stdlib/issues/3093), [#3094](https://github.com/stdlib-js/stdlib/issues/3094), [#3325](https://github.com/stdlib-js/stdlib/issues/3325), [#3327](https://github.com/stdlib-js/stdlib/issues/3327), [#3344](https://github.com/stdlib-js/stdlib/issues/3344)
[#3090](https://github.com/stdlib-js/stdlib/issues/3090), [#3093](https://github.com/stdlib-js/stdlib/issues/3093), [#3094](https://github.com/stdlib-js/stdlib/issues/3094), [#3325](https://github.com/stdlib-js/stdlib/issues/3325), [#3327](https://github.com/stdlib-js/stdlib/issues/3327), [#3332](https://github.com/stdlib-js/stdlib/issues/3332), [#3344](https://github.com/stdlib-js/stdlib/issues/3344)

</section>

Expand Down Expand Up @@ -480,6 +514,7 @@ A total of 7 people contributed to this release. Thank you to the following cont

<details>

- [`5a4f6ed`](https://github.com/stdlib-js/stdlib/commit/5a4f6edd9eb9e71c3b86e37bebc0d9125efe4931) - **feat:** add `constants/float32/ln-half` [(#3333)](https://github.com/stdlib-js/stdlib/pull/3333) _(by Vivek maurya, Athan Reines, Gunj Joshi, stdlib-bot)_
- [`fc8571d`](https://github.com/stdlib-js/stdlib/commit/fc8571d4e2f7981711a85db47ef8d4acfecfba32) - **feat:** add `constants/float32/ln-pi` [(#3342)](https://github.com/stdlib-js/stdlib/pull/3342) _(by Vivek maurya, Athan Reines, stdlib-bot)_
- [`d7dc119`](https://github.com/stdlib-js/stdlib/commit/d7dc1197d55a17e6d3f9df1c17b2e13fe57df916) - **fix:** ensure header files reside in correct directories _(by Philipp Burckhardt)_
- [`1c56b73`](https://github.com/stdlib-js/stdlib/commit/1c56b737ec018cc818cebf19e5c7947fa684e126) - **docs:** update related packages sections [(#3380)](https://github.com/stdlib-js/stdlib/pull/3380) _(by stdlib-bot)_
Expand Down
135 changes: 135 additions & 0 deletions float32/ln-half/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<!--
@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.
-->

# FLOAT32_LN_HALF

> [Natural logarithm][@stdlib/math/base/special/lnf] of `1/2` as a single-precision floating-point number.
<section class="usage">

## Usage

```javascript
var FLOAT32_LN_HALF = require( '@stdlib/constants/float32/ln-half' );
```

#### FLOAT32_LN_HALF

[Natural logarithm][@stdlib/math/base/special/lnf] of `1/2` as a single-precision floating-point number.

```javascript
var bool = ( FLOAT32_LN_HALF === -0.6931471824645996 );
// returns true
```

</section>

<!-- /.usage -->

<section class="examples">

## Examples

<!-- TODO: better example -->

<!-- eslint no-undef: "error" -->

```javascript
var FLOAT32_LN_HALF = require( '@stdlib/constants/float32/ln-half' );

console.log( FLOAT32_LN_HALF );
// => -0.6931471824645996
```

</section>

<!-- /.examples -->

<!-- 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/constants/float32/ln_half.h"
```

#### STDLIB_CONSTANT_FLOAT32_LN_HALF

Macro for the [natural logarithm][@stdlib/math/base/special/lnf] of `1/2` as a single-precision floating-point number.

</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">

</section>

<!-- /.examples -->

</section>

<!-- /.c -->

<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

<section class="related">

</section>

<!-- /.related -->

<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="links">

[@stdlib/math/base/special/lnf]: https://github.com/stdlib-js/math-base-special-ln

</section>

<!-- /.links -->
12 changes: 12 additions & 0 deletions float32/ln-half/docs/repl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

{{alias}}
Natural logarithm of `1/2` as a single-precision floating-point number.

Examples
--------
> {{alias}}
-0.6931471824645996

See Also
--------

33 changes: 33 additions & 0 deletions float32/ln-half/docs/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -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.
*/

// TypeScript Version: 4.1

/**
* Natural logarithm of `1/2` as a single-precision floating-point number.
*
* @example
* var val = FLOAT32_LN_HALF;
* // returns -0.6931471824645996
*/
declare const FLOAT32_LN_HALF: number;


// EXPORTS //

export = FLOAT32_LN_HALF;
28 changes: 28 additions & 0 deletions float32/ln-half/docs/types/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* @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 FLOAT32_LN_HALF = require( './index' );


// TESTS //

// The export is a number...
{
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
FLOAT32_LN_HALF; // $ExpectType number
}
24 changes: 24 additions & 0 deletions float32/ln-half/examples/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* @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 FLOAT32_LN_HALF = require( './../lib' );

console.log( FLOAT32_LN_HALF );
// => -0.6931471824645996
27 changes: 27 additions & 0 deletions float32/ln-half/include/stdlib/constants/float32/ln_half.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* @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.
*/

#ifndef STDLIB_CONSTANTS_FLOAT32_LN_HALF_H
#define STDLIB_CONSTANTS_FLOAT32_LN_HALF_H

/**
* Macro for the natural logarithm of 1/2 as a single-precision floating-point number.
*/
#define STDLIB_CONSTANT_FLOAT32_LN_HALF -0.6931471824645996f

#endif // !STDLIB_CONSTANTS_FLOAT32_LN_HALF_H
55 changes: 55 additions & 0 deletions float32/ln-half/lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/**
* @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';

/**
* Natural logarithm of `1/2` as a single-precision floating-point number.
*
* @module @stdlib/constants/float32/ln-half
* @type {number}
*
* @example
* var LN_HALF = require( '@stdlib/constants/float32/ln-half' );
* // returns -0.6931471824645996
*/

// MODULES //

var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );


// MAIN //

/**
* Natural logarithm of `1/2` as a single-precision floating-point number.
*
* ```tex
* \ln (1/2)
* ```
*
* @constant
* @type {number}
* @default -0.6931471824645996
*/
var FLOAT32_LN_HALF = float64ToFloat32(-0.69314718055994530941723212145817656807550013436025525412); // eslint-disable-line max-len


// EXPORTS //

module.exports = FLOAT32_LN_HALF;
Loading

0 comments on commit 54e658a

Please sign in to comment.