Skip to content

Commit 859b69a

Browse files
committed
docs: add readme
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent eac69a7 commit 859b69a

File tree

1 file changed

+222
-0
lines changed
  • lib/node_modules/@stdlib/lapack/base/dladiv

1 file changed

+222
-0
lines changed
Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
<!--
2+
3+
@license Apache-2.0
4+
5+
Copyright (c) 2025 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+
# dladiv
22+
23+
> Divide two double-precision complex floating-point numbers in real arithmetic.
24+
25+
<section class="usage">
26+
27+
## Usage
28+
29+
```javascript
30+
var dladiv = require( '@stdlib/lapack/base/dladiv' );
31+
```
32+
33+
#### dladiv( a, b, c, d, P, Q )
34+
35+
Divides two double-precision complex floating-point numbers in real arithmetic.
36+
37+
```javascript
38+
var Float64Array = require( '@stdlib/array/float64' );
39+
40+
var P = new Float64Array( 1 );
41+
var Q = new Float64Array( 1 );
42+
43+
dladiv( -13.0, -1.0, -2.0, 1.0, P, Q );
44+
// P => <Float64Array>[ 5.0 ]
45+
// Q => <Float64Array>[ 3.0 ]
46+
```
47+
48+
The function has the following parameters:
49+
50+
- **a**: real component of numerator.
51+
- **b**: imaginary component of numerator.
52+
- **c**: real component of denominator.
53+
- **d**: imaginary component of denominator.
54+
- **P**: [`Float64Array`][mdn-float64array] containing a single element which is overwritten by the real part of the quotient.
55+
- **Q**: [`Float64Array`][mdn-float64array] containing a single element which is overwritten by the imaginary part of the quotient.
56+
57+
#### dladiv.ndarray( a, b, c, d, P, offsetP, Q, offsetQ )
58+
59+
Divides two double-precision complex floating-point numbers in real arithmetic using alternative indexing semantics.
60+
61+
```javascript
62+
var Float64Array = require( '@stdlib/array/float64' );
63+
64+
var P = new Float64Array( 1 );
65+
var Q = new Float64Array( 1 );
66+
67+
dladiv.ndarray( -13.0, -1.0, -2.0, 1.0, P, 0, Q, 0 );
68+
// P => <Float64Array>[ 5.0 ]
69+
// Q => <Float64Array>[ 3.0 ]
70+
```
71+
72+
The function has the following additional parameters:
73+
74+
- **a**: real component of numerator.
75+
- **b**: imaginary component of numerator.
76+
- **c**: real component of denominator.
77+
- **d**: imaginary component of denominator.
78+
- **P**: [`Float64Array`][mdn-float64array] containing a single element which is overwritten by the real part of the quotient.
79+
- **offsetP**: index of the element in `P`.
80+
- **Q**: [`Float64Array`][mdn-float64array] containing a single element which is overwritten by the imaginary part of the quotient.
81+
- **offsetQ**: index of the element in `Q`.
82+
83+
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameters support indexing semantics based on starting indices. For example,
84+
85+
```javascript
86+
var Float64Array = require( '@stdlib/array/float64' );
87+
88+
var P = new Float64Array( [ 0.0, 0.0, 0.0 ] );
89+
var Q = new Float64Array( [ 0.0, 0.0, 0.0 ] );
90+
91+
dladiv.ndarray( 2.0, 1.0, 3.0, 4.0, P, 1, Q, 2 );
92+
// P => <Float64Array>[ 0.0, 0.4, 0.0 ]
93+
// Q => <Float64Array>[ 0.0, 0.0, -0.2 ]
94+
```
95+
96+
</section>
97+
98+
<!-- /.usage -->
99+
100+
<section class="notes">
101+
102+
## Notes
103+
104+
- `dladiv()` corresponds to the [LAPACK][LAPACK] function [`dladiv`][lapack-dladiv].
105+
106+
</section>
107+
108+
<!-- /.notes -->
109+
110+
<section class="examples">
111+
112+
## Examples
113+
114+
<!-- eslint no-undef: "error" -->
115+
116+
```javascript
117+
var Float64Array = require( '@stdlib/array/float64' );
118+
var dladiv = require( '@stdlib/lapack/base/dladiv' );
119+
120+
var P = new Float64Array( 1 );
121+
var Q = new Float64Array( 1 );
122+
dladiv( 2.0, 1.0, 3.0, 4.0, P, Q );
123+
console.log( '(2+i)/(3+4i) =', P[ 0 ], '+', Q[ 0 ], 'i' );
124+
```
125+
126+
</section>
127+
128+
<!-- /.examples -->
129+
130+
<!-- C interface documentation. -->
131+
132+
* * *
133+
134+
<section class="c">
135+
136+
## C APIs
137+
138+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
139+
140+
<section class="intro">
141+
142+
</section>
143+
144+
<!-- /.intro -->
145+
146+
<!-- C usage documentation. -->
147+
148+
<section class="usage">
149+
150+
### Usage
151+
152+
```c
153+
TODO
154+
```
155+
156+
#### TODO
157+
158+
TODO.
159+
160+
```c
161+
TODO
162+
```
163+
164+
TODO
165+
166+
```c
167+
TODO
168+
```
169+
170+
</section>
171+
172+
<!-- /.usage -->
173+
174+
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
175+
176+
<section class="notes">
177+
178+
</section>
179+
180+
<!-- /.notes -->
181+
182+
<!-- C API usage examples. -->
183+
184+
<section class="examples">
185+
186+
### Examples
187+
188+
```c
189+
TODO
190+
```
191+
192+
</section>
193+
194+
<!-- /.examples -->
195+
196+
</section>
197+
198+
<!-- /.c -->
199+
200+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
201+
202+
<section class="related">
203+
204+
</section>
205+
206+
<!-- /.related -->
207+
208+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
209+
210+
<section class="links">
211+
212+
[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
213+
214+
[lapack-dladiv]: https://www.netlib.org/lapack/explore-html/d5/db7/group__ladiv_gacbc97eb1922a833ffe257e1731bb0aaa.html
215+
216+
[mdn-float64array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array
217+
218+
[lapack]: https://www.netlib.org/lapack/explore-html/
219+
220+
</section>
221+
222+
<!-- /.links -->

0 commit comments

Comments
 (0)