Skip to content

Commit 62b365f

Browse files
authored
docs: improve doctests for complex number instances in math/base/special/cinvf
PR-URL: #9020 Ref: #8641 Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
1 parent b15e507 commit 62b365f

File tree

6 files changed

+6
-50
lines changed

6 files changed

+6
-50
lines changed

lib/node_modules/@stdlib/math/base/special/cinvf/README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,9 @@ Computes the inverse of a single-precision complex floating-point number.
5252

5353
```javascript
5454
var Complex64 = require( '@stdlib/complex/float32/ctor' );
55-
var realf = require( '@stdlib/complex/float32/real' );
56-
var imagf = require( '@stdlib/complex/float32/imag' );
5755

5856
var v = cinvf( new Complex64( 2.0, 4.0 ) );
59-
// returns <Complex64>
60-
61-
var re = realf( v );
62-
// returns ~0.1
63-
64-
var im = imagf( v );
65-
// returns ~-0.2
57+
// returns <Complex64>[ ~0.1, ~-0.2 ]
6658
```
6759

6860
</section>

lib/node_modules/@stdlib/math/base/special/cinvf/docs/repl.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
Examples
1616
--------
1717
> var v = {{alias}}( new {{alias:@stdlib/complex/float32/ctor}}( 2.0, 4.0 ) )
18-
<Complex64>
19-
> var re = {{alias:@stdlib/complex/float32/real}}( v )
20-
~0.1
21-
> var im = {{alias:@stdlib/complex/float32/imag}}( v )
22-
~-0.2
18+
<Complex64>[ ~0.1, ~-0.2 ]
2319

2420
See Also
2521
--------

lib/node_modules/@stdlib/math/base/special/cinvf/docs/types/index.d.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,9 @@ import { Complex64 } from '@stdlib/types/complex';
3030
*
3131
* @example
3232
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
33-
* var realf = require( '@stdlib/complex/float32/real' );
34-
* var imagf = require( '@stdlib/complex/float32/imag' );
3533
*
3634
* var v = cinvf( new Complex64( 2.0, 4.0 ) );
37-
* // returns <Complex64>
38-
*
39-
* var re = realf( v );
40-
* // returns ~0.1
41-
*
42-
* var im = imagf( v );
43-
* // returns ~-0.2
35+
* // returns <Complex64>[ ~0.1, ~-0.2 ]
4436
*/
4537
declare function cinvf( z: Complex64 ): Complex64;
4638

lib/node_modules/@stdlib/math/base/special/cinvf/lib/index.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,10 @@
2525
*
2626
* @example
2727
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
28-
* var realf = require( '@stdlib/complex/float32/real' );
29-
* var imagf = require( '@stdlib/complex/float32/imag' );
3028
* var cinvf = require( '@stdlib/math/base/special/cinvf' );
3129
*
3230
* var v = cinvf( new Complex64( 2.0, 4.0 ) );
33-
* // returns <Complex64>
34-
*
35-
* var re = realf( v );
36-
* // returns ~0.1
37-
*
38-
* var im = imagf( v );
39-
* // returns ~-0.2
31+
* // returns <Complex64>[ ~0.1, ~-0.2 ]
4032
*/
4133

4234
// MODULES //

lib/node_modules/@stdlib/math/base/special/cinvf/lib/main.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,9 @@ var RECIP_EPS_SQR = f32( TWO / f32(EPS*EPS) );
5555
*
5656
* @example
5757
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
58-
* var realf = require( '@stdlib/complex/float32/real' );
59-
* var imagf = require( '@stdlib/complex/float32/imag' );
6058
*
6159
* var v = cinvf( new Complex64( 2.0, 4.0 ) );
62-
* // returns <Complex64>
63-
*
64-
* var re = realf( v );
65-
* // returns ~0.1
66-
*
67-
* var im = imagf( v );
68-
* // returns ~-0.2
60+
* // returns <Complex64>[ ~0.1, ~-0.2 ]
6961
*/
7062
function cinvf( z ) {
7163
var ab;

lib/node_modules/@stdlib/math/base/special/cinvf/lib/native.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,9 @@ var addon = require( './../src/addon.node' );
3535
*
3636
* @example
3737
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
38-
* var realf = require( '@stdlib/complex/float32/real' );
39-
* var imagf = require( '@stdlib/complex/float32/imag' );
4038
*
4139
* var v = cinvf( new Complex64( 2.0, 4.0 ) );
42-
* // returns <Complex64>
43-
*
44-
* var re = realf( v );
45-
* // returns ~0.1
46-
*
47-
* var im = imagf( v );
48-
* // returns ~-0.2
40+
* // returns <Complex64>[ ~0.1, ~-0.2 ]
4941
*/
5042
function cinvf( z ) {
5143
var v = addon( z );

0 commit comments

Comments
 (0)