@ohos-ports/stdlib-complex-real 0.0.0-stage → 0.2.1-beta.0

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.
Files changed (276) hide show
  1. package/LICENSE +177 -0
  2. package/NOTICE +1 -0
  3. package/README.md +320 -2
  4. package/SECURITY.md +5 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.js +5 -0
  7. package/dist/index.js.map +7 -0
  8. package/docs/types/index.d.ts +44 -0
  9. package/include/stdlib/complex/real.h +40 -0
  10. package/lib/index.js +43 -0
  11. package/lib/main.js +42 -0
  12. package/manifest.json +40 -0
  13. package/node_modules/@stdlib/array-float32/LICENSE +177 -0
  14. package/node_modules/@stdlib/array-float32/NOTICE +1 -0
  15. package/node_modules/@stdlib/array-float32/README.md +1577 -0
  16. package/node_modules/@stdlib/array-float32/SECURITY.md +5 -0
  17. package/node_modules/@stdlib/array-float32/dist/index.d.ts +3 -0
  18. package/node_modules/@stdlib/array-float32/dist/index.js +19 -0
  19. package/node_modules/@stdlib/array-float32/dist/index.js.map +7 -0
  20. package/node_modules/@stdlib/array-float32/docs/types/index.d.ts +26 -0
  21. package/node_modules/@stdlib/array-float32/lib/index.js +52 -0
  22. package/node_modules/@stdlib/array-float32/lib/main.js +28 -0
  23. package/node_modules/@stdlib/array-float32/lib/polyfill.js +37 -0
  24. package/node_modules/@stdlib/array-float32/package.json +72 -0
  25. package/node_modules/@stdlib/assert-has-float32array-support/LICENSE +177 -0
  26. package/node_modules/@stdlib/assert-has-float32array-support/NOTICE +1 -0
  27. package/node_modules/@stdlib/assert-has-float32array-support/README.md +187 -0
  28. package/node_modules/@stdlib/assert-has-float32array-support/SECURITY.md +5 -0
  29. package/node_modules/@stdlib/assert-has-float32array-support/dist/index.d.ts +3 -0
  30. package/node_modules/@stdlib/assert-has-float32array-support/dist/index.js +7 -0
  31. package/node_modules/@stdlib/assert-has-float32array-support/dist/index.js.map +7 -0
  32. package/node_modules/@stdlib/assert-has-float32array-support/docs/types/index.d.ts +35 -0
  33. package/node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js +28 -0
  34. package/node_modules/@stdlib/assert-has-float32array-support/lib/index.js +40 -0
  35. package/node_modules/@stdlib/assert-has-float32array-support/lib/main.js +65 -0
  36. package/node_modules/@stdlib/assert-has-float32array-support/package.json +77 -0
  37. package/node_modules/@stdlib/assert-has-own-property/LICENSE +177 -0
  38. package/node_modules/@stdlib/assert-has-own-property/NOTICE +1 -0
  39. package/node_modules/@stdlib/assert-has-own-property/README.md +263 -0
  40. package/node_modules/@stdlib/assert-has-own-property/SECURITY.md +5 -0
  41. package/node_modules/@stdlib/assert-has-own-property/dist/index.d.ts +3 -0
  42. package/node_modules/@stdlib/assert-has-own-property/dist/index.js +5 -0
  43. package/node_modules/@stdlib/assert-has-own-property/dist/index.js.map +7 -0
  44. package/node_modules/@stdlib/assert-has-own-property/docs/types/index.d.ts +49 -0
  45. package/node_modules/@stdlib/assert-has-own-property/lib/index.js +47 -0
  46. package/node_modules/@stdlib/assert-has-own-property/lib/main.js +64 -0
  47. package/node_modules/@stdlib/assert-has-own-property/package.json +73 -0
  48. package/node_modules/@stdlib/assert-has-symbol-support/LICENSE +177 -0
  49. package/node_modules/@stdlib/assert-has-symbol-support/NOTICE +1 -0
  50. package/node_modules/@stdlib/assert-has-symbol-support/README.md +193 -0
  51. package/node_modules/@stdlib/assert-has-symbol-support/SECURITY.md +5 -0
  52. package/node_modules/@stdlib/assert-has-symbol-support/dist/index.d.ts +3 -0
  53. package/node_modules/@stdlib/assert-has-symbol-support/dist/index.js +5 -0
  54. package/node_modules/@stdlib/assert-has-symbol-support/dist/index.js.map +7 -0
  55. package/node_modules/@stdlib/assert-has-symbol-support/docs/types/index.d.ts +35 -0
  56. package/node_modules/@stdlib/assert-has-symbol-support/lib/index.js +40 -0
  57. package/node_modules/@stdlib/assert-has-symbol-support/lib/main.js +42 -0
  58. package/node_modules/@stdlib/assert-has-symbol-support/package.json +72 -0
  59. package/node_modules/@stdlib/assert-has-tostringtag-support/LICENSE +177 -0
  60. package/node_modules/@stdlib/assert-has-tostringtag-support/NOTICE +1 -0
  61. package/node_modules/@stdlib/assert-has-tostringtag-support/README.md +187 -0
  62. package/node_modules/@stdlib/assert-has-tostringtag-support/SECURITY.md +5 -0
  63. package/node_modules/@stdlib/assert-has-tostringtag-support/dist/index.d.ts +3 -0
  64. package/node_modules/@stdlib/assert-has-tostringtag-support/dist/index.js +5 -0
  65. package/node_modules/@stdlib/assert-has-tostringtag-support/dist/index.js.map +7 -0
  66. package/node_modules/@stdlib/assert-has-tostringtag-support/docs/types/index.d.ts +35 -0
  67. package/node_modules/@stdlib/assert-has-tostringtag-support/lib/index.js +40 -0
  68. package/node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js +49 -0
  69. package/node_modules/@stdlib/assert-has-tostringtag-support/package.json +78 -0
  70. package/node_modules/@stdlib/assert-is-float32array/LICENSE +177 -0
  71. package/node_modules/@stdlib/assert-is-float32array/NOTICE +1 -0
  72. package/node_modules/@stdlib/assert-is-float32array/README.md +229 -0
  73. package/node_modules/@stdlib/assert-is-float32array/SECURITY.md +5 -0
  74. package/node_modules/@stdlib/assert-is-float32array/dist/index.d.ts +3 -0
  75. package/node_modules/@stdlib/assert-is-float32array/dist/index.js +5 -0
  76. package/node_modules/@stdlib/assert-is-float32array/dist/index.js.map +7 -0
  77. package/node_modules/@stdlib/assert-is-float32array/docs/types/index.d.ts +42 -0
  78. package/node_modules/@stdlib/assert-is-float32array/lib/index.js +44 -0
  79. package/node_modules/@stdlib/assert-is-float32array/lib/main.js +59 -0
  80. package/node_modules/@stdlib/assert-is-float32array/package.json +81 -0
  81. package/node_modules/@stdlib/assert-is-number/LICENSE +177 -0
  82. package/node_modules/@stdlib/assert-is-number/NOTICE +1 -0
  83. package/node_modules/@stdlib/assert-is-number/README.md +231 -0
  84. package/node_modules/@stdlib/assert-is-number/SECURITY.md +5 -0
  85. package/node_modules/@stdlib/assert-is-number/dist/index.d.ts +3 -0
  86. package/node_modules/@stdlib/assert-is-number/dist/index.js +13 -0
  87. package/node_modules/@stdlib/assert-is-number/dist/index.js.map +7 -0
  88. package/node_modules/@stdlib/assert-is-number/docs/types/index.d.ts +121 -0
  89. package/node_modules/@stdlib/assert-is-number/lib/index.js +79 -0
  90. package/node_modules/@stdlib/assert-is-number/lib/main.js +58 -0
  91. package/node_modules/@stdlib/assert-is-number/lib/object.js +66 -0
  92. package/node_modules/@stdlib/assert-is-number/lib/primitive.js +46 -0
  93. package/node_modules/@stdlib/assert-is-number/lib/tostring.js +34 -0
  94. package/node_modules/@stdlib/assert-is-number/lib/try2serialize.js +47 -0
  95. package/node_modules/@stdlib/assert-is-number/package.json +80 -0
  96. package/node_modules/@stdlib/complex-float32/LICENSE +177 -0
  97. package/node_modules/@stdlib/complex-float32/NOTICE +1 -0
  98. package/node_modules/@stdlib/complex-float32/README.md +629 -0
  99. package/node_modules/@stdlib/complex-float32/SECURITY.md +5 -0
  100. package/node_modules/@stdlib/complex-float32/dist/index.d.ts +3 -0
  101. package/node_modules/@stdlib/complex-float32/dist/index.js +9 -0
  102. package/node_modules/@stdlib/complex-float32/dist/index.js.map +7 -0
  103. package/node_modules/@stdlib/complex-float32/docs/types/index.d.ts +111 -0
  104. package/node_modules/@stdlib/complex-float32/include/stdlib/complex/float32.h +148 -0
  105. package/node_modules/@stdlib/complex-float32/lib/index.js +40 -0
  106. package/node_modules/@stdlib/complex-float32/lib/main.js +159 -0
  107. package/node_modules/@stdlib/complex-float32/lib/tojson.js +39 -0
  108. package/node_modules/@stdlib/complex-float32/lib/tostring.js +42 -0
  109. package/node_modules/@stdlib/complex-float32/manifest.json +38 -0
  110. package/node_modules/@stdlib/complex-float32/package.json +76 -0
  111. package/node_modules/@stdlib/complex-float32/src/main.c +151 -0
  112. package/node_modules/@stdlib/complex-float64/LICENSE +177 -0
  113. package/node_modules/@stdlib/complex-float64/NOTICE +1 -0
  114. package/node_modules/@stdlib/complex-float64/README.md +699 -0
  115. package/node_modules/@stdlib/complex-float64/SECURITY.md +5 -0
  116. package/node_modules/@stdlib/complex-float64/dist/index.d.ts +3 -0
  117. package/node_modules/@stdlib/complex-float64/dist/index.js +9 -0
  118. package/node_modules/@stdlib/complex-float64/dist/index.js.map +7 -0
  119. package/node_modules/@stdlib/complex-float64/docs/types/index.d.ts +111 -0
  120. package/node_modules/@stdlib/complex-float64/include/stdlib/complex/float64.h +169 -0
  121. package/node_modules/@stdlib/complex-float64/lib/index.js +40 -0
  122. package/node_modules/@stdlib/complex-float64/lib/main.js +158 -0
  123. package/node_modules/@stdlib/complex-float64/lib/tojson.js +39 -0
  124. package/node_modules/@stdlib/complex-float64/lib/tostring.js +42 -0
  125. package/node_modules/@stdlib/complex-float64/manifest.json +40 -0
  126. package/node_modules/@stdlib/complex-float64/package.json +75 -0
  127. package/node_modules/@stdlib/complex-float64/src/main.c +224 -0
  128. package/node_modules/@stdlib/constants-float64-pinf/LICENSE +177 -0
  129. package/node_modules/@stdlib/constants-float64-pinf/NOTICE +1 -0
  130. package/node_modules/@stdlib/constants-float64-pinf/README.md +238 -0
  131. package/node_modules/@stdlib/constants-float64-pinf/SECURITY.md +5 -0
  132. package/node_modules/@stdlib/constants-float64-pinf/dist/index.d.ts +3 -0
  133. package/node_modules/@stdlib/constants-float64-pinf/dist/index.js +3 -0
  134. package/node_modules/@stdlib/constants-float64-pinf/dist/index.js.map +7 -0
  135. package/node_modules/@stdlib/constants-float64-pinf/docs/types/index.d.ts +33 -0
  136. package/node_modules/@stdlib/constants-float64-pinf/include/stdlib/constants/float64/pinf.h +29 -0
  137. package/node_modules/@stdlib/constants-float64-pinf/lib/index.js +56 -0
  138. package/node_modules/@stdlib/constants-float64-pinf/manifest.json +36 -0
  139. package/node_modules/@stdlib/constants-float64-pinf/package.json +71 -0
  140. package/node_modules/@stdlib/error-tools-fmtprodmsg/LICENSE +177 -0
  141. package/node_modules/@stdlib/error-tools-fmtprodmsg/NOTICE +1 -0
  142. package/node_modules/@stdlib/error-tools-fmtprodmsg/README.md +182 -0
  143. package/node_modules/@stdlib/error-tools-fmtprodmsg/SECURITY.md +5 -0
  144. package/node_modules/@stdlib/error-tools-fmtprodmsg/dist/index.d.ts +3 -0
  145. package/node_modules/@stdlib/error-tools-fmtprodmsg/dist/index.js +5 -0
  146. package/node_modules/@stdlib/error-tools-fmtprodmsg/dist/index.js.map +7 -0
  147. package/node_modules/@stdlib/error-tools-fmtprodmsg/docs/types/index.d.ts +39 -0
  148. package/node_modules/@stdlib/error-tools-fmtprodmsg/lib/index.js +40 -0
  149. package/node_modules/@stdlib/error-tools-fmtprodmsg/lib/main.js +48 -0
  150. package/node_modules/@stdlib/error-tools-fmtprodmsg/package.json +70 -0
  151. package/node_modules/@stdlib/number-ctor/LICENSE +177 -0
  152. package/node_modules/@stdlib/number-ctor/NOTICE +1 -0
  153. package/node_modules/@stdlib/number-ctor/README.md +212 -0
  154. package/node_modules/@stdlib/number-ctor/SECURITY.md +5 -0
  155. package/node_modules/@stdlib/number-ctor/dist/index.d.ts +3 -0
  156. package/node_modules/@stdlib/number-ctor/dist/index.js +5 -0
  157. package/node_modules/@stdlib/number-ctor/dist/index.js.map +7 -0
  158. package/node_modules/@stdlib/number-ctor/docs/types/index.d.ts +30 -0
  159. package/node_modules/@stdlib/number-ctor/lib/index.js +40 -0
  160. package/node_modules/@stdlib/number-ctor/lib/main.js +23 -0
  161. package/node_modules/@stdlib/number-ctor/package.json +62 -0
  162. package/node_modules/@stdlib/number-float64-base-to-float32/LICENSE +177 -0
  163. package/node_modules/@stdlib/number-float64-base-to-float32/NOTICE +1 -0
  164. package/node_modules/@stdlib/number-float64-base-to-float32/README.md +191 -0
  165. package/node_modules/@stdlib/number-float64-base-to-float32/SECURITY.md +5 -0
  166. package/node_modules/@stdlib/number-float64-base-to-float32/dist/index.d.ts +3 -0
  167. package/node_modules/@stdlib/number-float64-base-to-float32/dist/index.js +19 -0
  168. package/node_modules/@stdlib/number-float64-base-to-float32/dist/index.js.map +7 -0
  169. package/node_modules/@stdlib/number-float64-base-to-float32/docs/types/index.d.ts +36 -0
  170. package/node_modules/@stdlib/number-float64-base-to-float32/lib/index.js +51 -0
  171. package/node_modules/@stdlib/number-float64-base-to-float32/lib/main.js +28 -0
  172. package/node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js +51 -0
  173. package/node_modules/@stdlib/number-float64-base-to-float32/package.json +76 -0
  174. package/node_modules/@stdlib/string-base-format-interpolate/LICENSE +177 -0
  175. package/node_modules/@stdlib/string-base-format-interpolate/NOTICE +1 -0
  176. package/node_modules/@stdlib/string-base-format-interpolate/README.md +219 -0
  177. package/node_modules/@stdlib/string-base-format-interpolate/SECURITY.md +5 -0
  178. package/node_modules/@stdlib/string-base-format-interpolate/dist/index.d.ts +3 -0
  179. package/node_modules/@stdlib/string-base-format-interpolate/dist/index.js +17 -0
  180. package/node_modules/@stdlib/string-base-format-interpolate/dist/index.js.map +7 -0
  181. package/node_modules/@stdlib/string-base-format-interpolate/docs/types/index.d.ts +71 -0
  182. package/node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js +103 -0
  183. package/node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js +115 -0
  184. package/node_modules/@stdlib/string-base-format-interpolate/lib/index.js +41 -0
  185. package/node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js +46 -0
  186. package/node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js +42 -0
  187. package/node_modules/@stdlib/string-base-format-interpolate/lib/main.js +243 -0
  188. package/node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js +65 -0
  189. package/node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js +84 -0
  190. package/node_modules/@stdlib/string-base-format-interpolate/package.json +71 -0
  191. package/node_modules/@stdlib/string-base-format-tokenize/LICENSE +177 -0
  192. package/node_modules/@stdlib/string-base-format-tokenize/NOTICE +1 -0
  193. package/node_modules/@stdlib/string-base-format-tokenize/README.md +203 -0
  194. package/node_modules/@stdlib/string-base-format-tokenize/SECURITY.md +5 -0
  195. package/node_modules/@stdlib/string-base-format-tokenize/dist/index.d.ts +3 -0
  196. package/node_modules/@stdlib/string-base-format-tokenize/dist/index.js +5 -0
  197. package/node_modules/@stdlib/string-base-format-tokenize/dist/index.js.map +7 -0
  198. package/node_modules/@stdlib/string-base-format-tokenize/docs/types/index.d.ts +68 -0
  199. package/node_modules/@stdlib/string-base-format-tokenize/lib/index.js +41 -0
  200. package/node_modules/@stdlib/string-base-format-tokenize/lib/main.js +95 -0
  201. package/node_modules/@stdlib/string-base-format-tokenize/package.json +69 -0
  202. package/node_modules/@stdlib/string-format/LICENSE +177 -0
  203. package/node_modules/@stdlib/string-format/NOTICE +1 -0
  204. package/node_modules/@stdlib/string-format/README.md +341 -0
  205. package/node_modules/@stdlib/string-format/SECURITY.md +5 -0
  206. package/node_modules/@stdlib/string-format/dist/index.d.ts +3 -0
  207. package/node_modules/@stdlib/string-format/dist/index.js +7 -0
  208. package/node_modules/@stdlib/string-format/dist/index.js.map +7 -0
  209. package/node_modules/@stdlib/string-format/docs/types/index.d.ts +42 -0
  210. package/node_modules/@stdlib/string-format/lib/index.js +43 -0
  211. package/node_modules/@stdlib/string-format/lib/is_string.js +42 -0
  212. package/node_modules/@stdlib/string-format/lib/main.js +64 -0
  213. package/node_modules/@stdlib/string-format/package.json +72 -0
  214. package/node_modules/@stdlib/symbol-ctor/LICENSE +177 -0
  215. package/node_modules/@stdlib/symbol-ctor/NOTICE +1 -0
  216. package/node_modules/@stdlib/symbol-ctor/README.md +234 -0
  217. package/node_modules/@stdlib/symbol-ctor/SECURITY.md +5 -0
  218. package/node_modules/@stdlib/symbol-ctor/dist/index.d.ts +3 -0
  219. package/node_modules/@stdlib/symbol-ctor/dist/index.js +5 -0
  220. package/node_modules/@stdlib/symbol-ctor/dist/index.js.map +7 -0
  221. package/node_modules/@stdlib/symbol-ctor/docs/types/index.d.ts +34 -0
  222. package/node_modules/@stdlib/symbol-ctor/lib/index.js +40 -0
  223. package/node_modules/@stdlib/symbol-ctor/lib/main.js +28 -0
  224. package/node_modules/@stdlib/symbol-ctor/package.json +62 -0
  225. package/node_modules/@stdlib/types/LICENSE +177 -0
  226. package/node_modules/@stdlib/types/NOTICE +1 -0
  227. package/node_modules/@stdlib/types/README.md +212 -0
  228. package/node_modules/@stdlib/types/SECURITY.md +5 -0
  229. package/node_modules/@stdlib/types/index.d.ts +3923 -0
  230. package/node_modules/@stdlib/types/lib/browser.js +28 -0
  231. package/node_modules/@stdlib/types/lib/index.js +39 -0
  232. package/node_modules/@stdlib/types/lib/main.js +40 -0
  233. package/node_modules/@stdlib/types/package.json +67 -0
  234. package/node_modules/@stdlib/types/test.ts +734 -0
  235. package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/LICENSE +177 -0
  236. package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/NOTICE +1 -0
  237. package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/README.md +216 -0
  238. package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/SECURITY.md +5 -0
  239. package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/dist/index.d.ts +3 -0
  240. package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/dist/index.js +31 -0
  241. package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/dist/index.js.map +7 -0
  242. package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/dist/main.js +58 -0
  243. package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/docs/types/index.d.ts +52 -0
  244. package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/index.js +47 -0
  245. package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js +58 -0
  246. package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/package.json +92 -0
  247. package/node_modules/@stdlib/utils-define-property/LICENSE +177 -0
  248. package/node_modules/@stdlib/utils-define-property/NOTICE +1 -0
  249. package/node_modules/@stdlib/utils-define-property/README.md +228 -0
  250. package/node_modules/@stdlib/utils-define-property/SECURITY.md +5 -0
  251. package/node_modules/@stdlib/utils-define-property/dist/index.d.ts +3 -0
  252. package/node_modules/@stdlib/utils-define-property/dist/index.js +36 -0
  253. package/node_modules/@stdlib/utils-define-property/dist/index.js.map +7 -0
  254. package/node_modules/@stdlib/utils-define-property/docs/types/index.d.ts +52 -0
  255. package/node_modules/@stdlib/utils-define-property/lib/builtin.js +61 -0
  256. package/node_modules/@stdlib/utils-define-property/lib/define_property.js +28 -0
  257. package/node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js +51 -0
  258. package/node_modules/@stdlib/utils-define-property/lib/index.js +58 -0
  259. package/node_modules/@stdlib/utils-define-property/lib/polyfill.js +122 -0
  260. package/node_modules/@stdlib/utils-define-property/package.json +74 -0
  261. package/node_modules/@stdlib/utils-native-class/LICENSE +177 -0
  262. package/node_modules/@stdlib/utils-native-class/NOTICE +1 -0
  263. package/node_modules/@stdlib/utils-native-class/README.md +349 -0
  264. package/node_modules/@stdlib/utils-native-class/SECURITY.md +5 -0
  265. package/node_modules/@stdlib/utils-native-class/dist/index.d.ts +3 -0
  266. package/node_modules/@stdlib/utils-native-class/dist/index.js +11 -0
  267. package/node_modules/@stdlib/utils-native-class/dist/index.js.map +7 -0
  268. package/node_modules/@stdlib/utils-native-class/docs/types/index.d.ts +51 -0
  269. package/node_modules/@stdlib/utils-native-class/lib/index.js +61 -0
  270. package/node_modules/@stdlib/utils-native-class/lib/main.js +56 -0
  271. package/node_modules/@stdlib/utils-native-class/lib/polyfill.js +81 -0
  272. package/node_modules/@stdlib/utils-native-class/lib/tostring.js +28 -0
  273. package/node_modules/@stdlib/utils-native-class/lib/tostringtag.js +33 -0
  274. package/node_modules/@stdlib/utils-native-class/package.json +83 -0
  275. package/package.json +72 -4
  276. package/src/main.c +42 -0
