|
| 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 | +# isNotEqual |
| 22 | + |
| 23 | +> Test whether two double-precision complex floating-point numbers are not equal. |
| 24 | +
|
| 25 | +<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. --> |
| 26 | + |
| 27 | +<section class="intro"> |
| 28 | + |
| 29 | +</section> |
| 30 | + |
| 31 | +<!-- /.intro --> |
| 32 | + |
| 33 | +<!-- Package usage documentation. --> |
| 34 | + |
| 35 | +<section class="usage"> |
| 36 | + |
| 37 | +## Usage |
| 38 | + |
| 39 | +```javascript |
| 40 | +var isNotEqual = require( '@stdlib/complex/float64/base/assert/is-not-equal' ); |
| 41 | +``` |
| 42 | + |
| 43 | +#### isNotEqual( z1, z2 ) |
| 44 | + |
| 45 | +Tests whether two double-precision complex floating-point numbers are not equal. |
| 46 | + |
| 47 | +```javascript |
| 48 | +var Complex128 = require( '@stdlib/complex/float64/ctor' ); |
| 49 | + |
| 50 | +var z1 = new Complex128( 5.0, 3.0 ); |
| 51 | +var z2 = new Complex128( 5.0, -3.0 ); |
| 52 | + |
| 53 | +var out = isNotEqual( z1, z2 ); |
| 54 | +// returns true |
| 55 | +``` |
| 56 | + |
| 57 | +</section> |
| 58 | + |
| 59 | +<!-- /.usage --> |
| 60 | + |
| 61 | +<!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> |
| 62 | + |
| 63 | +<section class="notes"> |
| 64 | + |
| 65 | +</section> |
| 66 | + |
| 67 | +<!-- /.notes --> |
| 68 | + |
| 69 | +<!-- Package usage examples. --> |
| 70 | + |
| 71 | +<section class="examples"> |
| 72 | + |
| 73 | +## Examples |
| 74 | + |
| 75 | +<!-- eslint no-undef: "error" --> |
| 76 | + |
| 77 | +```javascript |
| 78 | +var Complex128 = require( '@stdlib/complex/float64/ctor' ); |
| 79 | +var isNotEqual = require( '@stdlib/complex/float64/base/assert/is-not-equal' ); |
| 80 | + |
| 81 | +var z1 = new Complex128( 5.0, 3.0 ); |
| 82 | +var z2 = new Complex128( 5.0, 3.0 ); |
| 83 | +var out = isNotEqual( z1, z2 ); |
| 84 | +// returns false |
| 85 | + |
| 86 | +z1 = new Complex128( -5.0, -3.0 ); |
| 87 | +z2 = new Complex128( 5.0, 3.0 ); |
| 88 | +out = isNotEqual( z1, z2 ); |
| 89 | +// returns true |
| 90 | + |
| 91 | +z1 = new Complex128( NaN, 3.0 ); |
| 92 | +z2 = new Complex128( NaN, 3.0 ); |
| 93 | +out = isNotEqual( z1, z2 ); |
| 94 | +// returns true |
| 95 | +``` |
| 96 | + |
| 97 | +</section> |
| 98 | + |
| 99 | +<!-- /.examples --> |
| 100 | + |
| 101 | +<!-- C interface documentation. --> |
| 102 | + |
| 103 | +* * * |
| 104 | + |
| 105 | +<section class="c"> |
| 106 | + |
| 107 | +## C APIs |
| 108 | + |
| 109 | +<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. --> |
| 110 | + |
| 111 | +<section class="intro"> |
| 112 | + |
| 113 | +</section> |
| 114 | + |
| 115 | +<!-- /.intro --> |
| 116 | + |
| 117 | +<!-- C usage documentation. --> |
| 118 | + |
| 119 | +<section class="usage"> |
| 120 | + |
| 121 | +### Usage |
| 122 | + |
| 123 | +```c |
| 124 | +#include "stdlib/complex/float64/base/assert/is_not_equal.h" |
| 125 | +``` |
| 126 | + |
| 127 | +#### stdlib_base_complex128_is_not_equal( z1, z2 ) |
| 128 | + |
| 129 | +Tests whether double-precision complex floating-point numbers are not equal. |
| 130 | + |
| 131 | +```c |
| 132 | +#include "stdlib/complex/float64/ctor.h" |
| 133 | +#include <stdbool.h> |
| 134 | + |
| 135 | +stdlib_complex128_t z1 = stdlib_complex128( 5.0, 2.0 ); |
| 136 | +stdlib_complex128_t z2 = stdlib_complex128( 5.0, -2.0 ); |
| 137 | + |
| 138 | +bool v = stdlib_base_complex128_is_not_equal( z1, z2 ); |
| 139 | +``` |
| 140 | + |
| 141 | +The function accepts the following arguments: |
| 142 | + |
| 143 | +- **z1**: `[in] stdlib_complex128_t` first double-precision complex floating-point number. |
| 144 | +- **z2**: `[in] stdlib_complex128_t` second double-precision complex floating-point number. |
| 145 | + |
| 146 | +```c |
| 147 | +bool stdlib_base_complex128_is_not_equal( const stdlib_complex128_t z1, const stdlib_complex128_t z2 ); |
| 148 | +``` |
| 149 | +
|
| 150 | +</section> |
| 151 | +
|
| 152 | +<!-- /.usage --> |
| 153 | +
|
| 154 | +<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> |
| 155 | +
|
| 156 | +<section class="notes"> |
| 157 | +
|
| 158 | +</section> |
| 159 | +
|
| 160 | +<!-- /.notes --> |
| 161 | +
|
| 162 | +<!-- C API usage examples. --> |
| 163 | +
|
| 164 | +<section class="examples"> |
| 165 | +
|
| 166 | +### Examples |
| 167 | +
|
| 168 | +```c |
| 169 | +#include "stdlib/complex/float64/base/assert/is_not_equal.h" |
| 170 | +#include "stdlib/complex/float64/ctor.h" |
| 171 | +#include <stdbool.h> |
| 172 | +#include <stdio.h> |
| 173 | +
|
| 174 | +int main( void ) { |
| 175 | + const stdlib_complex128_t z[] = { |
| 176 | + stdlib_complex128( 5.0, 2.0 ), |
| 177 | + stdlib_complex128( -2.0, 1.0 ), |
| 178 | + stdlib_complex128( 0.0, -0.0 ), |
| 179 | + stdlib_complex128( 0.0/0.0, 0.0/0.0 ) |
| 180 | + }; |
| 181 | +
|
| 182 | + bool v; |
| 183 | + int i; |
| 184 | + for ( i = 0; i < 4; i++ ) { |
| 185 | + v = stdlib_base_complex128_is_not_equal( z[ i ], z[ i ] ); |
| 186 | + printf( "Equal? %s\n", ( v ) ? "True" : "False" ); |
| 187 | + } |
| 188 | +} |
| 189 | +``` |
| 190 | + |
| 191 | +</section> |
| 192 | + |
| 193 | +<!-- /.examples --> |
| 194 | + |
| 195 | +</section> |
| 196 | + |
| 197 | +<!-- /.c --> |
| 198 | + |
| 199 | +<!-- 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. --> |
| 200 | + |
| 201 | +<section class="references"> |
| 202 | + |
| 203 | +</section> |
| 204 | + |
| 205 | +<!-- /.references --> |
| 206 | + |
| 207 | +<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. --> |
| 208 | + |
| 209 | +<section class="related"> |
| 210 | + |
| 211 | +</section> |
| 212 | + |
| 213 | +<!-- /.related --> |
| 214 | + |
| 215 | +<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> |
| 216 | + |
| 217 | +<section class="links"> |
| 218 | + |
| 219 | +</section> |
| 220 | + |
| 221 | +<!-- /.links --> |
0 commit comments