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 17, 2024
1 parent afb918e commit 9c529af
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 37 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<section class="release" id="unreleased">

## Unreleased (2024-07-16)
## Unreleased (2024-07-17)

<section class="features">

Expand All @@ -22,6 +22,8 @@

<details>

- [`8d4c46b`](https://github.com/stdlib-js/stdlib/commit/8d4c46b10ca912401e0ff0caa37a17cd3c443c2f) - **refactor:** update paths _(by Athan Reines)_
- [`18b3c79`](https://github.com/stdlib-js/stdlib/commit/18b3c79c5035c7082618b7379cd6576e64393a96) - **refactor:** update paths _(by Athan Reines)_
- [`ad760a9`](https://github.com/stdlib-js/stdlib/commit/ad760a922086631226d8f759a0d467c707fbc0fb) - **refactor:** update paths _(by Athan Reines)_
- [`87fdfa1`](https://github.com/stdlib-js/stdlib/commit/87fdfa106f4c75b60a3c79c7fb4ca08f5c172862) - **refactor:** update paths _(by Athan Reines)_
- [`cecc11a`](https://github.com/stdlib-js/stdlib/commit/cecc11af413b6065ed9a61d30d547fc07f656173) - **feat:** add `complex/float32/conj` _(by Athan Reines)_
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,19 +170,19 @@ Returns the [complex conjugate][complex-conjugate] of a single-precision complex

```c
#include "stdlib/complex/float32/ctor.h"
#include "stdlib/complex/realf.h"
#include "stdlib/complex/imagf.h"
#include "stdlib/complex/float32/real.h"
#include "stdlib/complex/float32/imag.h"

stdlib_complex64_t z = stdlib_complex64( 5.0f, 2.0f );

// ...

stdlib_complex64_t v = stdlib_complex64_conj( z );

float re = stdlib_realf( v );
float re = stdlib_complex64_real( v );
// returns 5.0f

float im = stdlib_imagf( v );
float im = stdlib_complex64_imag( v );
// returns -2.0f
```

Expand Down Expand Up @@ -214,8 +214,8 @@ stdlib_complex64_t stdlib_complex64_conj( const stdlib_complex64_t z );
```c
#include "stdlib/complex/float32/conj.h"
#include "stdlib/complex/realf.h"
#include "stdlib/complex/imagf.h"
#include "stdlib/complex/float32/real.h"
#include "stdlib/complex/float32/imag.h"
#include "stdlib/complex/float32/ctor.h"
#include <stdio.h>
Expand All @@ -233,7 +233,7 @@ int main( void ) {
for ( i = 0; i < 4; i++ ) {
z = x[ i ];
v = stdlib_complex64_conj( z );
printf( "conj(%f + %fi) = %f + %fi\n", stdlib_realf( z ), stdlib_imagf( z ), stdlib_realf( v ), stdlib_imagf( v ) );
printf( "conj(%f + %fi) = %f + %fi\n", stdlib_complex64_real( z ), stdlib_complex64_imag( z ), stdlib_complex64_real( v ), stdlib_complex64_imag( v ) );
}
}
```
Expand Down Expand Up @@ -263,8 +263,8 @@ int main( void ) {
## See Also

- <span class="package-name">[`@stdlib/complex-float64/conj`][@stdlib/complex/float64/conj]</span><span class="delimiter">: </span><span class="description">return the complex conjugate of a double-precision complex floating-point number.</span>
- <span class="package-name">[`@stdlib/complex-imagf`][@stdlib/complex/imagf]</span><span class="delimiter">: </span><span class="description">return the imaginary component of a single-precision complex floating-point number.</span>
- <span class="package-name">[`@stdlib/complex-realf`][@stdlib/complex/realf]</span><span class="delimiter">: </span><span class="description">return the real component of a single-precision complex floating-point number.</span>
- <span class="package-name">[`@stdlib/complex-float32/imag`][@stdlib/complex/float32/imag]</span><span class="delimiter">: </span><span class="description">return the imaginary component of a single-precision complex floating-point number.</span>
- <span class="package-name">[`@stdlib/complex-float32/real`][@stdlib/complex/float32/real]</span><span class="delimiter">: </span><span class="description">return the real component of a single-precision complex floating-point number.</span>
- <span class="package-name">[`@stdlib/complex-float32/reim`][@stdlib/complex/float32/reim]</span><span class="delimiter">: </span><span class="description">return the real and imaginary components of a single-precision complex floating-point number.</span>

</section>
Expand Down Expand Up @@ -349,9 +349,9 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].

[@stdlib/complex/float64/conj]: https://github.com/stdlib-js/complex-float64-conj

[@stdlib/complex/imagf]: https://github.com/stdlib-js/complex-imagf
[@stdlib/complex/float32/imag]: https://github.com/stdlib-js/complex-float32-imag

[@stdlib/complex/realf]: https://github.com/stdlib-js/complex-realf
[@stdlib/complex/float32/real]: https://github.com/stdlib-js/complex-float32-real

[@stdlib/complex/float32/reim]: https://github.com/stdlib-js/complex-float32-reim

Expand Down
8 changes: 4 additions & 4 deletions benchmark/c/native/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include "stdlib/complex/float32/conj.h"
#include "stdlib/complex/float32/ctor.h"
#include "stdlib/complex/realf.h"
#include "stdlib/complex/imagf.h"
#include "stdlib/complex/float32/real.h"
#include "stdlib/complex/float32/imag.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
Expand Down Expand Up @@ -108,14 +108,14 @@ double benchmark() {
im = rand_float();
z = stdlib_complex64( re, im );
v = stdlib_complex64_conj( z );
re = stdlib_realf( v );
re = stdlib_complex64_real( v );
if ( re != re ) {
printf( "should not return NaN\n" );
break;
}
}
elapsed = tic() - t;
im = stdlib_imagf( v );
im = stdlib_complex64_imag( v );
if ( im != im ) {
printf( "should not return NaN\n" );
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

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

4 changes: 2 additions & 2 deletions docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import Complex64 = require( '@stdlib/complex-float32-ctor' );
*
* @example
* var Complex64 = require( '@stdlib/complex-float32-ctor' );
* var realf = require( '@stdlib/complex-realf' );
* var imagf = require( '@stdlib/complex-imagf' );
* var realf = require( '@stdlib/complex-float32-real' );
* var imagf = require( '@stdlib/complex-float32-imag' );
*
* var z = new Complex64( 5.0, 3.0 );
*
Expand Down
6 changes: 3 additions & 3 deletions examples/c/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*/

#include "stdlib/complex/float32/conj.h"
#include "stdlib/complex/realf.h"
#include "stdlib/complex/imagf.h"
#include "stdlib/complex/float32/real.h"
#include "stdlib/complex/float32/imag.h"
#include "stdlib/complex/float32/ctor.h"
#include <stdio.h>

Expand All @@ -36,6 +36,6 @@ int main( void ) {
for ( i = 0; i < 4; i++ ) {
z = x[ i ];
v = stdlib_complex64_conj( z );
printf( "conj(%f + %fi) = %f + %fi\n", stdlib_realf( z ), stdlib_imagf( z ), stdlib_realf( v ), stdlib_imagf( v ) );
printf( "conj(%f + %fi) = %f + %fi\n", stdlib_complex64_real( z ), stdlib_complex64_imag( z ), stdlib_complex64_real( v ), stdlib_complex64_imag( v ) );
}
}
2 changes: 1 addition & 1 deletion examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var x = filledarrayBy( 100, 'complex64', random );
// Compute the complex conjugate of each complex number...
var z;
var i;
for ( i = 0; i < 100; i++ ) {
for ( i = 0; i < x.length; i++ ) {
z = x.get( i );
console.log( 'conj(%s) = %s', z.toString(), conj( z ).toString() );
}
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
*
* @example
* var Complex64 = require( '@stdlib/complex-float32-ctor' );
* var realf = require( '@stdlib/complex-realf' );
* var imagf = require( '@stdlib/complex-imagf' );
* var realf = require( '@stdlib/complex-float32-real' );
* var imagf = require( '@stdlib/complex-float32-imag' );
* var conj = require( '@stdlib/complex-float32-conj' );
*
* var z = new Complex64( 5.0, 3.0 );
Expand Down
4 changes: 2 additions & 2 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
*
* @example
* var Complex64 = require( '@stdlib/complex-float32-ctor' );
* var realf = require( '@stdlib/complex-realf' );
* var imagf = require( '@stdlib/complex-imagf' );
* var realf = require( '@stdlib/complex-float32-real' );
* var imagf = require( '@stdlib/complex-float32-imag' );
*
* var z = new Complex64( 5.0, 3.0 );
*
Expand Down
8 changes: 4 additions & 4 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"libpath": [],
"dependencies": [
"@stdlib/complex-float32-ctor",
"@stdlib/complex-realf",
"@stdlib/complex-imagf"
"@stdlib/complex-float32-real",
"@stdlib/complex-float32-imag"
]
},
{
Expand All @@ -67,8 +67,8 @@
"libpath": [],
"dependencies": [
"@stdlib/complex-float32-ctor",
"@stdlib/complex-realf",
"@stdlib/complex-imagf"
"@stdlib/complex-float32-real",
"@stdlib/complex-float32-imag"
]
}
]
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"devDependencies": {
"@stdlib/array-filled-by": "^0.2.1",
"@stdlib/assert-is-complex64": "^0.2.1",
"@stdlib/complex-imagf": "^0.2.1",
"@stdlib/complex-realf": "^0.2.1",
"@stdlib/complex-float32-imag": "github:stdlib-js/complex-float32-imag#main",
"@stdlib/complex-float32-real": "github:stdlib-js/complex-float32-real#main",
"@stdlib/random-base-discrete-uniform": "^0.2.1",
"@stdlib/random-base-randu": "^0.2.1",
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
Expand Down
8 changes: 4 additions & 4 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@
*
* @example
* #include "stdlib/complex/float32/ctor.h"
* #include "stdlib/complex/realf.h"
* #include "stdlib/complex/imagf.h"
* #include "stdlib/complex/float32/real.h"
* #include "stdlib/complex/float32/imag.h"
*
* stdlib_complex64_t z = stdlib_complex64( 5.0f, 2.0f );
*
* // ...
*
* stdlib_complex64_t v = stdlib_complex64_conj( z );
*
* float re = stdlib_realf( v );
* float re = stdlib_complex64_real( v );
* // returns 5.0f
*
* float im = stdlib_imagf( v );
* float im = stdlib_complex64_imag( v );
* // returns -2.0f
*/
stdlib_complex64_t stdlib_complex64_conj( const stdlib_complex64_t z ) {
Expand Down

0 comments on commit 9c529af

Please sign in to comment.