@stdlib/complex-float32-base-assert-is-not-equal 0.1.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.
package/LICENSE ADDED
@@ -0,0 +1,177 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
package/NOTICE ADDED
@@ -0,0 +1 @@
1
+ Copyright (c) 2016-2024 The Stdlib Authors.
package/README.md ADDED
@@ -0,0 +1,312 @@
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
+
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
+ # isNotEqualf
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
+ > Test whether two single-precision complex floating-point numbers are not equal.
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-base-assert-is-not-equal
54
+ ```
55
+
56
+ </section>
57
+
58
+ <section class="usage">
59
+
60
+ ## Usage
61
+
62
+ ```javascript
63
+ var isNotEqualf = require( '@stdlib/complex-float32-base-assert-is-not-equal' );
64
+ ```
65
+
66
+ #### isNotEqualf( z1, z2 )
67
+
68
+ Tests whether two single-precision complex floating-point numbers are not equal.
69
+
70
+ ```javascript
71
+ var Complex64 = require( '@stdlib/complex-float32-ctor' );
72
+
73
+ var z1 = new Complex64( 5.0, 3.0 );
74
+ var z2 = new Complex64( 5.0, -3.0 );
75
+
76
+ var out = isNotEqualf( z1, z2 );
77
+ // returns true
78
+ ```
79
+
80
+ </section>
81
+
82
+ <!-- /.usage -->
83
+
84
+ <!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
85
+
86
+ <section class="notes">
87
+
88
+ </section>
89
+
90
+ <!-- /.notes -->
91
+
92
+ <!-- Package usage examples. -->
93
+
94
+ <section class="examples">
95
+
96
+ ## Examples
97
+
98
+ <!-- eslint no-undef: "error" -->
99
+
100
+ ```javascript
101
+ var Complex64 = require( '@stdlib/complex-float32-ctor' );
102
+ var isNotEqualf = require( '@stdlib/complex-float32-base-assert-is-not-equal' );
103
+
104
+ var z1 = new Complex64( 5.0, 3.0 );
105
+ var z2 = new Complex64( 5.0, 3.0 );
106
+ var out = isNotEqualf( z1, z2 );
107
+ // returns false
108
+
109
+ z1 = new Complex64( -5.0, -3.0 );
110
+ z2 = new Complex64( 5.0, 3.0 );
111
+ out = isNotEqualf( z1, z2 );
112
+ // returns true
113
+
114
+ z1 = new Complex64( NaN, 3.0 );
115
+ z2 = new Complex64( NaN, 3.0 );
116
+ out = isNotEqualf( z1, z2 );
117
+ // returns true
118
+ ```
119
+
120
+ </section>
121
+
122
+ <!-- /.examples -->
123
+
124
+ <!-- C interface documentation. -->
125
+
126
+ * * *
127
+
128
+ <section class="c">
129
+
130
+ ## C APIs
131
+
132
+ <!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
133
+
134
+ <section class="intro">
135
+
136
+ </section>
137
+
138
+ <!-- /.intro -->
139
+
140
+ <!-- C usage documentation. -->
141
+
142
+ <section class="usage">
143
+
144
+ ### Usage
145
+
146
+ ```c
147
+ #include "stdlib/complex/float32/base/assert/is_not_equal.h"
148
+ ```
149
+
150
+ #### stdlib_base_complex64_is_not_equal( z1, z2 )
151
+
152
+ Tests whether single-precision complex floating-point numbers are not equal.
153
+
154
+ ```c
155
+ #include "stdlib/complex/float32/ctor.h"
156
+ #include <stdbool.h>
157
+
158
+ stdlib_complex64_t z1 = stdlib_complex64( 5.0, 2.0 );
159
+ stdlib_complex64_t z2 = stdlib_complex64( 5.0, -2.0 );
160
+
161
+ bool v = stdlib_base_complex64_is_not_equal( z1, z2 );
162
+ ```
163
+
164
+ The function accepts the following arguments:
165
+
166
+ - **z1**: `[in] stdlib_complex64_t` first single-precision complex floating-point number.
167
+ - **z2**: `[in] stdlib_complex64_t` second single-precision complex floating-point number.
168
+
169
+ ```c
170
+ bool stdlib_base_complex64_is_not_equal( const stdlib_complex64_t z1, const stdlib_complex64_t z2 );
171
+ ```
172
+
173
+ </section>
174
+
175
+ <!-- /.usage -->
176
+
177
+ <!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
178
+
179
+ <section class="notes">
180
+
181
+ </section>
182
+
183
+ <!-- /.notes -->
184
+
185
+ <!-- C API usage examples. -->
186
+
187
+ <section class="examples">
188
+
189
+ ### Examples
190
+
191
+ ```c
192
+ #include "stdlib/complex/float32/base/assert/is_not_equal.h"
193
+ #include "stdlib/complex/float32/ctor.h"
194
+ #include <stdbool.h>
195
+ #include <stdio.h>
196
+
197
+ int main( void ) {
198
+ const stdlib_complex64_t z[] = {
199
+ stdlib_complex64( 5.0f, 2.0f ),
200
+ stdlib_complex64( -2.0f, 1.0f ),
201
+ stdlib_complex64( 0.0f, -0.0f ),
202
+ stdlib_complex64( 0.0f/0.0f, 0.0f/0.0f )
203
+ };
204
+
205
+ bool v;
206
+ int i;
207
+ for ( i = 0; i < 4; i++ ) {
208
+ v = stdlib_base_complex64_is_not_equal( z[ i ], z[ i ] );
209
+ printf( "Equal? %s\n", ( v ) ? "True" : "False" );
210
+ }
211
+ }
212
+ ```
213
+
214
+ </section>
215
+
216
+ <!-- /.examples -->
217
+
218
+ </section>
219
+
220
+ <!-- /.c -->
221
+
222
+ <!-- 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. -->
223
+
224
+ <section class="references">
225
+
226
+ </section>
227
+
228
+ <!-- /.references -->
229
+
230
+ <!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
231
+
232
+ <section class="related">
233
+
234
+ </section>
235
+
236
+ <!-- /.related -->
237
+
238
+ <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
239
+
240
+
241
+ <section class="main-repo" >
242
+
243
+ * * *
244
+
245
+ ## Notice
246
+
247
+ 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.
248
+
249
+ 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].
250
+
251
+ #### Community
252
+
253
+ [![Chat][chat-image]][chat-url]
254
+
255
+ ---
256
+
257
+ ## License
258
+
259
+ See [LICENSE][stdlib-license].
260
+
261
+
262
+ ## Copyright
263
+
264
+ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
265
+
266
+ </section>
267
+
268
+ <!-- /.stdlib -->
269
+
270
+ <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
271
+
272
+ <section class="links">
273
+
274
+ [npm-image]: http://img.shields.io/npm/v/@stdlib/complex-float32-base-assert-is-not-equal.svg
275
+ [npm-url]: https://npmjs.org/package/@stdlib/complex-float32-base-assert-is-not-equal
276
+
277
+ [test-image]: https://github.com/stdlib-js/complex-float32-base-assert-is-not-equal/actions/workflows/test.yml/badge.svg?branch=v0.1.0
278
+ [test-url]: https://github.com/stdlib-js/complex-float32-base-assert-is-not-equal/actions/workflows/test.yml?query=branch:v0.1.0
279
+
280
+ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/complex-float32-base-assert-is-not-equal/main.svg
281
+ [coverage-url]: https://codecov.io/github/stdlib-js/complex-float32-base-assert-is-not-equal?branch=main
282
+
283
+ <!--
284
+
285
+ [dependencies-image]: https://img.shields.io/david/stdlib-js/complex-float32-base-assert-is-not-equal.svg
286
+ [dependencies-url]: https://david-dm.org/stdlib-js/complex-float32-base-assert-is-not-equal/main
287
+
288
+ -->
289
+
290
+ [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
291
+ [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
292
+
293
+ [stdlib]: https://github.com/stdlib-js/stdlib
294
+
295
+ [stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
296
+
297
+ [umd]: https://github.com/umdjs/umd
298
+ [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
299
+
300
+ [deno-url]: https://github.com/stdlib-js/complex-float32-base-assert-is-not-equal/tree/deno
301
+ [deno-readme]: https://github.com/stdlib-js/complex-float32-base-assert-is-not-equal/blob/deno/README.md
302
+ [umd-url]: https://github.com/stdlib-js/complex-float32-base-assert-is-not-equal/tree/umd
303
+ [umd-readme]: https://github.com/stdlib-js/complex-float32-base-assert-is-not-equal/blob/umd/README.md
304
+ [esm-url]: https://github.com/stdlib-js/complex-float32-base-assert-is-not-equal/tree/esm
305
+ [esm-readme]: https://github.com/stdlib-js/complex-float32-base-assert-is-not-equal/blob/esm/README.md
306
+ [branches-url]: https://github.com/stdlib-js/complex-float32-base-assert-is-not-equal/blob/main/branches.md
307
+
308
+ [stdlib-license]: https://raw.githubusercontent.com/stdlib-js/complex-float32-base-assert-is-not-equal/main/LICENSE
309
+
310
+ </section>
311
+
312
+ <!-- /.links -->
package/SECURITY.md ADDED
@@ -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 isNotEqualf from '../docs/types/index';
3
+ export = isNotEqualf;
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";var n=function(t,r){return function(){return r||t((r={exports:{}}).exports,r),r.exports}};var u=n(function(c,i){
2
+ var a=require('@stdlib/complex-float32-reim/dist');function o(t,r){var e=a(t),s=a(r);return e[0]!==s[0]||e[1]!==s[1]}i.exports=o
3
+ });var p=u();module.exports=p;
4
+ /** @license Apache-2.0 */
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../lib/main.js", "../lib/index.js"],
4
+ "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 reimf = require( '@stdlib/complex-float32-reim' );\n\n\n// MAIN //\n\n/**\n* Tests whether two single-precision complex floating-point numbers are not equal.\n*\n* @param {Complex64} z1 - first complex number\n* @param {Complex64} z2 - second complex number\n* @returns {boolean} result\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32-ctor' );\n*\n* var z1 = new Complex64( 5.0, 3.0 );\n* var z2 = new Complex64( 5.0, -3.0 );\n*\n* var v = isNotEqualf( z1, z2 );\n* // returns true\n*/\nfunction isNotEqualf( z1, z2 ) {\n\tvar parts1 = reimf( z1 );\n\tvar parts2 = reimf( z2 );\n\treturn (\n\t\tparts1[ 0 ] !== parts2[ 0 ] ||\n\t\tparts1[ 1 ] !== parts2[ 1 ]\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isNotEqualf;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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* Test whether two single-precision complex floating-point numbers are not equal.\n*\n* @module @stdlib/complex-float32-base-assert-is-not-equal\n*\n* @example\n* var Complex64 = require( '@stdlib/complex-float32-ctor' );\n* var isNotEqualf = require( '@stdlib/complex-float32-base-assert-is-not-equal' );\n*\n* var z1 = new Complex64( 5.0, 3.0 );\n* var z2 = new Complex64( 5.0, -3.0 );\n*\n* var v = isNotEqualf( z1, z2 );\n* // returns true\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,cAsBA,IAAIC,EAAQ,QAAS,8BAA+B,EAqBpD,SAASC,EAAaC,EAAIC,EAAK,CAC9B,IAAIC,EAASJ,EAAOE,CAAG,EACnBG,EAASL,EAAOG,CAAG,EACvB,OACCC,EAAQ,CAAE,IAAMC,EAAQ,CAAE,GAC1BD,EAAQ,CAAE,IAAMC,EAAQ,CAAE,CAE5B,CAKAN,EAAO,QAAUE,ICjBjB,IAAIK,EAAO,IAKX,OAAO,QAAUA",
6
+ "names": ["require_main", "__commonJSMin", "exports", "module", "reimf", "isNotEqualf", "z1", "z2", "parts1", "parts2", "main"]
7
+ }
@@ -0,0 +1,44 @@
1
+ /*
2
+ * @license Apache-2.0
3
+ *
4
+ * Copyright (c) 2024 The Stdlib Authors.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ // TypeScript Version: 4.1
20
+
21
+ import Complex64 = require( '@stdlib/complex-float32-ctor' );
22
+
23
+ /**
24
+ * Tests whether two single-precision complex floating-point numbers are not equal.
25
+ *
26
+ * @param z1 - first complex number
27
+ * @param z2 - second complex number
28
+ * @returns boolean indicating if both complex numbers are not equal
29
+ *
30
+ * @example
31
+ * var Complex64 = require( '@stdlib/complex-float32-ctor' );
32
+ *
33
+ * var z1 = new Complex64( 5.0, 3.0 );
34
+ * var z2 = new Complex64( 5.0, -3.0 );
35
+ *
36
+ * var v = isNotEqualf( z1, z2 );
37
+ * // returns true
38
+ */
39
+ declare function isNotEqualf( z1: Complex64, z2: Complex64 ): boolean;
40
+
41
+
42
+ // EXPORTS //
43
+
44
+ export = isNotEqualf;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @license Apache-2.0
3
+ *
4
+ * Copyright (c) 2024 The Stdlib Authors.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ #ifndef STDLIB_COMPLEX_FLOAT32_BASE_ASSERT_IS_NOT_EQUAL_H
20
+ #define STDLIB_COMPLEX_FLOAT32_BASE_ASSERT_IS_NOT_EQUAL_H
21
+
22
+ #include "stdlib/complex/float32/ctor.h"
23
+ #include <stdbool.h>
24
+
25
+ /*
26
+ * If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler.
27
+ */
28
+ #ifdef __cplusplus
29
+ extern "C" {
30
+ #endif
31
+
32
+ /**
33
+ * Tests whether two single-precision complex floating-point numbers are not equal.
34
+ */
35
+ bool stdlib_base_complex64_is_not_equal( const stdlib_complex64_t z1, const stdlib_complex64_t z2 );
36
+
37
+ #ifdef __cplusplus
38
+ }
39
+ #endif
40
+
41
+ #endif // !STDLIB_COMPLEX_FLOAT32_BASE_ASSERT_IS_NOT_EQUAL_H
package/lib/index.js ADDED
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @license Apache-2.0
3
+ *
4
+ * Copyright (c) 2024 The Stdlib Authors.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ 'use strict';
20
+
21
+ /**
22
+ * Test whether two single-precision complex floating-point numbers are not equal.
23
+ *
24
+ * @module @stdlib/complex-float32-base-assert-is-not-equal
25
+ *
26
+ * @example
27
+ * var Complex64 = require( '@stdlib/complex-float32-ctor' );
28
+ * var isNotEqualf = require( '@stdlib/complex-float32-base-assert-is-not-equal' );
29
+ *
30
+ * var z1 = new Complex64( 5.0, 3.0 );
31
+ * var z2 = new Complex64( 5.0, -3.0 );
32
+ *
33
+ * var v = isNotEqualf( z1, z2 );
34
+ * // returns true
35
+ */
36
+
37
+ // MODULES //
38
+
39
+ var main = require( './main.js' );
40
+
41
+
42
+ // EXPORTS //
43
+
44
+ module.exports = main;
package/lib/main.js ADDED
@@ -0,0 +1,56 @@
1
+ /**
2
+ * @license Apache-2.0
3
+ *
4
+ * Copyright (c) 2024 The Stdlib Authors.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ 'use strict';
20
+
21
+ // MODULES //
22
+
23
+ var reimf = require( '@stdlib/complex-float32-reim' );
24
+
25
+
26
+ // MAIN //
27
+
28
+ /**
29
+ * Tests whether two single-precision complex floating-point numbers are not equal.
30
+ *
31
+ * @param {Complex64} z1 - first complex number
32
+ * @param {Complex64} z2 - second complex number
33
+ * @returns {boolean} result
34
+ *
35
+ * @example
36
+ * var Complex64 = require( '@stdlib/complex-float32-ctor' );
37
+ *
38
+ * var z1 = new Complex64( 5.0, 3.0 );
39
+ * var z2 = new Complex64( 5.0, -3.0 );
40
+ *
41
+ * var v = isNotEqualf( z1, z2 );
42
+ * // returns true
43
+ */
44
+ function isNotEqualf( z1, z2 ) {
45
+ var parts1 = reimf( z1 );
46
+ var parts2 = reimf( z2 );
47
+ return (
48
+ parts1[ 0 ] !== parts2[ 0 ] ||
49
+ parts1[ 1 ] !== parts2[ 1 ]
50
+ );
51
+ }
52
+
53
+
54
+ // EXPORTS //
55
+
56
+ module.exports = isNotEqualf;
package/manifest.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "options": {
3
+ "task": "build"
4
+ },
5
+ "fields": [
6
+ {
7
+ "field": "src",
8
+ "resolve": true,
9
+ "relative": true
10
+ },
11
+ {
12
+ "field": "include",
13
+ "resolve": true,
14
+ "relative": true
15
+ },
16
+ {
17
+ "field": "libraries",
18
+ "resolve": false,
19
+ "relative": false
20
+ },
21
+ {
22
+ "field": "libpath",
23
+ "resolve": true,
24
+ "relative": false
25
+ }
26
+ ],
27
+ "confs": [
28
+ {
29
+ "task": "build",
30
+ "src": [
31
+ "./src/main.c"
32
+ ],
33
+ "include": [
34
+ "./include"
35
+ ],
36
+ "libraries": [],
37
+ "libpath": [],
38
+ "dependencies": [
39
+ "@stdlib/complex-float32-ctor",
40
+ "@stdlib/complex-float32-reim"
41
+ ]
42
+ },
43
+ {
44
+ "task": "examples",
45
+ "src": [
46
+ "./src/main.c"
47
+ ],
48
+ "include": [
49
+ "./include"
50
+ ],
51
+ "libraries": [],
52
+ "libpath": [],
53
+ "dependencies": [
54
+ "@stdlib/complex-float32-ctor",
55
+ "@stdlib/complex-float32-reim"
56
+ ]
57
+ }
58
+ ]
59
+ }
package/package.json ADDED
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "@stdlib/complex-float32-base-assert-is-not-equal",
3
+ "version": "0.1.0",
4
+ "description": "Test whether two single-precision complex floating-point numbers are not equal.",
5
+ "license": "Apache-2.0",
6
+ "author": {
7
+ "name": "The Stdlib Authors",
8
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
9
+ },
10
+ "contributors": [
11
+ {
12
+ "name": "The Stdlib Authors",
13
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
14
+ }
15
+ ],
16
+ "main": "./lib",
17
+ "directories": {
18
+ "doc": "./docs",
19
+ "include": "./include",
20
+ "lib": "./lib",
21
+ "src": "./src",
22
+ "dist": "./dist"
23
+ },
24
+ "types": "./docs/types",
25
+ "scripts": {},
26
+ "homepage": "https://stdlib.io",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git://github.com/stdlib-js/complex-float32-base-assert-is-not-equal.git"
30
+ },
31
+ "bugs": {
32
+ "url": "https://github.com/stdlib-js/stdlib/issues"
33
+ },
34
+ "dependencies": {
35
+ "@stdlib/complex-float32-ctor": "^0.0.1",
36
+ "@stdlib/complex-float32-reim": "github:stdlib-js/complex-float32-reim#main"
37
+ },
38
+ "devDependencies": {},
39
+ "engines": {
40
+ "node": ">=0.10.0",
41
+ "npm": ">2.7.0"
42
+ },
43
+ "os": [
44
+ "aix",
45
+ "darwin",
46
+ "freebsd",
47
+ "linux",
48
+ "macos",
49
+ "openbsd",
50
+ "sunos",
51
+ "win32",
52
+ "windows"
53
+ ],
54
+ "keywords": [
55
+ "stdlib",
56
+ "stdmath",
57
+ "mathematics",
58
+ "math",
59
+ "complex",
60
+ "cmplx",
61
+ "number",
62
+ "base",
63
+ "assert",
64
+ "test",
65
+ "validate",
66
+ "equality",
67
+ "compare",
68
+ "comparison",
69
+ "equal",
70
+ "eq",
71
+ "unequal"
72
+ ],
73
+ "funding": {
74
+ "type": "opencollective",
75
+ "url": "https://opencollective.com/stdlib"
76
+ }
77
+ }
package/src/main.c ADDED
@@ -0,0 +1,48 @@
1
+ /**
2
+ * @license Apache-2.0
3
+ *
4
+ * Copyright (c) 2024 The Stdlib Authors.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ #include "stdlib/complex/float32/base/assert/is_not_equal.h"
20
+ #include "stdlib/complex/float32/reim.h"
21
+ #include "stdlib/complex/float32/ctor.h"
22
+ #include <stdbool.h>
23
+
24
+ /**
25
+ * Tests whether two single-precision complex floating-point numbers are not equal.
26
+ *
27
+ * @param z1 first single-precision complex floating-point number
28
+ * @param z2 second single-precision complex floating-point number
29
+ * @return boolean indicating if both complex numbers are not equal
30
+ *
31
+ * @example
32
+ * #include "stdlib/complex/float32/ctor.h"
33
+ * #include <stdbool.h>
34
+ *
35
+ * stdlib_complex64_t z1 = stdlib_complex64( 5.0, 2.0 );
36
+ * stdlib_complex64_t z2 = stdlib_complex64( 5.0, -2.0 );
37
+ *
38
+ * bool v = stdlib_base_complex64_is_not_equal( z1, z2 );
39
+ */
40
+ bool stdlib_base_complex64_is_not_equal( const stdlib_complex64_t z1, const stdlib_complex64_t z2 ) {
41
+ float re1;
42
+ float re2;
43
+ float im1;
44
+ float im2;
45
+ stdlib_complex64_reim( z1, &re1, &im1 );
46
+ stdlib_complex64_reim( z2, &re2, &im2 );
47
+ return ( re1 != re2 || im1 != im2 );
48
+ }