You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BREAKING CHANGE: APIs renamed and/or moved to subnamespaces
To migrate, users should consult the list of exports to determine
which properties moved where. Double-precision APIs moved to the
`float64` namespace and single-precision APIs moved to the `float32`
namespace. The following properties were renamed:
- complexCtors => ctors
- complexDataType => dtype
- complexDataTypes => dtypes
- complexPromotionRules => promotionRules
- <spanclass="signature">[`base`][@stdlib/complex/base]</span><spanclass="delimiter">: </span><spanclass="description">base (i.e., lower-level) complex number functions.</span>
49
-
- <spanclass="signature">[`complex( real, imag[, dtype] )`][@stdlib/complex/cmplx]</span><spanclass="delimiter">: </span><spanclass="description">create a complex number.</span>
50
-
- <spanclass="signature">[`complexCtors( dtype )`][@stdlib/complex/ctors]</span><spanclass="delimiter">: </span><spanclass="description">complex number constructors.</span>
51
-
- <spanclass="signature">[`complexDataType( value )`][@stdlib/complex/dtype]</span><spanclass="delimiter">: </span><spanclass="description">return the data type of a complex number.</span>
52
-
- <spanclass="signature">[`complexDataTypes()`][@stdlib/complex/dtypes]</span><spanclass="delimiter">: </span><spanclass="description">list of complex number data types.</span>
53
-
- <spanclass="signature">[`complexPromotionRules( [dtype1, dtype2] )`][@stdlib/complex/promotion-rules]</span><spanclass="delimiter">: </span><spanclass="description">return the complex number data type with the smallest size and closest "kind" to which data types can be **safely** cast.</span>
54
-
55
-
</div>
44
+
<!-- <toc pattern="*"> -->
56
45
57
46
<!-- </toc> -->
58
47
59
-
```javascript
60
-
var z =ns.complex( 5.0, 3.0 );
61
-
// returns <Complex128>
62
-
63
-
var str =z.toString();
64
-
// returns '5 + 3i'
65
-
66
-
z =ns.complex( 5.0, 3.0, 'float32' );
67
-
// returns <Complex64>
68
-
69
-
z =newns.Complex64( 5.0, 3.0 );
70
-
// returns <Complex64>
71
-
```
72
-
73
-
In addition, the namespace contains the following functions:
- <spanclass="signature">[`conj( z )`][@stdlib/complex/float64/conj]</span><spanclass="delimiter">: </span><spanclass="description">return the complex conjugate of a double-precision complex floating-point number.</span>
80
-
- <spanclass="signature">[`conjf( z )`][@stdlib/complex/float32/conj]</span><spanclass="delimiter">: </span><spanclass="description">return the complex conjugate of a single-precision complex floating-point number.</span>
81
-
- <spanclass="signature">[`imag( z )`][@stdlib/complex/float64/imag]</span><spanclass="delimiter">: </span><spanclass="description">return the imaginary component of a double-precision complex floating-point number.</span>
82
-
- <spanclass="signature">[`imagf( z )`][@stdlib/complex/float32/imag]</span><spanclass="delimiter">: </span><spanclass="description">return the imaginary component of a single-precision complex floating-point number.</span>
83
-
- <spanclass="signature">[`real( z )`][@stdlib/complex/float64/real]</span><spanclass="delimiter">: </span><spanclass="description">return the real component of a double-precision complex floating-point number.</span>
84
-
- <spanclass="signature">[`realf( z )`][@stdlib/complex/float32/real]</span><spanclass="delimiter">: </span><spanclass="description">return the real component of a single-precision complex floating-point number.</span>
85
-
- <spanclass="signature">[`reim( z )`][@stdlib/complex/float64/reim]</span><spanclass="delimiter">: </span><spanclass="description">return the real and imaginary components of a double-precision complex floating-point number.</span>
86
-
- <spanclass="signature">[`reimf( z )`][@stdlib/complex/float32/reim]</span><spanclass="delimiter">: </span><spanclass="description">return the real and imaginary components of a single-precision complex floating-point number.</span>
87
-
- <spanclass="signature">[`reviveComplex( key, value )`][@stdlib/complex/reviver]</span><spanclass="delimiter">: </span><spanclass="description">revive a JSON-serialized complex number.</span>
0 commit comments