@@ -0,0 +1,629 @@
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
+
22
+ <details>
23
+ <summary>
24
+ About stdlib...
25
+ </summary>
26
+ <p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>
27
+ <p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>
28
+ <p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>
29
+ <p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
30
+ </details>
31
+
32
+ # Complex64
33
+
34
+ [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
35
+
36
+ > 64-bit complex number.
37
+
38
+ <!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
39
+
40
+ <section class="intro">
41
+
42
+ </section>
43
+
44
+ <!-- /.intro -->
45
+
46
+ <!-- Package usage documentation. -->
47
+
48
+ <section class="installation">
49
+
50
+ ## Installation
51
+
52
+ ```bash
53
+ npm install @stdlib/complex-float32
54
+ ```
55
+
56
+ </section>
57
+
58
+ <section class="usage">
59
+
60
+ ## Usage
61
+
62
+ ```javascript
63
+ var Complex64 = require( '@stdlib/complex-float32' );
64
+ ```
65
+
66
+ #### Complex64( real, imag )
67
+
68
+ 64-bit complex number constructor, where `real` and `imag` are the **real** and **imaginary** components, respectively.
69
+
70
+ ```javascript
71
+ var z = new Complex64( 5.0, 3.0 );
72
+ // returns <Complex64>
73
+ ```
74
+
75
+ * * *
76
+
77
+ ## Properties
78
+
79
+ #### Complex64.BYTES_PER_ELEMENT
80
+
81
+ Size (in bytes) of each component.
82
+
83
+ ```javascript
84
+ var nbytes = Complex64.BYTES_PER_ELEMENT;
85
+ // returns 4
86
+ ```
87
+
88
+ #### Complex64.prototype.BYTES_PER_ELEMENT
89
+
90
+ Size (in bytes) of each component.
91
+
92
+ ```javascript
93
+ var z = new Complex64( 5.0, 3.0 );
94
+
95
+ var nbytes = z.BYTES_PER_ELEMENT;
96
+ // returns 4
97
+ ```
98
+
99
+ #### Complex64.prototype.byteLength
100
+
101
+ Length (in bytes) of a complex number.
102
+
103
+ ```javascript
104
+ var z = new Complex64( 5.0, 3.0 );
105
+
106
+ var nbytes = z.byteLength;
107
+ // returns 8
108
+ ```
109
+
110
+ ### Instance
111
+
112
+ A `Complex64` instance has the following properties...
113
+
114
+ #### re
115
+
116
+ A **read-only** property returning the **real** component.
117
+
118
+ ```javascript
119
+ var z = new Complex64( 5.0, 3.0 );
120
+
121
+ var re = z.re;
122
+ // returns 5.0
123
+ ```
124
+
125
+ #### im
126
+
127
+ A **read-only** property returning the **imaginary** component.
128
+
129
+ ```javascript
130
+ var z = new Complex64( 5.0, -3.0 );
131
+
132
+ var im = z.im;
133
+ // returns -3.0
134
+ ```
135
+
136
+ * * *
137
+
138
+ ## Methods
139
+
140
+ ### Accessor Methods
141
+
142
+ These methods do **not** mutate a `Complex64` instance and, instead, return a complex number representation.
143
+
144
+ #### Complex64.prototype.toString()
145
+
146
+ Returns a `string` representation of a `Complex64` instance.
147
+
148
+ ```javascript
149
+ var z = new Complex64( 5.0, 3.0 );
150
+ var str = z.toString();
151
+ // returns '5 + 3i'
152
+
153
+ z = new Complex64( -5.0, -3.0 );
154
+ str = z.toString();
155
+ // returns '-5 - 3i'
156
+ ```
157
+
158
+ #### Complex64.prototype.toJSON()
159
+
160
+ Returns a [JSON][json] representation of a `Complex64` instance. [`JSON.stringify()`][mdn-json-stringify] implicitly calls this method when stringifying a `Complex64` instance.
161
+
162
+ ```javascript
163
+ var z = new Complex64( 5.0, -3.0 );
164
+
165
+ var o = z.toJSON();
166
+ /*
167
+ {
168
+ "type": "Complex64",
169
+ "re": 5.0,
170
+ "im": -3.0
171
+ }
172
+ */
173
+ ```
174
+
175
+ To [revive][mdn-json-parse] a `Complex64` number from a [JSON][json] `string`, see [@stdlib/complex/reviver-float32][@stdlib/complex/reviver-float32].
176
+
177
+ </section>
178
+
179
+ <!-- /.usage -->
180
+
181
+ * * *
182
+
183
+ <!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
184
+
185
+ <section class="notes">
186
+
187
+ ## Notes
188
+
189
+ - Both the **real** and **imaginary** components are stored as single-precision floating-point numbers.
190
+
191
+ </section>
192
+
193
+ <!-- /.notes -->
194
+
195
+ * * *
196
+
197
+ <!-- Package usage examples. -->
198
+
199
+ <section class="examples">
200
+
201
+ ## Examples
202
+
203
+ <!-- eslint no-undef: "error" -->
204
+
205
+ ```javascript
206
+ var Complex64 = require( '@stdlib/complex-float32' );
207
+
208
+ var z = new Complex64( 3.0, -2.0 );
209
+
210
+ console.log( 'type: %s', typeof z );
211
+ // => 'type: object'
212
+
213
+ console.log( 'str: %s', z );
214
+ // => 'str: 3 - 2i'
215
+
216
+ console.log( 'real: %d', z.re );
217
+ // => 'real: 3'
218
+
219
+ console.log( 'imag: %d', z.im );
220
+ // => 'imag: -2'
221
+
222
+ console.log( 'JSON: %s', JSON.stringify( z ) );
223
+ // => 'JSON: {"type":"Complex64","re":3,"im":-2}'
224
+ ```
225
+
226
+ </section>
227
+
228
+ <!-- /.examples -->
229
+
230
+ <!-- C interface documentation. -->
231
+
232
+ * * *
233
+
234
+ <section class="c">
235
+
236
+ ## C APIs
237
+
238
+ <!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
239
+
240
+ <section class="intro">
241
+
242
+ </section>
243
+
244
+ <!-- /.intro -->
245
+
246
+ <!-- C usage documentation. -->
247
+
248
+ <section class="usage">
249
+
250
+ ### Usage
251
+
252
+ ```c
253
+ #include "stdlib/complex/float32.h"
254
+ ```
255
+
256
+ #### stdlib_complex64_t
257
+
258
+ An opaque type definition for a single-precision complex floating-point number.
259
+
260
+ ```c
261
+ stdlib_complex64_t z = stdlib_complex64( 5.0f, 2.0f );
262
+ ```
263
+
264
+ #### stdlib_complex64_parts_t
265
+
266
+ An opaque type definition for a union for accessing the real and imaginary parts of a single-precision complex floating-point number.
267
+
268
+ ```c
269
+ float realf( const stdlib_complex64_t z ) {
270
+ stdlib_complex64_parts_t v;
271
+
272
+ // Assign a single-precision complex floating-point number:
273
+ v.value = z;
274
+
275
+ // Extract the real component:
276
+ float re = v.parts[ 0 ];
277
+
278
+ return re;
279
+ }
280
+
281
+ // ...
282
+
283
+ // Create a complex number:
284
+ stdlib_complex64_t z = stdlib_complex64( 5.0f, 2.0f );
285
+
286
+ // ...
287
+
288
+ // Access the real component:
289
+ float re = realf( z );
290
+ // returns 5.0f
291
+ ```
292
+
293
+ The union has the following members:
294
+
295
+ - **value**: `stdlib_complex64_t` single-precision complex floating-point number.
296
+
297
+ - **parts**: `float[]` array having the following elements:
298
+
299
+ - **0**: `float` real component.
300
+ - **1**: `float` imaginary component.
301
+
302
+ #### stdlib_complex64( real, imag )
303
+
304
+ Returns a single-precision complex floating-point number.
305
+
306
+ ```c
307
+ stdlib_complex64_t z = stdlib_complex64( 5.0f, 2.0f );
308
+ ```
309
+
310
+ The function accepts the following arguments:
311
+
312
+ - **real**: `[in] float` real component.
313
+ - **imag**: `[in] float` imaginary component.
314
+
315
+ ```c
316
+ stdlib_complex64_t stdlib_complex64( const float real, const float imag );
317
+ ```
318
+
319
+ #### stdlib_complex64_from_float32( real )
320
+
321
+ Converts a single-precision floating-point number to a single-precision complex floating-point number.
322
+
323
+ ```c
324
+ stdlib_complex64_t z = stdlib_complex64_from_float32( 5.0f );
325
+ ```
326
+
327
+ The function accepts the following arguments:
328
+
329
+ - **real**: `[in] float` real component.
330
+
331
+ ```c
332
+ stdlib_complex64_t stdlib_complex64_from_float32( const float real );
333
+ ```
334
+
335
+ #### stdlib_complex64_from_float64( real )
336
+
337
+ Converts a double-precision floating-point number to a single-precision complex floating-point number.
338
+
339
+ ```c
340
+ stdlib_complex64_t z = stdlib_complex64_from_float64( 5.0 );
341
+ ```
342
+
343
+ The function accepts the following arguments:
344
+
345
+ - **real**: `[in] double` real component.
346
+
347
+ ```c
348
+ stdlib_complex64_t stdlib_complex64_from_float64( const double real );
349
+ ```
350
+
351
+ #### stdlib_complex64_from_complex64( z )
352
+
353
+ Converts (copies) a single-precision complex floating-point number to a single-precision complex floating-point number.
354
+
355
+ ```c
356
+ stdlib_complex64_t z1 = stdlib_complex64( 5.0f, 3.0f );
357
+ stdlib_complex64_t z2 = stdlib_complex64_from_complex64( z1 );
358
+ ```
359
+
360
+ The function accepts the following arguments:
361
+
362
+ - **z**: `[in] stdlib_complex64_t` single-precision complex floating-point number.
363
+
364
+ ```c
365
+ stdlib_complex64_t stdlib_complex64_from_complex64( const stdlib_complex64_t z );
366
+ ```
367
+
368
+ #### stdlib_complex64_from_int8( real )
369
+
370
+ Converts a signed 8-bit integer to a single-precision complex floating-point number.
371
+
372
+ ```c
373
+ stdlib_complex64_t z = stdlib_complex64_from_int8( 5 );
374
+ ```
375
+
376
+ The function accepts the following arguments:
377
+
378
+ - **real**: `[in] int8_t` real component.
379
+
380
+ ```c
381
+ stdlib_complex64_t stdlib_complex64_from_int8( const int8_t real );
382
+ ```
383
+
384
+ #### stdlib_complex64_from_uint8( real )
385
+
386
+ Converts an unsigned 8-bit integer to a single-precision complex floating-point number.
387
+
388
+ ```c
389
+ stdlib_complex64_t z = stdlib_complex64_from_uint8( 5 );
390
+ ```
391
+
392
+ The function accepts the following arguments:
393
+
394
+ - **real**: `[in] uint8_t` real component.
395
+
396
+ ```c
397
+ stdlib_complex64_t stdlib_complex64_from_uint8( const uint8_t real );
398
+ ```
399
+
400
+ #### stdlib_complex64_from_int16( real )
401
+
402
+ Converts a signed 16-bit integer to a single-precision complex floating-point number.
403
+
404
+ ```c
405
+ stdlib_complex64_t z = stdlib_complex64_from_int16( 5 );
406
+ ```
407
+
408
+ The function accepts the following arguments:
409
+
410
+ - **real**: `[in] int16_t` real component.
411
+
412
+ ```c
413
+ stdlib_complex64_t stdlib_complex64_from_int16( const int16_t real );
414
+ ```
415
+
416
+ #### stdlib_complex64_from_uint16( real )
417
+
418
+ Converts an unsigned 16-bit integer to a single-precision complex floating-point number.
419
+
420
+ ```c
421
+ stdlib_complex64_t z = stdlib_complex64_from_uint16( 5 );
422
+ ```
423
+
424
+ The function accepts the following arguments:
425
+
426
+ - **real**: `[in] uint16_t` real component.
427
+
428
+ ```c
429
+ stdlib_complex64_t stdlib_complex64_from_uint16( const uint16_t real );
430
+ ```
431
+
432
+ </section>
433
+
434
+ <!-- /.usage -->
435
+
436
+ <!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
437
+
438
+ <section class="notes">
439
+
440
+ </section>
441
+
442
+ <!-- /.notes -->
443
+
444
+ <!-- C API usage examples. -->
445
+
446
+ <section class="examples">
447
+
448
+ ### Examples
449
+
450
+ ```c
451
+ #include "stdlib/complex/float32.h"
452
+ #include <stdint.h>
453
+ #include <stdio.h>
454
+
455
+ /**
456
+ * Return the real component of a single-precision complex floating-point number.
457
+ *
458
+ * @param z complex number
459
+ * @return real component
460
+ */
461
+ static float real( const stdlib_complex64_t z ) {
462
+ stdlib_complex64_parts_t v;
463
+
464
+ // Assign a single-precision complex floating-point number:
465
+ v.value = z;
466
+
467
+ // Extract the real component:
468
+ float re = v.parts[ 0 ];
469
+
470
+ return re;
471
+ }
472
+
473
+ /**
474
+ * Return the imaginary component of a single-precision complex floating-point number.
475
+ *
476
+ * @param z complex number
477
+ * @return imaginary component
478
+ */
479
+ static float imag( const stdlib_complex64_t z ) {
480
+ stdlib_complex64_parts_t v;
481
+
482
+ // Assign a single-precision complex floating-point number:
483
+ v.value = z;
484
+
485
+ // Extract the imaginary component:
486
+ float im = v.parts[ 1 ];
487
+
488
+ return im;
489
+ }
490
+
491
+ int main( void ) {
492
+ const stdlib_complex64_t x[] = {
493
+ stdlib_complex64( 5.0f, 2.0f ),
494
+ stdlib_complex64( -2.0f, 1.0f ),
495
+ stdlib_complex64( 0.0f, -0.0f ),
496
+ stdlib_complex64( 0.0f/0.0f, 0.0f/0.0f )
497
+ };
498
+
499
+ stdlib_complex64_t v;
500
+ int i;
501
+ for ( i = 0; i < 4; i++ ) {
502
+ v = x[ i ];
503
+ printf( "%f + %fi\n", real( v ), imag( v ) );
504
+ }
505
+ }
506
+ ```
507
+
508
+ </section>
509
+
510
+ <!-- /.examples -->
511
+
512
+ </section>
513
+
514
+ <!-- /.c -->
515
+
516
+ <!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
517
+
518
+ <section class="references">
519
+
520
+ </section>
521
+
522
+ <!-- /.references -->
523
+
524
+ <!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
525
+
526
+ <section class="related">
527
+
528
+ * * *
529
+
530
+ ## See Also
531
+
532
+ - <span class="package-name">[`@stdlib/complex-cmplx`][@stdlib/complex/cmplx]</span><span class="delimiter">: </span><span class="description">create a complex number.</span>
533
+ - <span class="package-name">[`@stdlib/complex-float64`][@stdlib/complex/float64]</span><span class="delimiter">: </span><span class="description">128-bit complex number.</span>
534
+
535
+ </section>
536
+
537
+ <!-- /.related -->
538
+
539
+ <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
540
+
541
+
542
+ <section class="main-repo" >
543
+
544
+ * * *
545
+
546
+ ## Notice
547
+
548
+ This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
549
+
550
+ For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib].
551
+
552
+ #### Community
553
+
554
+ [![Chat][chat-image]][chat-url]
555
+
556
+ ---
557
+
558
+ ## License
559
+
560
+ See [LICENSE][stdlib-license].
561
+
562
+
563
+ ## Copyright
564
+
565
+ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
566
+
567
+ </section>
568
+
569
+ <!-- /.stdlib -->
570
+
571
+ <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
572
+
573
+ <section class="links">
574
+
575
+ [npm-image]: http://img.shields.io/npm/v/@stdlib/complex-float32.svg
576
+ [npm-url]: https://npmjs.org/package/@stdlib/complex-float32
577
+
578
+ [test-image]: https://github.com/stdlib-js/complex-float32/actions/workflows/test.yml/badge.svg?branch=v0.2.1
579
+ [test-url]: https://github.com/stdlib-js/complex-float32/actions/workflows/test.yml?query=branch:v0.2.1
580
+
581
+ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/complex-float32/main.svg
582
+ [coverage-url]: https://codecov.io/github/stdlib-js/complex-float32?branch=main
583
+
584
+ <!--
585
+
586
+ [dependencies-image]: https://img.shields.io/david/stdlib-js/complex-float32.svg
587
+ [dependencies-url]: https://david-dm.org/stdlib-js/complex-float32/main
588
+
589
+ -->
590
+
591
+ [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
592
+ [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
593
+
594
+ [stdlib]: https://github.com/stdlib-js/stdlib
595
+
596
+ [stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
597
+
598
+ [umd]: https://github.com/umdjs/umd
599
+ [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
600
+
601
+ [deno-url]: https://github.com/stdlib-js/complex-float32/tree/deno
602
+ [deno-readme]: https://github.com/stdlib-js/complex-float32/blob/deno/README.md
603
+ [umd-url]: https://github.com/stdlib-js/complex-float32/tree/umd
604
+ [umd-readme]: https://github.com/stdlib-js/complex-float32/blob/umd/README.md
605
+ [esm-url]: https://github.com/stdlib-js/complex-float32/tree/esm
606
+ [esm-readme]: https://github.com/stdlib-js/complex-float32/blob/esm/README.md
607
+ [branches-url]: https://github.com/stdlib-js/complex-float32/blob/main/branches.md
608
+
609
+ [stdlib-license]: https://raw.githubusercontent.com/stdlib-js/complex-float32/main/LICENSE
610
+
611
+ [json]: http://www.json.org/
612
+
613
+ [mdn-json-stringify]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
614
+
615
+ [mdn-json-parse]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse
616
+
617
+ [@stdlib/complex/reviver-float32]: https://www.npmjs.com/package/@stdlib/complex-reviver-float32
618
+
619
+ <!-- <related-links> -->
620
+
621
+ [@stdlib/complex/cmplx]: https://www.npmjs.com/package/@stdlib/complex-cmplx
622
+
623
+ [@stdlib/complex/float64]: https://www.npmjs.com/package/@stdlib/complex-float64
624
+
625
+ <!-- </related-links> -->
626
+
627
+ </section>
628
+
629
+ <!-- /.links -->
@@ -0,0 +1,5 @@
1
+ # Security
2
+
3
+ > Policy for reporting security vulnerabilities.
4
+
5
+ See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security).
@@ -0,0 +1,3 @@
1
+ /// <reference path="../docs/types/index.d.ts" />
2
+ import Complex64 from '../docs/types/index';
3
+ export = Complex64;
@@ -0,0 +1,9 @@
1
+ "use strict";var o=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var a=o(function(S,n){
2
+ function c(){var e=""+this.re;return this.im<0?e+=" - "+-this.im:e+=" + "+this.im,e+="i",e}n.exports=c
3
+ });var u=o(function(T,s){
4
+ function b(){var e={};return e.type="Complex64",e.re=this.re,e.im=this.im,e}s.exports=b
5
+ });var h=o(function(d,v){
6
+ var l=require('@stdlib/assert-is-number/dist').isPrimitive,m=require('@stdlib/utils-define-property/dist'),i=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),p=require('@stdlib/number-float64-base-to-float32/dist'),f=require('@stdlib/error-tools-fmtprodmsg/dist'),y=a(),E=u();function t(e,r){if(!(this instanceof t))throw new TypeError(f('0Gp0G'));if(!l(e))throw new TypeError(f('0Gp3e',e));if(!l(r))throw new TypeError(f('0Gp3f',r));return m(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:p(e)}),m(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:p(r)}),this}i(t,"BYTES_PER_ELEMENT",4);i(t.prototype,"BYTES_PER_ELEMENT",4);i(t.prototype,"byteLength",8);i(t.prototype,"toString",y);i(t.prototype,"toJSON",E);v.exports=t
7
+ });var w=h();module.exports=w;
8
+ /** @license Apache-2.0 */
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../lib/tostring.js", "../lib/tojson.js", "../lib/main.js", "../lib/index.js"],
4
+ "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nmodule.exports = toString;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = toJSON;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;\nvar defineProperty = require( '@stdlib/utils-define-property' );\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar float64ToFloat32 = require( '@stdlib/number-float64-base-to-float32' );\nvar format = require( '@stdlib/string-format' );\nvar toStr = require( './tostring.js' );\nvar toJSON = require( './tojson.js' );\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns <Complex64>\n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nmodule.exports = Complex64;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* 64-bit complex number constructor.\n*\n* @module @stdlib/complex-float32\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32' );\n*\n* var z = new Complex64( 5.0, 3.0 );\n* // returns <Complex64>\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
5
+ "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cA0BA,SAASC,GAAW,CAEnB,IAAIC,EAAM,GAAK,KAAK,GACpB,OAAK,KAAK,GAAK,EACdA,GAAO,MAAS,CAAC,KAAK,GAEtBA,GAAO,MAAQ,KAAK,GAErBA,GAAO,IACAA,CACR,CAKAF,EAAO,QAAUC,ICzCjB,IAAAE,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cA0BA,SAASC,GAAS,CAEjB,IAAIC,EAAM,CAAC,EACX,OAAAA,EAAI,KAAO,YACXA,EAAI,GAAK,KAAK,GACdA,EAAI,GAAK,KAAK,GACPA,CACR,CAKAF,EAAO,QAAUC,ICtCjB,IAAAE,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAW,QAAS,0BAA2B,EAAE,YACjDC,EAAiB,QAAS,+BAAgC,EAC1DC,EAAc,QAAS,uDAAwD,EAC/EC,EAAmB,QAAS,wCAAyC,EACrEC,EAAS,QAAS,uBAAwB,EAC1CC,EAAQ,IACRC,EAAS,IAoBb,SAASC,EAAWC,EAAMC,EAAO,CAChC,GAAK,EAAG,gBAAgBF,GACvB,MAAM,IAAI,UAAW,wEAAyE,EAE/F,GAAK,CAACP,EAAUQ,CAAK,EACpB,MAAM,IAAI,UAAWJ,EAAQ,kEAAmEI,CAAK,CAAE,EAExG,GAAK,CAACR,EAAUS,CAAK,EACpB,MAAM,IAAI,UAAWL,EAAQ,uEAAwEK,CAAK,CAAE,EAE7G,OAAAR,EAAgB,KAAM,KAAM,CAC3B,aAAgB,GAChB,WAAc,GACd,SAAY,GACZ,MAASE,EAAkBK,CAAK,CACjC,CAAC,EACDP,EAAgB,KAAM,KAAM,CAC3B,aAAgB,GAChB,WAAc,GACd,SAAY,GACZ,MAASE,EAAkBM,CAAK,CACjC,CAAC,EACM,IACR,CAcAP,EAAaK,EAAW,oBAAqB,CAAE,EAgB/CL,EAAaK,EAAU,UAAW,oBAAqB,CAAE,EAgBzDL,EAAaK,EAAU,UAAW,aAAc,CAAE,EAgBlDL,EAAaK,EAAU,UAAW,WAAYF,CAAM,EAoBpDH,EAAaK,EAAU,UAAW,SAAUD,CAAO,EAKnDP,EAAO,QAAUQ,IC5HjB,IAAIG,EAAO,IAKX,OAAO,QAAUA",
6
+ "names": ["require_tostring", "__commonJSMin", "exports", "module", "toString", "str", "require_tojson", "__commonJSMin", "exports", "module", "toJSON", "out", "require_main", "__commonJSMin", "exports", "module", "isNumber", "defineProperty", "setReadOnly", "float64ToFloat32", "format", "toStr", "toJSON", "Complex64", "real", "imag", "main"]
7
+ }