@ohos-ports/stdlib-complex 0.0.0-stage → 0.4.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +177 -0
- package/NOTICE +1 -0
- package/README.md +222 -2
- package/SECURITY.md +5 -0
- package/base/README.md +114 -0
- package/base/assert/README.md +108 -0
- package/base/assert/docs/types/index.d.ts +94 -0
- package/base/assert/docs/types/test.ts +29 -0
- package/base/assert/is-almost-equal/README.md +159 -0
- package/base/assert/is-almost-equal/docs/repl.txt +45 -0
- package/base/assert/is-almost-equal/docs/types/index.d.ts +56 -0
- package/base/assert/is-almost-equal/docs/types/test.ts +83 -0
- package/base/assert/is-almost-equal/lib/index.js +48 -0
- package/base/assert/is-almost-equal/lib/main.js +89 -0
- package/base/assert/is-almost-equal/package.json +73 -0
- package/base/assert/is-almost-same-value/README.md +159 -0
- package/base/assert/is-almost-same-value/docs/repl.txt +41 -0
- package/base/assert/is-almost-same-value/docs/types/index.d.ts +55 -0
- package/base/assert/is-almost-same-value/docs/types/test.ts +83 -0
- package/base/assert/is-almost-same-value/lib/index.js +48 -0
- package/base/assert/is-almost-same-value/lib/main.js +91 -0
- package/base/assert/is-almost-same-value/package.json +73 -0
- package/base/assert/lib/index.js +60 -0
- package/base/assert/package.json +62 -0
- package/base/cast-return/README.md +128 -0
- package/base/cast-return/docs/repl.txt +41 -0
- package/base/cast-return/docs/types/index.d.ts +378 -0
- package/base/cast-return/docs/types/test.ts +192 -0
- package/base/cast-return/lib/index.js +46 -0
- package/base/cast-return/lib/main.js +204 -0
- package/base/cast-return/package.json +65 -0
- package/base/docs/types/index.d.ts +130 -0
- package/base/docs/types/test.ts +29 -0
- package/base/lib/index.js +78 -0
- package/base/package.json +61 -0
- package/base/parse/README.md +137 -0
- package/base/parse/docs/repl.txt +21 -0
- package/base/parse/docs/types/index.d.ts +42 -0
- package/base/parse/docs/types/test.ts +34 -0
- package/base/parse/lib/index.js +42 -0
- package/base/parse/lib/main.js +124 -0
- package/base/parse/package.json +71 -0
- package/base/wrap-function/README.md +128 -0
- package/base/wrap-function/docs/repl.txt +43 -0
- package/base/wrap-function/docs/types/index.d.ts +417 -0
- package/base/wrap-function/docs/types/test.ts +629 -0
- package/base/wrap-function/lib/index.js +46 -0
- package/base/wrap-function/lib/main.js +225 -0
- package/base/wrap-function/package.json +63 -0
- package/cmplx/README.md +137 -0
- package/cmplx/docs/repl.txt +35 -0
- package/cmplx/docs/types/index.d.ts +44 -0
- package/cmplx/docs/types/test.ts +66 -0
- package/cmplx/lib/index.js +40 -0
- package/cmplx/lib/main.js +66 -0
- package/cmplx/package.json +63 -0
- package/ctors/README.md +136 -0
- package/ctors/docs/repl.txt +29 -0
- package/ctors/docs/types/index.d.ts +67 -0
- package/ctors/docs/types/test.ts +35 -0
- package/ctors/lib/ctors.js +38 -0
- package/ctors/lib/index.js +43 -0
- package/ctors/lib/main.js +49 -0
- package/ctors/package.json +72 -0
- package/docs/types/index.d.ts +151 -0
- package/dtype/README.md +142 -0
- package/dtype/docs/repl.txt +28 -0
- package/dtype/docs/types/index.d.ts +82 -0
- package/dtype/docs/types/test.ts +36 -0
- package/dtype/lib/ctor2dtype.js +32 -0
- package/dtype/lib/ctors.js +38 -0
- package/dtype/lib/dtypes.js +33 -0
- package/dtype/lib/index.js +49 -0
- package/dtype/lib/main.js +65 -0
- package/dtype/package.json +67 -0
- package/dtypes/README.md +142 -0
- package/dtypes/docs/repl.txt +22 -0
- package/dtypes/docs/types/index.d.ts +39 -0
- package/dtypes/docs/types/test.ts +33 -0
- package/dtypes/lib/dtypes.json +4 -0
- package/dtypes/lib/index.js +40 -0
- package/dtypes/lib/main.js +44 -0
- package/dtypes/package.json +68 -0
- package/float32/README.md +137 -0
- package/float32/base/README.md +140 -0
- package/float32/base/add/README.md +279 -0
- package/float32/base/add/docs/repl.txt +118 -0
- package/float32/base/add/docs/types/index.d.ts +136 -0
- package/float32/base/add/docs/types/test.ts +356 -0
- package/float32/base/add/include/stdlib/complex/float32/base/add.h +40 -0
- package/float32/base/add/lib/assign.js +55 -0
- package/float32/base/add/lib/index.js +54 -0
- package/float32/base/add/lib/main.js +55 -0
- package/float32/base/add/lib/native.js +53 -0
- package/float32/base/add/lib/strided.js +60 -0
- package/float32/base/add/manifest.json +75 -0
- package/float32/base/add/package.json +69 -0
- package/float32/base/add/src/addon.c +22 -0
- package/float32/base/add/src/main.c +60 -0
- package/float32/base/add3/README.md +275 -0
- package/float32/base/add3/docs/repl.txt +133 -0
- package/float32/base/add3/docs/types/index.d.ts +145 -0
- package/float32/base/add3/docs/types/test.ts +465 -0
- package/float32/base/add3/include/stdlib/complex/float32/base/add3.h +40 -0
- package/float32/base/add3/lib/assign.js +57 -0
- package/float32/base/add3/lib/index.js +54 -0
- package/float32/base/add3/lib/main.js +56 -0
- package/float32/base/add3/lib/native.js +54 -0
- package/float32/base/add3/lib/strided.js +64 -0
- package/float32/base/add3/manifest.json +75 -0
- package/float32/base/add3/package.json +69 -0
- package/float32/base/add3/src/addon.c +22 -0
- package/float32/base/add3/src/main.c +64 -0
- package/float32/base/assert/README.md +120 -0
- package/float32/base/assert/docs/types/index.d.ts +181 -0
- package/float32/base/assert/docs/types/test.ts +29 -0
- package/float32/base/assert/is-almost-equal/README.md +158 -0
- package/float32/base/assert/is-almost-equal/docs/repl.txt +45 -0
- package/float32/base/assert/is-almost-equal/docs/types/index.d.ts +56 -0
- package/float32/base/assert/is-almost-equal/docs/types/test.ts +83 -0
- package/float32/base/assert/is-almost-equal/lib/index.js +48 -0
- package/float32/base/assert/is-almost-equal/lib/main.js +67 -0
- package/float32/base/assert/is-almost-equal/package.json +73 -0
- package/float32/base/assert/is-almost-same-value/README.md +158 -0
- package/float32/base/assert/is-almost-same-value/docs/repl.txt +43 -0
- package/float32/base/assert/is-almost-same-value/docs/types/index.d.ts +55 -0
- package/float32/base/assert/is-almost-same-value/docs/types/test.ts +83 -0
- package/float32/base/assert/is-almost-same-value/lib/index.js +48 -0
- package/float32/base/assert/is-almost-same-value/lib/main.js +69 -0
- package/float32/base/assert/is-almost-same-value/package.json +74 -0
- package/float32/base/assert/is-equal/README.md +221 -0
- package/float32/base/assert/is-equal/docs/repl.txt +27 -0
- package/float32/base/assert/is-equal/docs/types/index.d.ts +46 -0
- package/float32/base/assert/is-equal/docs/types/test.ts +67 -0
- package/float32/base/assert/is-equal/include/stdlib/complex/float32/base/assert/is_equal.h +41 -0
- package/float32/base/assert/is-equal/lib/index.js +44 -0
- package/float32/base/assert/is-equal/lib/main.js +56 -0
- package/float32/base/assert/is-equal/manifest.json +59 -0
- package/float32/base/assert/is-equal/package.json +71 -0
- package/float32/base/assert/is-equal/src/main.c +48 -0
- package/float32/base/assert/is-not-equal/README.md +221 -0
- package/float32/base/assert/is-not-equal/docs/repl.txt +28 -0
- package/float32/base/assert/is-not-equal/docs/types/index.d.ts +46 -0
- package/float32/base/assert/is-not-equal/docs/types/test.ts +67 -0
- package/float32/base/assert/is-not-equal/include/stdlib/complex/float32/base/assert/is_not_equal.h +41 -0
- package/float32/base/assert/is-not-equal/lib/index.js +44 -0
- package/float32/base/assert/is-not-equal/lib/main.js +56 -0
- package/float32/base/assert/is-not-equal/manifest.json +59 -0
- package/float32/base/assert/is-not-equal/package.json +72 -0
- package/float32/base/assert/is-not-equal/src/main.c +48 -0
- package/float32/base/assert/is-same-value/README.md +245 -0
- package/float32/base/assert/is-same-value/docs/repl.txt +31 -0
- package/float32/base/assert/is-same-value/docs/types/index.d.ts +53 -0
- package/float32/base/assert/is-same-value/docs/types/test.ts +67 -0
- package/float32/base/assert/is-same-value/include/stdlib/complex/float32/base/assert/is_same_value.h +41 -0
- package/float32/base/assert/is-same-value/lib/index.js +44 -0
- package/float32/base/assert/is-same-value/lib/main.js +64 -0
- package/float32/base/assert/is-same-value/manifest.json +61 -0
- package/float32/base/assert/is-same-value/package.json +74 -0
- package/float32/base/assert/is-same-value/src/main.c +52 -0
- package/float32/base/assert/is-same-value-zero/README.md +247 -0
- package/float32/base/assert/is-same-value-zero/docs/repl.txt +31 -0
- package/float32/base/assert/is-same-value-zero/docs/types/index.d.ts +50 -0
- package/float32/base/assert/is-same-value-zero/docs/types/test.ts +67 -0
- package/float32/base/assert/is-same-value-zero/include/stdlib/complex/float32/base/assert/is_same_value_zero.h +41 -0
- package/float32/base/assert/is-same-value-zero/lib/index.js +44 -0
- package/float32/base/assert/is-same-value-zero/lib/main.js +62 -0
- package/float32/base/assert/is-same-value-zero/manifest.json +61 -0
- package/float32/base/assert/is-same-value-zero/package.json +74 -0
- package/float32/base/assert/is-same-value-zero/src/main.c +52 -0
- package/float32/base/assert/lib/index.js +96 -0
- package/float32/base/assert/package.json +63 -0
- package/float32/base/docs/types/index.d.ts +297 -0
- package/float32/base/docs/types/test.ts +29 -0
- package/float32/base/identity/README.md +233 -0
- package/float32/base/identity/docs/img/equation_identity_function.svg +18 -0
- package/float32/base/identity/docs/repl.txt +27 -0
- package/float32/base/identity/docs/types/index.d.ts +42 -0
- package/float32/base/identity/docs/types/test.ts +45 -0
- package/float32/base/identity/include/stdlib/complex/float32/base/identity.h +40 -0
- package/float32/base/identity/lib/index.js +41 -0
- package/float32/base/identity/lib/main.js +42 -0
- package/float32/base/identity/lib/native.js +50 -0
- package/float32/base/identity/manifest.json +75 -0
- package/float32/base/identity/package.json +68 -0
- package/float32/base/identity/src/addon.c +22 -0
- package/float32/base/identity/src/main.c +44 -0
- package/float32/base/lib/index.js +123 -0
- package/float32/base/mul/README.md +281 -0
- package/float32/base/mul/docs/repl.txt +120 -0
- package/float32/base/mul/docs/types/index.d.ts +138 -0
- package/float32/base/mul/docs/types/test.ts +356 -0
- package/float32/base/mul/include/stdlib/complex/float32/base/mul.h +40 -0
- package/float32/base/mul/lib/assign.js +55 -0
- package/float32/base/mul/lib/index.js +55 -0
- package/float32/base/mul/lib/main.js +60 -0
- package/float32/base/mul/lib/native.js +54 -0
- package/float32/base/mul/lib/strided.js +64 -0
- package/float32/base/mul/manifest.json +95 -0
- package/float32/base/mul/package.json +69 -0
- package/float32/base/mul/src/addon.c +22 -0
- package/float32/base/mul/src/main.c +61 -0
- package/float32/base/mul-add/README.md +286 -0
- package/float32/base/mul-add/docs/repl.txt +141 -0
- package/float32/base/mul-add/docs/types/index.d.ts +151 -0
- package/float32/base/mul-add/docs/types/test.ts +465 -0
- package/float32/base/mul-add/include/stdlib/complex/float32/base/mul_add.h +40 -0
- package/float32/base/mul-add/lib/assign.js +57 -0
- package/float32/base/mul-add/lib/index.js +56 -0
- package/float32/base/mul-add/lib/main.js +64 -0
- package/float32/base/mul-add/lib/native.js +56 -0
- package/float32/base/mul-add/lib/strided.js +70 -0
- package/float32/base/mul-add/manifest.json +75 -0
- package/float32/base/mul-add/package.json +70 -0
- package/float32/base/mul-add/src/addon.c +22 -0
- package/float32/base/mul-add/src/main.c +66 -0
- package/float32/base/neg/README.md +259 -0
- package/float32/base/neg/docs/repl.txt +28 -0
- package/float32/base/neg/docs/types/index.d.ts +60 -0
- package/float32/base/neg/docs/types/test.ts +51 -0
- package/float32/base/neg/include/stdlib/complex/float32/base/neg.h +40 -0
- package/float32/base/neg/lib/index.js +61 -0
- package/float32/base/neg/lib/main.js +67 -0
- package/float32/base/neg/lib/native.js +68 -0
- package/float32/base/neg/manifest.json +75 -0
- package/float32/base/neg/package.json +67 -0
- package/float32/base/neg/src/addon.c +22 -0
- package/float32/base/neg/src/main.c +50 -0
- package/float32/base/package.json +67 -0
- package/float32/base/scale/README.md +263 -0
- package/float32/base/scale/docs/repl.txt +110 -0
- package/float32/base/scale/docs/types/index.d.ts +131 -0
- package/float32/base/scale/docs/types/test.ts +296 -0
- package/float32/base/scale/include/stdlib/complex/float32/base/scale.h +40 -0
- package/float32/base/scale/lib/assign.js +54 -0
- package/float32/base/scale/lib/index.js +54 -0
- package/float32/base/scale/lib/main.js +53 -0
- package/float32/base/scale/lib/native.js +53 -0
- package/float32/base/scale/lib/strided.js +57 -0
- package/float32/base/scale/manifest.json +75 -0
- package/float32/base/scale/package.json +69 -0
- package/float32/base/scale/src/addon.c +22 -0
- package/float32/base/scale/src/main.c +51 -0
- package/float32/base/sub/README.md +225 -0
- package/float32/base/sub/docs/repl.txt +33 -0
- package/float32/base/sub/docs/types/index.d.ts +46 -0
- package/float32/base/sub/docs/types/test.ts +67 -0
- package/float32/base/sub/include/stdlib/complex/float32/base/sub.h +40 -0
- package/float32/base/sub/lib/index.js +44 -0
- package/float32/base/sub/lib/main.js +56 -0
- package/float32/base/sub/lib/native.js +54 -0
- package/float32/base/sub/manifest.json +75 -0
- package/float32/base/sub/package.json +72 -0
- package/float32/base/sub/src/addon.c +22 -0
- package/float32/base/sub/src/main.c +62 -0
- package/float32/conj/README.md +258 -0
- package/float32/conj/docs/repl.txt +27 -0
- package/float32/conj/docs/types/index.d.ts +42 -0
- package/float32/conj/docs/types/test.ts +45 -0
- package/float32/conj/include/stdlib/complex/float32/conj.h +40 -0
- package/float32/conj/lib/index.js +43 -0
- package/float32/conj/lib/main.js +42 -0
- package/float32/conj/manifest.json +75 -0
- package/float32/conj/package.json +64 -0
- package/float32/conj/src/main.c +49 -0
- package/float32/ctor/README.md +547 -0
- package/float32/ctor/docs/repl.txt +93 -0
- package/float32/ctor/docs/types/index.d.ts +120 -0
- package/float32/ctor/docs/types/test.ts +59 -0
- package/float32/ctor/include/stdlib/complex/float32/ctor.h +148 -0
- package/float32/ctor/lib/index.js +40 -0
- package/float32/ctor/lib/main.js +164 -0
- package/float32/ctor/lib/tojson.js +39 -0
- package/float32/ctor/lib/tostring.js +42 -0
- package/float32/ctor/manifest.json +38 -0
- package/float32/ctor/package.json +70 -0
- package/float32/ctor/src/main.c +151 -0
- package/float32/docs/types/index.d.ts +151 -0
- package/float32/docs/types/test.ts +29 -0
- package/float32/imag/README.md +239 -0
- package/float32/imag/docs/repl.txt +24 -0
- package/float32/imag/docs/types/index.d.ts +44 -0
- package/float32/imag/docs/types/test.ts +45 -0
- package/float32/imag/include/stdlib/complex/float32/imag.h +40 -0
- package/float32/imag/lib/index.js +43 -0
- package/float32/imag/lib/main.js +42 -0
- package/float32/imag/manifest.json +40 -0
- package/float32/imag/package.json +67 -0
- package/float32/imag/src/main.c +42 -0
- package/float32/lib/index.js +114 -0
- package/float32/package.json +61 -0
- package/float32/parse/README.md +133 -0
- package/float32/parse/docs/repl.txt +22 -0
- package/float32/parse/docs/types/index.d.ts +46 -0
- package/float32/parse/docs/types/test.ts +44 -0
- package/float32/parse/lib/index.js +42 -0
- package/float32/parse/lib/main.js +90 -0
- package/float32/parse/package.json +67 -0
- package/float32/real/README.md +239 -0
- package/float32/real/docs/repl.txt +24 -0
- package/float32/real/docs/types/index.d.ts +44 -0
- package/float32/real/docs/types/test.ts +45 -0
- package/float32/real/include/stdlib/complex/float32/real.h +40 -0
- package/float32/real/lib/index.js +43 -0
- package/float32/real/lib/main.js +42 -0
- package/float32/real/manifest.json +40 -0
- package/float32/real/package.json +67 -0
- package/float32/real/src/main.c +42 -0
- package/float32/reim/README.md +248 -0
- package/float32/reim/docs/repl.txt +24 -0
- package/float32/reim/docs/types/index.d.ts +44 -0
- package/float32/reim/docs/types/test.ts +45 -0
- package/float32/reim/include/stdlib/complex/float32/reim.h +40 -0
- package/float32/reim/lib/index.js +43 -0
- package/float32/reim/lib/main.js +52 -0
- package/float32/reim/manifest.json +40 -0
- package/float32/reim/package.json +67 -0
- package/float32/reim/src/main.c +46 -0
- package/float32/reviver/README.md +145 -0
- package/float32/reviver/docs/repl.txt +26 -0
- package/float32/reviver/docs/types/index.d.ts +41 -0
- package/float32/reviver/docs/types/test.ts +50 -0
- package/float32/reviver/lib/index.js +43 -0
- package/float32/reviver/lib/main.js +60 -0
- package/float32/reviver/package.json +72 -0
- package/float64/README.md +137 -0
- package/float64/base/README.md +143 -0
- package/float64/base/add/README.md +279 -0
- package/float64/base/add/docs/repl.txt +118 -0
- package/float64/base/add/docs/types/index.d.ts +136 -0
- package/float64/base/add/docs/types/test.ts +357 -0
- package/float64/base/add/include/stdlib/complex/float64/base/add.h +40 -0
- package/float64/base/add/lib/assign.js +50 -0
- package/float64/base/add/lib/index.js +54 -0
- package/float64/base/add/lib/main.js +54 -0
- package/float64/base/add/lib/native.js +53 -0
- package/float64/base/add/lib/strided.js +55 -0
- package/float64/base/add/manifest.json +75 -0
- package/float64/base/add/package.json +68 -0
- package/float64/base/add/src/addon.c +22 -0
- package/float64/base/add/src/main.c +60 -0
- package/float64/base/add3/README.md +275 -0
- package/float64/base/add3/docs/repl.txt +133 -0
- package/float64/base/add3/docs/types/index.d.ts +145 -0
- package/float64/base/add3/docs/types/test.ts +467 -0
- package/float64/base/add3/include/stdlib/complex/float64/base/add3.h +40 -0
- package/float64/base/add3/lib/assign.js +52 -0
- package/float64/base/add3/lib/index.js +54 -0
- package/float64/base/add3/lib/main.js +55 -0
- package/float64/base/add3/lib/native.js +54 -0
- package/float64/base/add3/lib/strided.js +59 -0
- package/float64/base/add3/manifest.json +75 -0
- package/float64/base/add3/package.json +68 -0
- package/float64/base/add3/src/addon.c +22 -0
- package/float64/base/add3/src/main.c +64 -0
- package/float64/base/assert/README.md +120 -0
- package/float64/base/assert/docs/types/index.d.ts +181 -0
- package/float64/base/assert/docs/types/test.ts +29 -0
- package/float64/base/assert/is-almost-equal/README.md +158 -0
- package/float64/base/assert/is-almost-equal/docs/repl.txt +45 -0
- package/float64/base/assert/is-almost-equal/docs/types/index.d.ts +56 -0
- package/float64/base/assert/is-almost-equal/docs/types/test.ts +83 -0
- package/float64/base/assert/is-almost-equal/lib/index.js +48 -0
- package/float64/base/assert/is-almost-equal/lib/main.js +67 -0
- package/float64/base/assert/is-almost-equal/package.json +73 -0
- package/float64/base/assert/is-almost-same-value/README.md +158 -0
- package/float64/base/assert/is-almost-same-value/docs/repl.txt +43 -0
- package/float64/base/assert/is-almost-same-value/docs/types/index.d.ts +55 -0
- package/float64/base/assert/is-almost-same-value/docs/types/test.ts +83 -0
- package/float64/base/assert/is-almost-same-value/lib/index.js +48 -0
- package/float64/base/assert/is-almost-same-value/lib/main.js +69 -0
- package/float64/base/assert/is-almost-same-value/package.json +74 -0
- package/float64/base/assert/is-equal/README.md +221 -0
- package/float64/base/assert/is-equal/docs/repl.txt +27 -0
- package/float64/base/assert/is-equal/docs/types/index.d.ts +46 -0
- package/float64/base/assert/is-equal/docs/types/test.ts +67 -0
- package/float64/base/assert/is-equal/include/stdlib/complex/float64/base/assert/is_equal.h +41 -0
- package/float64/base/assert/is-equal/lib/index.js +44 -0
- package/float64/base/assert/is-equal/lib/main.js +56 -0
- package/float64/base/assert/is-equal/manifest.json +59 -0
- package/float64/base/assert/is-equal/package.json +71 -0
- package/float64/base/assert/is-equal/src/main.c +48 -0
- package/float64/base/assert/is-not-equal/README.md +221 -0
- package/float64/base/assert/is-not-equal/docs/repl.txt +28 -0
- package/float64/base/assert/is-not-equal/docs/types/index.d.ts +46 -0
- package/float64/base/assert/is-not-equal/docs/types/test.ts +67 -0
- package/float64/base/assert/is-not-equal/include/stdlib/complex/float64/base/assert/is_not_equal.h +41 -0
- package/float64/base/assert/is-not-equal/lib/index.js +44 -0
- package/float64/base/assert/is-not-equal/lib/main.js +56 -0
- package/float64/base/assert/is-not-equal/manifest.json +59 -0
- package/float64/base/assert/is-not-equal/package.json +72 -0
- package/float64/base/assert/is-not-equal/src/main.c +48 -0
- package/float64/base/assert/is-same-value/README.md +245 -0
- package/float64/base/assert/is-same-value/docs/repl.txt +31 -0
- package/float64/base/assert/is-same-value/docs/types/index.d.ts +53 -0
- package/float64/base/assert/is-same-value/docs/types/test.ts +67 -0
- package/float64/base/assert/is-same-value/include/stdlib/complex/float64/base/assert/is_same_value.h +41 -0
- package/float64/base/assert/is-same-value/lib/index.js +44 -0
- package/float64/base/assert/is-same-value/lib/main.js +64 -0
- package/float64/base/assert/is-same-value/manifest.json +61 -0
- package/float64/base/assert/is-same-value/package.json +74 -0
- package/float64/base/assert/is-same-value/src/main.c +52 -0
- package/float64/base/assert/is-same-value-zero/README.md +247 -0
- package/float64/base/assert/is-same-value-zero/docs/repl.txt +31 -0
- package/float64/base/assert/is-same-value-zero/docs/types/index.d.ts +50 -0
- package/float64/base/assert/is-same-value-zero/docs/types/test.ts +67 -0
- package/float64/base/assert/is-same-value-zero/include/stdlib/complex/float64/base/assert/is_same_value_zero.h +41 -0
- package/float64/base/assert/is-same-value-zero/lib/index.js +44 -0
- package/float64/base/assert/is-same-value-zero/lib/main.js +62 -0
- package/float64/base/assert/is-same-value-zero/manifest.json +61 -0
- package/float64/base/assert/is-same-value-zero/package.json +74 -0
- package/float64/base/assert/is-same-value-zero/src/main.c +52 -0
- package/float64/base/assert/lib/index.js +96 -0
- package/float64/base/assert/package.json +63 -0
- package/float64/base/div/README.md +304 -0
- package/float64/base/div/docs/repl.txt +119 -0
- package/float64/base/div/docs/types/index.d.ts +119 -0
- package/float64/base/div/docs/types/test.ts +357 -0
- package/float64/base/div/include/stdlib/complex/float64/base/div.h +40 -0
- package/float64/base/div/lib/assign.js +106 -0
- package/float64/base/div/lib/index.js +55 -0
- package/float64/base/div/lib/internal_compreal.js +56 -0
- package/float64/base/div/lib/main.js +76 -0
- package/float64/base/div/lib/native.js +54 -0
- package/float64/base/div/lib/robust_internal.js +61 -0
- package/float64/base/div/lib/strided.js +58 -0
- package/float64/base/div/manifest.json +87 -0
- package/float64/base/div/package.json +68 -0
- package/float64/base/div/src/addon.c +22 -0
- package/float64/base/div/src/main.c +173 -0
- package/float64/base/docs/types/index.d.ts +316 -0
- package/float64/base/docs/types/test.ts +29 -0
- package/float64/base/identity/README.md +235 -0
- package/float64/base/identity/docs/img/equation_identity_function.svg +18 -0
- package/float64/base/identity/docs/repl.txt +27 -0
- package/float64/base/identity/docs/types/index.d.ts +42 -0
- package/float64/base/identity/docs/types/test.ts +45 -0
- package/float64/base/identity/include/stdlib/complex/float64/base/identity.h +40 -0
- package/float64/base/identity/lib/index.js +41 -0
- package/float64/base/identity/lib/main.js +42 -0
- package/float64/base/identity/lib/native.js +50 -0
- package/float64/base/identity/manifest.json +75 -0
- package/float64/base/identity/package.json +68 -0
- package/float64/base/identity/src/addon.c +22 -0
- package/float64/base/identity/src/main.c +44 -0
- package/float64/base/lib/index.js +132 -0
- package/float64/base/mul/README.md +288 -0
- package/float64/base/mul/docs/repl.txt +120 -0
- package/float64/base/mul/docs/types/index.d.ts +138 -0
- package/float64/base/mul/docs/types/test.ts +358 -0
- package/float64/base/mul/include/stdlib/complex/float64/base/mul.h +40 -0
- package/float64/base/mul/lib/assign.js +50 -0
- package/float64/base/mul/lib/index.js +55 -0
- package/float64/base/mul/lib/main.js +59 -0
- package/float64/base/mul/lib/native.js +54 -0
- package/float64/base/mul/lib/strided.js +59 -0
- package/float64/base/mul/manifest.json +95 -0
- package/float64/base/mul/package.json +69 -0
- package/float64/base/mul/src/addon.c +22 -0
- package/float64/base/mul/src/main.c +61 -0
- package/float64/base/mul-add/README.md +286 -0
- package/float64/base/mul-add/docs/repl.txt +142 -0
- package/float64/base/mul-add/docs/types/index.d.ts +151 -0
- package/float64/base/mul-add/docs/types/test.ts +467 -0
- package/float64/base/mul-add/include/stdlib/complex/float64/base/mul_add.h +40 -0
- package/float64/base/mul-add/lib/assign.js +52 -0
- package/float64/base/mul-add/lib/index.js +56 -0
- package/float64/base/mul-add/lib/main.js +63 -0
- package/float64/base/mul-add/lib/native.js +56 -0
- package/float64/base/mul-add/lib/strided.js +65 -0
- package/float64/base/mul-add/manifest.json +75 -0
- package/float64/base/mul-add/package.json +70 -0
- package/float64/base/mul-add/src/addon.c +22 -0
- package/float64/base/mul-add/src/main.c +66 -0
- package/float64/base/neg/README.md +257 -0
- package/float64/base/neg/docs/repl.txt +28 -0
- package/float64/base/neg/docs/types/index.d.ts +60 -0
- package/float64/base/neg/docs/types/test.ts +51 -0
- package/float64/base/neg/include/stdlib/complex/float64/base/neg.h +40 -0
- package/float64/base/neg/lib/index.js +61 -0
- package/float64/base/neg/lib/main.js +67 -0
- package/float64/base/neg/lib/native.js +68 -0
- package/float64/base/neg/manifest.json +75 -0
- package/float64/base/neg/package.json +67 -0
- package/float64/base/neg/src/addon.c +22 -0
- package/float64/base/neg/src/main.c +49 -0
- package/float64/base/package.json +67 -0
- package/float64/base/scale/README.md +263 -0
- package/float64/base/scale/docs/repl.txt +106 -0
- package/float64/base/scale/docs/types/index.d.ts +131 -0
- package/float64/base/scale/docs/types/test.ts +297 -0
- package/float64/base/scale/include/stdlib/complex/float64/base/scale.h +40 -0
- package/float64/base/scale/lib/assign.js +49 -0
- package/float64/base/scale/lib/index.js +54 -0
- package/float64/base/scale/lib/main.js +52 -0
- package/float64/base/scale/lib/native.js +53 -0
- package/float64/base/scale/lib/strided.js +52 -0
- package/float64/base/scale/manifest.json +75 -0
- package/float64/base/scale/package.json +69 -0
- package/float64/base/scale/src/addon.c +22 -0
- package/float64/base/scale/src/main.c +51 -0
- package/float64/base/sub/README.md +226 -0
- package/float64/base/sub/docs/repl.txt +33 -0
- package/float64/base/sub/docs/types/index.d.ts +46 -0
- package/float64/base/sub/docs/types/test.ts +67 -0
- package/float64/base/sub/include/stdlib/complex/float64/base/sub.h +40 -0
- package/float64/base/sub/lib/index.js +44 -0
- package/float64/base/sub/lib/main.js +55 -0
- package/float64/base/sub/lib/native.js +54 -0
- package/float64/base/sub/manifest.json +75 -0
- package/float64/base/sub/package.json +71 -0
- package/float64/base/sub/src/addon.c +22 -0
- package/float64/base/sub/src/main.c +61 -0
- package/float64/conj/README.md +255 -0
- package/float64/conj/docs/repl.txt +27 -0
- package/float64/conj/docs/types/index.d.ts +42 -0
- package/float64/conj/docs/types/test.ts +45 -0
- package/float64/conj/include/stdlib/complex/float64/conj.h +40 -0
- package/float64/conj/lib/index.js +43 -0
- package/float64/conj/lib/main.js +48 -0
- package/float64/conj/lib/native.js +52 -0
- package/float64/conj/manifest.json +76 -0
- package/float64/conj/package.json +65 -0
- package/float64/conj/src/addon.c +22 -0
- package/float64/conj/src/main.c +49 -0
- package/float64/ctor/README.md +617 -0
- package/float64/ctor/docs/repl.txt +84 -0
- package/float64/ctor/docs/types/index.d.ts +120 -0
- package/float64/ctor/docs/types/test.ts +69 -0
- package/float64/ctor/include/stdlib/complex/float64/ctor.h +169 -0
- package/float64/ctor/lib/index.js +40 -0
- package/float64/ctor/lib/main.js +163 -0
- package/float64/ctor/lib/tojson.js +39 -0
- package/float64/ctor/lib/tostring.js +42 -0
- package/float64/ctor/manifest.json +40 -0
- package/float64/ctor/package.json +69 -0
- package/float64/ctor/src/main.c +224 -0
- package/float64/docs/types/index.d.ts +151 -0
- package/float64/docs/types/test.ts +29 -0
- package/float64/imag/README.md +236 -0
- package/float64/imag/docs/repl.txt +24 -0
- package/float64/imag/docs/types/index.d.ts +44 -0
- package/float64/imag/docs/types/test.ts +45 -0
- package/float64/imag/include/stdlib/complex/float64/imag.h +40 -0
- package/float64/imag/lib/index.js +43 -0
- package/float64/imag/lib/main.js +42 -0
- package/float64/imag/manifest.json +40 -0
- package/float64/imag/package.json +67 -0
- package/float64/imag/src/main.c +42 -0
- package/float64/lib/index.js +114 -0
- package/float64/package.json +61 -0
- package/float64/parse/README.md +132 -0
- package/float64/parse/docs/repl.txt +23 -0
- package/float64/parse/docs/types/index.d.ts +46 -0
- package/float64/parse/docs/types/test.ts +44 -0
- package/float64/parse/lib/index.js +42 -0
- package/float64/parse/lib/main.js +90 -0
- package/float64/parse/package.json +67 -0
- package/float64/real/README.md +236 -0
- package/float64/real/docs/repl.txt +24 -0
- package/float64/real/docs/types/index.d.ts +44 -0
- package/float64/real/docs/types/test.ts +45 -0
- package/float64/real/include/stdlib/complex/float64/real.h +40 -0
- package/float64/real/lib/index.js +43 -0
- package/float64/real/lib/main.js +42 -0
- package/float64/real/manifest.json +40 -0
- package/float64/real/package.json +67 -0
- package/float64/real/src/main.c +42 -0
- package/float64/reim/README.md +245 -0
- package/float64/reim/docs/repl.txt +24 -0
- package/float64/reim/docs/types/index.d.ts +44 -0
- package/float64/reim/docs/types/test.ts +45 -0
- package/float64/reim/include/stdlib/complex/float64/reim.h +40 -0
- package/float64/reim/lib/index.js +43 -0
- package/float64/reim/lib/main.js +52 -0
- package/float64/reim/manifest.json +40 -0
- package/float64/reim/package.json +67 -0
- package/float64/reim/src/main.c +46 -0
- package/float64/reviver/README.md +145 -0
- package/float64/reviver/docs/repl.txt +26 -0
- package/float64/reviver/docs/types/index.d.ts +41 -0
- package/float64/reviver/docs/types/test.ts +50 -0
- package/float64/reviver/lib/index.js +43 -0
- package/float64/reviver/lib/main.js +60 -0
- package/float64/reviver/package.json +72 -0
- package/lib/index.js +123 -0
- package/package.json +71 -4
- package/promotion-rules/README.md +164 -0
- package/promotion-rules/docs/repl.txt +33 -0
- package/promotion-rules/docs/types/index.d.ts +102 -0
- package/promotion-rules/docs/types/test.ts +66 -0
- package/promotion-rules/lib/index.js +46 -0
- package/promotion-rules/lib/main.js +102 -0
- package/promotion-rules/lib/promotion_rules.json +64 -0
- package/promotion-rules/package.json +69 -0
- package/reviver/README.md +148 -0
- package/reviver/docs/repl.txt +33 -0
- package/reviver/docs/types/index.d.ts +41 -0
- package/reviver/docs/types/test.ts +45 -0
- package/reviver/lib/ctors.js +37 -0
- package/reviver/lib/index.js +43 -0
- package/reviver/lib/main.js +63 -0
- package/reviver/package.json +73 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
|
|
3
|
+
@license Apache-2.0
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2024 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
|
+
# Complex128
|
|
22
|
+
|
|
23
|
+
> Double-precision complex floating-point number functions.
|
|
24
|
+
|
|
25
|
+
<section class="usage">
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
```javascript
|
|
30
|
+
var complex = require( '@stdlib/complex/float64' );
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
#### complex
|
|
34
|
+
|
|
35
|
+
Namespace containing double-precision complex floating-point number functions.
|
|
36
|
+
|
|
37
|
+
```javascript
|
|
38
|
+
var ns = complex;
|
|
39
|
+
// returns {...}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The namespace contains the following sub-namespaces:
|
|
43
|
+
|
|
44
|
+
<!-- <toc pattern="+(base)"> -->
|
|
45
|
+
|
|
46
|
+
<div class="namespace-toc">
|
|
47
|
+
|
|
48
|
+
- <span class="signature">[`base`][@stdlib/complex/float64/base]</span><span class="delimiter">: </span><span class="description">base (i.e., lower-level) double-precision complex floating-point number functions.</span>
|
|
49
|
+
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<!-- </toc> -->
|
|
53
|
+
|
|
54
|
+
The namespace contains the following functions:
|
|
55
|
+
|
|
56
|
+
<!-- <toc pattern="*"> -->
|
|
57
|
+
|
|
58
|
+
<div class="namespace-toc">
|
|
59
|
+
|
|
60
|
+
- <span class="signature">[`conj( z )`][@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>
|
|
61
|
+
- <span class="signature">[`Complex128( real, imag )`][@stdlib/complex/float64/ctor]</span><span class="delimiter">: </span><span class="description">128-bit complex number.</span>
|
|
62
|
+
- <span class="signature">[`imag( z )`][@stdlib/complex/float64/imag]</span><span class="delimiter">: </span><span class="description">return the imaginary component of a double-precision complex floating-point number.</span>
|
|
63
|
+
- <span class="signature">[`parseComplex128( str )`][@stdlib/complex/float64/parse]</span><span class="delimiter">: </span><span class="description">parse a string representation of a 128-bit complex number.</span>
|
|
64
|
+
- <span class="signature">[`real( z )`][@stdlib/complex/float64/real]</span><span class="delimiter">: </span><span class="description">return the real component of a double-precision complex floating-point number.</span>
|
|
65
|
+
- <span class="signature">[`reim( z )`][@stdlib/complex/float64/reim]</span><span class="delimiter">: </span><span class="description">return the real and imaginary components of a double-precision complex floating-point number.</span>
|
|
66
|
+
- <span class="signature">[`reviveComplex128( key, value )`][@stdlib/complex/float64/reviver]</span><span class="delimiter">: </span><span class="description">revive a JSON-serialized 128-bit complex number.</span>
|
|
67
|
+
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<!-- </toc> -->
|
|
71
|
+
|
|
72
|
+
</section>
|
|
73
|
+
|
|
74
|
+
<!-- /.usage -->
|
|
75
|
+
|
|
76
|
+
<!-- Package notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
|
|
77
|
+
|
|
78
|
+
<section class="notes">
|
|
79
|
+
|
|
80
|
+
</section>
|
|
81
|
+
|
|
82
|
+
<!-- /.notes -->
|
|
83
|
+
|
|
84
|
+
<section class="examples">
|
|
85
|
+
|
|
86
|
+
## Examples
|
|
87
|
+
|
|
88
|
+
<!-- TODO: better examples -->
|
|
89
|
+
|
|
90
|
+
<!-- eslint no-undef: "error" -->
|
|
91
|
+
|
|
92
|
+
```javascript
|
|
93
|
+
var objectKeys = require( '@stdlib/utils/keys' );
|
|
94
|
+
var ns = require( '@stdlib/complex/float64' );
|
|
95
|
+
|
|
96
|
+
console.log( objectKeys( ns ) );
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
</section>
|
|
100
|
+
|
|
101
|
+
<!-- /.examples -->
|
|
102
|
+
|
|
103
|
+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
|
|
104
|
+
|
|
105
|
+
<section class="related">
|
|
106
|
+
|
|
107
|
+
</section>
|
|
108
|
+
|
|
109
|
+
<!-- /.related -->
|
|
110
|
+
|
|
111
|
+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
|
|
112
|
+
|
|
113
|
+
<section class="links">
|
|
114
|
+
|
|
115
|
+
<!-- <toc-links> -->
|
|
116
|
+
|
|
117
|
+
[@stdlib/complex/float64/conj]: https://github.com/stdlib-js/complex/tree/main/float64/conj
|
|
118
|
+
|
|
119
|
+
[@stdlib/complex/float64/ctor]: https://github.com/stdlib-js/complex/tree/main/float64/ctor
|
|
120
|
+
|
|
121
|
+
[@stdlib/complex/float64/imag]: https://github.com/stdlib-js/complex/tree/main/float64/imag
|
|
122
|
+
|
|
123
|
+
[@stdlib/complex/float64/parse]: https://github.com/stdlib-js/complex/tree/main/float64/parse
|
|
124
|
+
|
|
125
|
+
[@stdlib/complex/float64/real]: https://github.com/stdlib-js/complex/tree/main/float64/real
|
|
126
|
+
|
|
127
|
+
[@stdlib/complex/float64/reim]: https://github.com/stdlib-js/complex/tree/main/float64/reim
|
|
128
|
+
|
|
129
|
+
[@stdlib/complex/float64/reviver]: https://github.com/stdlib-js/complex/tree/main/float64/reviver
|
|
130
|
+
|
|
131
|
+
[@stdlib/complex/float64/base]: https://github.com/stdlib-js/complex/tree/main/float64/base
|
|
132
|
+
|
|
133
|
+
<!-- </toc-links> -->
|
|
134
|
+
|
|
135
|
+
</section>
|
|
136
|
+
|
|
137
|
+
<!-- /.links -->
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
|
|
3
|
+
@license Apache-2.0
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2024 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
|
+
# Complex128
|
|
22
|
+
|
|
23
|
+
> Base (i.e., lower-level) double-precision complex floating-point number functions.
|
|
24
|
+
|
|
25
|
+
<section class="usage">
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
```javascript
|
|
30
|
+
var complex = require( '@stdlib/complex/float64/base' );
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
#### complex
|
|
34
|
+
|
|
35
|
+
Namespace containing base (i.e., lower-level) double-precision complex floating-point number functions.
|
|
36
|
+
|
|
37
|
+
```javascript
|
|
38
|
+
var ns = complex;
|
|
39
|
+
// returns {...}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The namespace contains the following sub-namespaces:
|
|
43
|
+
|
|
44
|
+
<!-- <toc pattern="+(assert)"> -->
|
|
45
|
+
|
|
46
|
+
<div class="namespace-toc">
|
|
47
|
+
|
|
48
|
+
- <span class="signature">[`assert`][@stdlib/complex/float64/base/assert]</span><span class="delimiter">: </span><span class="description">base (i.e., lower-level) double-precision complex floating-point number assertion functions.</span>
|
|
49
|
+
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<!-- </toc> -->
|
|
53
|
+
|
|
54
|
+
The namespace contains the following functions:
|
|
55
|
+
|
|
56
|
+
<!-- <toc pattern="*"> -->
|
|
57
|
+
|
|
58
|
+
<div class="namespace-toc">
|
|
59
|
+
|
|
60
|
+
- <span class="signature">[`add( z1, z2 )`][@stdlib/complex/float64/base/add]</span><span class="delimiter">: </span><span class="description">add two double-precision complex floating-point numbers.</span>
|
|
61
|
+
- <span class="signature">[`add3( z1, z2, z3 )`][@stdlib/complex/float64/base/add3]</span><span class="delimiter">: </span><span class="description">compute the sum of three double-precision complex floating-point numbers.</span>
|
|
62
|
+
- <span class="signature">[`div( z1, z2 )`][@stdlib/complex/float64/base/div]</span><span class="delimiter">: </span><span class="description">divide two double-precision complex floating-point numbers.</span>
|
|
63
|
+
- <span class="signature">[`identity( z )`][@stdlib/complex/float64/base/identity]</span><span class="delimiter">: </span><span class="description">evaluate the identity function of a double-precision complex floating-point number.</span>
|
|
64
|
+
- <span class="signature">[`muladd( alpha, x, y )`][@stdlib/complex/float64/base/mul-add]</span><span class="delimiter">: </span><span class="description">perform a multiply-add operation involving three double-precision complex floating-point numbers.</span>
|
|
65
|
+
- <span class="signature">[`mul( z1, z2 )`][@stdlib/complex/float64/base/mul]</span><span class="delimiter">: </span><span class="description">multiply two double-precision complex floating-point numbers.</span>
|
|
66
|
+
- <span class="signature">[`neg( z )`][@stdlib/complex/float64/base/neg]</span><span class="delimiter">: </span><span class="description">negate a double-precision complex floating-point number.</span>
|
|
67
|
+
- <span class="signature">[`scale( alpha, z )`][@stdlib/complex/float64/base/scale]</span><span class="delimiter">: </span><span class="description">scale a double-precision complex floating-point number by a real-valued double-precision floating-point scalar constant.</span>
|
|
68
|
+
- <span class="signature">[`sub( z1, z2 )`][@stdlib/complex/float64/base/sub]</span><span class="delimiter">: </span><span class="description">subtract two double-precision complex floating-point numbers.</span>
|
|
69
|
+
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<!-- </toc> -->
|
|
73
|
+
|
|
74
|
+
</section>
|
|
75
|
+
|
|
76
|
+
<!-- /.usage -->
|
|
77
|
+
|
|
78
|
+
<!-- Package notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
|
|
79
|
+
|
|
80
|
+
<section class="notes">
|
|
81
|
+
|
|
82
|
+
</section>
|
|
83
|
+
|
|
84
|
+
<!-- /.notes -->
|
|
85
|
+
|
|
86
|
+
<section class="examples">
|
|
87
|
+
|
|
88
|
+
## Examples
|
|
89
|
+
|
|
90
|
+
<!-- TODO: better examples -->
|
|
91
|
+
|
|
92
|
+
<!-- eslint no-undef: "error" -->
|
|
93
|
+
|
|
94
|
+
```javascript
|
|
95
|
+
var objectKeys = require( '@stdlib/utils/keys' );
|
|
96
|
+
var ns = require( '@stdlib/complex/float64/base' );
|
|
97
|
+
|
|
98
|
+
console.log( objectKeys( ns ) );
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
</section>
|
|
102
|
+
|
|
103
|
+
<!-- /.examples -->
|
|
104
|
+
|
|
105
|
+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
|
|
106
|
+
|
|
107
|
+
<section class="related">
|
|
108
|
+
|
|
109
|
+
</section>
|
|
110
|
+
|
|
111
|
+
<!-- /.related -->
|
|
112
|
+
|
|
113
|
+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
|
|
114
|
+
|
|
115
|
+
<section class="links">
|
|
116
|
+
|
|
117
|
+
<!-- <toc-links> -->
|
|
118
|
+
|
|
119
|
+
[@stdlib/complex/float64/base/add]: https://github.com/stdlib-js/complex/tree/main/float64/base/add
|
|
120
|
+
|
|
121
|
+
[@stdlib/complex/float64/base/add3]: https://github.com/stdlib-js/complex/tree/main/float64/base/add3
|
|
122
|
+
|
|
123
|
+
[@stdlib/complex/float64/base/div]: https://github.com/stdlib-js/complex/tree/main/float64/base/div
|
|
124
|
+
|
|
125
|
+
[@stdlib/complex/float64/base/identity]: https://github.com/stdlib-js/complex/tree/main/float64/base/identity
|
|
126
|
+
|
|
127
|
+
[@stdlib/complex/float64/base/mul-add]: https://github.com/stdlib-js/complex/tree/main/float64/base/mul-add
|
|
128
|
+
|
|
129
|
+
[@stdlib/complex/float64/base/mul]: https://github.com/stdlib-js/complex/tree/main/float64/base/mul
|
|
130
|
+
|
|
131
|
+
[@stdlib/complex/float64/base/neg]: https://github.com/stdlib-js/complex/tree/main/float64/base/neg
|
|
132
|
+
|
|
133
|
+
[@stdlib/complex/float64/base/scale]: https://github.com/stdlib-js/complex/tree/main/float64/base/scale
|
|
134
|
+
|
|
135
|
+
[@stdlib/complex/float64/base/sub]: https://github.com/stdlib-js/complex/tree/main/float64/base/sub
|
|
136
|
+
|
|
137
|
+
[@stdlib/complex/float64/base/assert]: https://github.com/stdlib-js/complex/tree/main/float64/base/assert
|
|
138
|
+
|
|
139
|
+
<!-- </toc-links> -->
|
|
140
|
+
|
|
141
|
+
</section>
|
|
142
|
+
|
|
143
|
+
<!-- /.links -->
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
|
|
3
|
+
@license Apache-2.0
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2018 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
|
+
# add
|
|
22
|
+
|
|
23
|
+
> Add two double-precision complex floating-point numbers.
|
|
24
|
+
|
|
25
|
+
<section class="intro">
|
|
26
|
+
|
|
27
|
+
</section>
|
|
28
|
+
|
|
29
|
+
<!-- /.intro -->
|
|
30
|
+
|
|
31
|
+
<section class="usage">
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```javascript
|
|
36
|
+
var add = require( '@stdlib/complex/float64/base/add' );
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
#### add( z1, z2 )
|
|
40
|
+
|
|
41
|
+
Adds two double-precision complex floating-point numbers.
|
|
42
|
+
|
|
43
|
+
```javascript
|
|
44
|
+
var Complex128 = require( '@stdlib/complex/float64/ctor' );
|
|
45
|
+
|
|
46
|
+
var z = new Complex128( -1.5, 2.5 );
|
|
47
|
+
|
|
48
|
+
var v = add( z, z );
|
|
49
|
+
// returns <Complex128>[ -3.0, 5.0 ]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
#### add.assign( re1, im1, re2, im2, out, strideOut, offsetOut )
|
|
53
|
+
|
|
54
|
+
Adds two double-precision complex floating-point numbers and assigns results to a provided output array.
|
|
55
|
+
|
|
56
|
+
```javascript
|
|
57
|
+
var Float64Array = require( '@stdlib/array/float64' );
|
|
58
|
+
|
|
59
|
+
var out = new Float64Array( 2 );
|
|
60
|
+
var v = add.assign( 5.0, 3.0, -2.0, 1.0, out, 1, 0 );
|
|
61
|
+
// returns <Float64Array>[ 3.0, 4.0 ]
|
|
62
|
+
|
|
63
|
+
var bool = ( out === v );
|
|
64
|
+
// returns true
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The function supports the following parameters:
|
|
68
|
+
|
|
69
|
+
- **re1**: real component of the first complex number.
|
|
70
|
+
- **im1**: imaginary component of the first complex number.
|
|
71
|
+
- **re2**: real component of the second complex number.
|
|
72
|
+
- **im2**: imaginary component of the second complex number.
|
|
73
|
+
- **out**: output array.
|
|
74
|
+
- **strideOut**: stride length for `out`.
|
|
75
|
+
- **offsetOut**: starting index for `out`.
|
|
76
|
+
|
|
77
|
+
#### add.strided( z1, sz1, oz1, z2, sz2, oz2, out, so, oo )
|
|
78
|
+
|
|
79
|
+
Adds two double-precision complex floating-point numbers stored in real-valued strided array views and assigns results to a provided strided output array.
|
|
80
|
+
|
|
81
|
+
```javascript
|
|
82
|
+
var Float64Array = require( '@stdlib/array/float64' );
|
|
83
|
+
|
|
84
|
+
var z1 = new Float64Array( [ 5.0, 3.0 ] );
|
|
85
|
+
var z2 = new Float64Array( [ -2.0, 1.0 ] );
|
|
86
|
+
var out = new Float64Array( 2 );
|
|
87
|
+
|
|
88
|
+
var v = add.strided( z1, 1, 0, z2, 1, 0, out, 1, 0 );
|
|
89
|
+
// returns <Float64Array>[ 3.0, 4.0 ]
|
|
90
|
+
|
|
91
|
+
var bool = ( out === v );
|
|
92
|
+
// returns true
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The function supports the following parameters:
|
|
96
|
+
|
|
97
|
+
- **z1**: first complex number strided array view.
|
|
98
|
+
- **sz1**: stride length for `z1`.
|
|
99
|
+
- **oz1**: starting index for `z1`.
|
|
100
|
+
- **z2**: second complex number strided array view.
|
|
101
|
+
- **sz2**: stride length for `z2`.
|
|
102
|
+
- **oz2**: starting index for `z2`.
|
|
103
|
+
- **out**: output array.
|
|
104
|
+
- **so**: stride length for `out`.
|
|
105
|
+
- **oo**: starting index for `out`.
|
|
106
|
+
|
|
107
|
+
</section>
|
|
108
|
+
|
|
109
|
+
<!-- /.usage -->
|
|
110
|
+
|
|
111
|
+
<section class="examples">
|
|
112
|
+
|
|
113
|
+
## Examples
|
|
114
|
+
|
|
115
|
+
<!-- eslint no-undef: "error" -->
|
|
116
|
+
|
|
117
|
+
```javascript
|
|
118
|
+
var Complex128Array = require( '@stdlib/array/complex128' );
|
|
119
|
+
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
|
|
120
|
+
var logEachMap = require( '@stdlib/console/log-each-map' );
|
|
121
|
+
var add = require( '@stdlib/complex/float64/base/add' );
|
|
122
|
+
|
|
123
|
+
// Generate arrays of random values:
|
|
124
|
+
var z1 = new Complex128Array( discreteUniform( 200, -50, 50 ) );
|
|
125
|
+
var z2 = new Complex128Array( discreteUniform( 200, -50, 50 ) );
|
|
126
|
+
|
|
127
|
+
// Perform element-wise addition:
|
|
128
|
+
logEachMap( '(%s) + (%s) = %s', z1, z2, add );
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
</section>
|
|
132
|
+
|
|
133
|
+
<!-- /.examples -->
|
|
134
|
+
|
|
135
|
+
<!-- C interface documentation. -->
|
|
136
|
+
|
|
137
|
+
* * *
|
|
138
|
+
|
|
139
|
+
<section class="c">
|
|
140
|
+
|
|
141
|
+
## C APIs
|
|
142
|
+
|
|
143
|
+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
|
|
144
|
+
|
|
145
|
+
<section class="intro">
|
|
146
|
+
|
|
147
|
+
</section>
|
|
148
|
+
|
|
149
|
+
<!-- /.intro -->
|
|
150
|
+
|
|
151
|
+
<!-- C usage documentation. -->
|
|
152
|
+
|
|
153
|
+
<section class="usage">
|
|
154
|
+
|
|
155
|
+
### Usage
|
|
156
|
+
|
|
157
|
+
```c
|
|
158
|
+
#include "stdlib/complex/float64/base/add.h"
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
#### stdlib_base_complex128_add( z1, z2 )
|
|
162
|
+
|
|
163
|
+
Adds two double-precision complex floating-point numbers.
|
|
164
|
+
|
|
165
|
+
```c
|
|
166
|
+
#include "stdlib/complex/float64/ctor.h"
|
|
167
|
+
#include "stdlib/complex/float64/real.h"
|
|
168
|
+
#include "stdlib/complex/float64/imag.h"
|
|
169
|
+
|
|
170
|
+
stdlib_complex128_t z = stdlib_complex128( 3.0, -2.0 );
|
|
171
|
+
|
|
172
|
+
stdlib_complex128_t out = stdlib_base_complex128_add( z, z );
|
|
173
|
+
|
|
174
|
+
double re = stdlib_complex128_real( out );
|
|
175
|
+
// returns 6.0
|
|
176
|
+
|
|
177
|
+
double im = stdlib_complex128_imag( out );
|
|
178
|
+
// returns -4.0
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
The function accepts the following arguments:
|
|
182
|
+
|
|
183
|
+
- **z1**: `[in] stdlib_complex128_t` input value.
|
|
184
|
+
- **z2**: `[in] stdlib_complex128_t` input value.
|
|
185
|
+
|
|
186
|
+
```c
|
|
187
|
+
stdlib_complex128_t stdlib_base_complex128_add( const stdlib_complex128_t z1, const stdlib_complex128_t z2 );
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
</section>
|
|
191
|
+
|
|
192
|
+
<!-- /.usage -->
|
|
193
|
+
|
|
194
|
+
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
|
|
195
|
+
|
|
196
|
+
<section class="notes">
|
|
197
|
+
|
|
198
|
+
</section>
|
|
199
|
+
|
|
200
|
+
<!-- /.notes -->
|
|
201
|
+
|
|
202
|
+
<!-- C API usage examples. -->
|
|
203
|
+
|
|
204
|
+
<section class="examples">
|
|
205
|
+
|
|
206
|
+
### Examples
|
|
207
|
+
|
|
208
|
+
```c
|
|
209
|
+
#include "stdlib/complex/float64/base/add.h"
|
|
210
|
+
#include "stdlib/complex/float64/ctor.h"
|
|
211
|
+
#include "stdlib/complex/float64/reim.h"
|
|
212
|
+
#include <stdio.h>
|
|
213
|
+
|
|
214
|
+
int main( void ) {
|
|
215
|
+
const stdlib_complex128_t x[] = {
|
|
216
|
+
stdlib_complex128( 3.14, 1.5 ),
|
|
217
|
+
stdlib_complex128( -3.14, 1.5 ),
|
|
218
|
+
stdlib_complex128( 0.0, -0.0 ),
|
|
219
|
+
stdlib_complex128( 0.0/0.0, 0.0/0.0 )
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
stdlib_complex128_t v;
|
|
223
|
+
stdlib_complex128_t y;
|
|
224
|
+
double re;
|
|
225
|
+
double im;
|
|
226
|
+
int i;
|
|
227
|
+
for ( i = 0; i < 4; i++ ) {
|
|
228
|
+
v = x[ i ];
|
|
229
|
+
stdlib_complex128_reim( v, &re, &im );
|
|
230
|
+
printf( "z = %lf + %lfi\n", re, im );
|
|
231
|
+
|
|
232
|
+
y = stdlib_base_complex128_add( v, v );
|
|
233
|
+
stdlib_complex128_reim( y, &re, &im );
|
|
234
|
+
printf( "add(z, z) = %lf + %lfi\n", re, im );
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
</section>
|
|
240
|
+
|
|
241
|
+
<!-- /.examples -->
|
|
242
|
+
|
|
243
|
+
</section>
|
|
244
|
+
|
|
245
|
+
<!-- /.c -->
|
|
246
|
+
|
|
247
|
+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
|
|
248
|
+
|
|
249
|
+
<section class="related">
|
|
250
|
+
|
|
251
|
+
* * *
|
|
252
|
+
|
|
253
|
+
## See Also
|
|
254
|
+
|
|
255
|
+
- <span class="package-name">[`@stdlib/complex/float64/base/div`][@stdlib/complex/float64/base/div]</span><span class="delimiter">: </span><span class="description">divide two complex numbers.</span>
|
|
256
|
+
- <span class="package-name">[`@stdlib/complex/float64/base/mul`][@stdlib/complex/float64/base/mul]</span><span class="delimiter">: </span><span class="description">multiply two double-precision complex floating-point numbers.</span>
|
|
257
|
+
- <span class="package-name">[`@stdlib/complex/float64/base/sub`][@stdlib/complex/float64/base/sub]</span><span class="delimiter">: </span><span class="description">subtract two double-precision complex floating-point numbers.</span>
|
|
258
|
+
|
|
259
|
+
</section>
|
|
260
|
+
|
|
261
|
+
<!-- /.related -->
|
|
262
|
+
|
|
263
|
+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
|
|
264
|
+
|
|
265
|
+
<section class="links">
|
|
266
|
+
|
|
267
|
+
<!-- <related-links> -->
|
|
268
|
+
|
|
269
|
+
[@stdlib/complex/float64/base/div]: https://github.com/stdlib-js/complex/tree/main/float64/base/div
|
|
270
|
+
|
|
271
|
+
[@stdlib/complex/float64/base/mul]: https://github.com/stdlib-js/complex/tree/main/float64/base/mul
|
|
272
|
+
|
|
273
|
+
[@stdlib/complex/float64/base/sub]: https://github.com/stdlib-js/complex/tree/main/float64/base/sub
|
|
274
|
+
|
|
275
|
+
<!-- </related-links> -->
|
|
276
|
+
|
|
277
|
+
</section>
|
|
278
|
+
|
|
279
|
+
<!-- /.links -->
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
|
|
2
|
+
{{alias}}( z1, z2 )
|
|
3
|
+
Adds two double-precision complex floating-point numbers.
|
|
4
|
+
|
|
5
|
+
Parameters
|
|
6
|
+
----------
|
|
7
|
+
z1: Complex128
|
|
8
|
+
Complex number.
|
|
9
|
+
|
|
10
|
+
z2: Complex128
|
|
11
|
+
Complex number.
|
|
12
|
+
|
|
13
|
+
Returns
|
|
14
|
+
-------
|
|
15
|
+
out: Complex128
|
|
16
|
+
Result.
|
|
17
|
+
|
|
18
|
+
Examples
|
|
19
|
+
--------
|
|
20
|
+
> var z = new {{alias:@stdlib/complex/float64/ctor}}( 5.0, 3.0 )
|
|
21
|
+
<Complex128>
|
|
22
|
+
> var out = {{alias}}( z, z )
|
|
23
|
+
<Complex128>
|
|
24
|
+
> var re = {{alias:@stdlib/complex/float64/real}}( out )
|
|
25
|
+
10.0
|
|
26
|
+
> var im = {{alias:@stdlib/complex/float64/imag}}( out )
|
|
27
|
+
6.0
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
{{alias}}.assign( re1, im1, re2, im2, out, strideOut, offsetOut )
|
|
31
|
+
Adds two double-precision complex floating-point numbers and assigns results
|
|
32
|
+
to a provided output array.
|
|
33
|
+
|
|
34
|
+
Parameters
|
|
35
|
+
----------
|
|
36
|
+
re1: number
|
|
37
|
+
Real component of the first complex number.
|
|
38
|
+
|
|
39
|
+
im1: number
|
|
40
|
+
Imaginary component of the first complex number.
|
|
41
|
+
|
|
42
|
+
re2: number
|
|
43
|
+
Real component of the second complex number.
|
|
44
|
+
|
|
45
|
+
im2: number
|
|
46
|
+
Imaginary component of the second complex number.
|
|
47
|
+
|
|
48
|
+
out: ArrayLikeObject
|
|
49
|
+
Output array.
|
|
50
|
+
|
|
51
|
+
strideOut: integer
|
|
52
|
+
Stride length.
|
|
53
|
+
|
|
54
|
+
offsetOut: integer
|
|
55
|
+
Starting index.
|
|
56
|
+
|
|
57
|
+
Returns
|
|
58
|
+
-------
|
|
59
|
+
out: ArrayLikeObject
|
|
60
|
+
Output array.
|
|
61
|
+
|
|
62
|
+
Examples
|
|
63
|
+
--------
|
|
64
|
+
> var out = new {{alias:@stdlib/array/float64}}( 2 );
|
|
65
|
+
> {{alias}}.assign( 5.0, 3.0, -2.0, 1.0, out, 1, 0 )
|
|
66
|
+
<Float64Array>[ 3.0, 4.0 ]
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
{{alias}}.strided( z1, sz1, oz1, z2, sz2, oz2, out, so, oo )
|
|
70
|
+
Adds two double-precision complex floating-point numbers stored in real-
|
|
71
|
+
valued strided array views and assigns results to a provided strided output
|
|
72
|
+
array.
|
|
73
|
+
|
|
74
|
+
Parameters
|
|
75
|
+
----------
|
|
76
|
+
z1: ArrayLikeObject
|
|
77
|
+
First complex number view.
|
|
78
|
+
|
|
79
|
+
sz1: integer
|
|
80
|
+
Stride length for `z1`.
|
|
81
|
+
|
|
82
|
+
oz1: integer
|
|
83
|
+
Starting index for `z1`.
|
|
84
|
+
|
|
85
|
+
z2: ArrayLikeObject
|
|
86
|
+
Second complex number view.
|
|
87
|
+
|
|
88
|
+
sz2: integer
|
|
89
|
+
Stride length for `z2`.
|
|
90
|
+
|
|
91
|
+
oz2: integer
|
|
92
|
+
Starting index for `z2`.
|
|
93
|
+
|
|
94
|
+
out: ArrayLikeObject
|
|
95
|
+
Output array.
|
|
96
|
+
|
|
97
|
+
so: integer
|
|
98
|
+
Stride length for `out`.
|
|
99
|
+
|
|
100
|
+
oo: integer
|
|
101
|
+
Starting index for `out`.
|
|
102
|
+
|
|
103
|
+
Returns
|
|
104
|
+
-------
|
|
105
|
+
out: ArrayLikeObject
|
|
106
|
+
Output array.
|
|
107
|
+
|
|
108
|
+
Examples
|
|
109
|
+
--------
|
|
110
|
+
> var z1 = new {{alias:@stdlib/array/float64}}( [ 5.0, 3.0 ] );
|
|
111
|
+
> var z2 = new {{alias:@stdlib/array/float64}}( [ -2.0, 1.0 ] );
|
|
112
|
+
> var out = new {{alias:@stdlib/array/float64}}( 2 );
|
|
113
|
+
> {{alias}}.strided( z1, 1, 0, z2, 1, 0, out, 1, 0 )
|
|
114
|
+
<Float64Array>[ 3.0, 4.0 ]
|
|
115
|
+
|
|
116
|
+
See Also
|
|
117
|
+
--------
|
|
118
|
+
|