diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/README.md b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/README.md new file mode 100644 index 000000000000..c2de5f7a15f6 --- /dev/null +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/README.md @@ -0,0 +1,168 @@ + + +# rffti + +> Initialize a workspace array for performing a real-valued Fourier transform. + + + +
+ +
+ + + + + +
+ +## Usage + +```javascript +var rffti = require( '@stdlib/fft/base/fftpack/rffti' ); +``` + +#### rffti( N, workspace, strideW, offsetW ) + +Initializes a workspace array for performing a real-valued Fourier transform. + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); + +var N = 8; +var workspace = new Float64Array( ( 2*N ) + 34 ); + +var out = rffti( N, workspace, 1, 0 ); +// returns + +var bool = ( out === workspace ); +// returns true + +var twiddleFactors = workspace.slice( N, 2*N ); +// returns [ 0, ~0.707, ~0.707, 0, 0, 0, 0, 0 ] + +var factors = workspace.slice( 2*N, ( 2*N ) + 4 ); +// returns [ 8, 2, 2, 4 ] +``` + +The function accepts the following arguments: + +- **N**: length of the sequence to transform. +- **workspace**: workspace array. +- **strideW**: stride length for `workspace`. +- **offsetW**: starting index for `workspace`. + +
+ + + + + +
+ +## Notes + +- The workspace array is divided into three sections: + + ```text + size = N N 2+ceil(log2(N)/2) + ↓ ↓ ↓ + | scratch / workspace | twiddle factors | radix factor table | + ↑ ↑ ↑ + i = 0 ... N ... 2N ... + ``` + + - **scratch/workspace**: used as a scratch space when performing transforms. This section is not updated during initialization. + - **twiddle factors**: a table of reusable complex-exponential constants stored as cosine/sine pairs. + - **radix factor table**: a table containing the sequence length `N`, the number of factors into which `N` was decomposed, and the individual integer radix factors. + +- In general, a workspace array should have `2N + 34` indexed elements (as `log2(N)/2 ≤ 32` for all `2^64`). During initialization, only the sections for storing twiddle factors and the factorization of `N` are updated. + +- The radix factor table is comprised as follows: + + ```text + | sequence_length | number_of_factors | integer_factors | + ``` + +- If `N` equals `1`, the function returns early without modifying the workspace, as a single data point is its own Fourier transform. + +
+ + + +
+ +## Examples + + + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); +var rffti = require( '@stdlib/fft/base/fftpack/rffti' ); + +var N = 8; +var workspace = new Float64Array( ( 2*N ) + 34 ); + +rffti( N, workspace, 1, 0 ); + +console.log( 'Sequence length: %d', N ); +console.log( 'Twiddle factors:' ); +var i; +for ( i = N; i < 2*N; i++ ) { + console.log( ' workspace[%d] = %d', i, workspace[ i ] ); +} + +console.log( 'Factorization:' ); +var nf = workspace[ ( 2*N ) + 1 ]; + +console.log( ' number of factors: %d', nf ); +for ( i = 0; i < nf; i++ ) { + console.log( ' factor[%d]: %d', i, workspace[ ( 2*N ) + 2 + i ] ); +} +``` + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/benchmark/benchmark.js b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/benchmark/benchmark.js new file mode 100644 index 000000000000..07feddfa216b --- /dev/null +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/benchmark/benchmark.js @@ -0,0 +1,101 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var format = require( '@stdlib/string/format' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var Float64Array = require( '@stdlib/array/float64' ); +var pkg = require( './../package.json' ).name; +var rffti = require( './../lib' ); + + +// FUNCTIONS // + +/** +* Creates a benchmark function. +* +* @private +* @param {PositiveInteger} N - sequence length +* @returns {Function} benchmark function +*/ +function createBenchmark( N ) { + var workspace = new Float64Array( ( 2*N ) + 34 ); + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + rffti( N, workspace, 1, 0 ); + if ( isnan( workspace[ N+1 ] ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( workspace[ N+1 ] ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var lengths; + var N; + var f; + var i; + + lengths = [ + 8, + 16, + 32, + 64, + 128, + 256, + 512, + 1024 + ]; + + for ( i = 0; i < lengths.length; i++ ) { + N = lengths[ i ]; + f = createBenchmark( N ); + bench( format( '%s:N=%d', pkg, N ), f ); + } +} + +main(); diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/docs/repl.txt b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/docs/repl.txt new file mode 100644 index 000000000000..92ba0e409b67 --- /dev/null +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/docs/repl.txt @@ -0,0 +1,56 @@ + +{{alias}}( N, workspace, strideW, offsetW ) + Initializes a workspace array for performing a real-valued Fourier + transform. + + The workspace array is divided into three sections: + + 1. scratch/workspace: the section ranges from indices 0 to N-1 and is used + while performing transforms. This section is not updated during + initialization. + + 2. twiddle factors: the section ranges from indices N to 2N-1 and stores a + table of reusable complex exponential constants as cosine/sine pairs. + + 3. radix factor table: the section starts at index 2N and stores the + sequence length N, the number of factors into which N was decomposed, + and the individual integer radix factors. + + Any remaining array space remains as unused storage. + + Parameters + ---------- + N: integer + Length of the sequence. + + workspace: ArrayLikeObject + Workspace array. + + strideW: integer + Stride length for `workspace`. + + offsetW: integer + Starting index for `workspace`. + + Returns + ------- + out: ArrayLikeObject + Workspace array. + + Examples + -------- + > var {{alias:@stdlib/array/float64}} = require( '@stdlib/array/float64' ); + > var N = 8; + > var workspace = new {{alias:@stdlib/array/float64}}( ( 2*N ) + 34 ); + > var out = {{alias}}( N, workspace, 1, 0 ) + + > var bool = ( out === workspace ) + true + > var twiddleFactors = workspace.slice( N, 2*N ) + [ 0, ~0.707, ~0.707, 0, 0, 0, 0, 0 ] + > var factors = workspace.slice( 2*N, ( 2*N ) + 4 ) + [ 8, 2, 2, 4 ] + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/docs/types/index.d.ts b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/docs/types/index.d.ts new file mode 100644 index 000000000000..648888833e33 --- /dev/null +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/docs/types/index.d.ts @@ -0,0 +1,57 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/// + +import { Collection } from '@stdlib/types/array'; + +/** +* Initializes a workspace array for performing a real-valued Fourier transform. +* +* @param N - length of the sequence +* @param workspace - workspace array +* @param strideW - stride length for `workspace` +* @param offsetW - starting index for `workspace` +* @returns workspace array +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var N = 8; +* var workspace = new Float64Array( ( 2*N ) + 34 ); +* +* var out = rffti( N, workspace, 1, 0 ); +* // returns +* +* var bool = ( out === workspace ); +* // returns true +* +* var twiddleFactors = workspace.slice( N, 2*N ); +* // returns [ 0, ~0.707, ~0.707, 0, 0, 0, 0, 0 ] +* +* var factors = workspace.slice( 2*N, ( 2*N ) + 4 ); +* // returns [ 8, 2, 2, 4 ] +*/ +declare function rffti>( N: number, workspace: T, strideW: number, offsetW: number ): T; + + +// EXPORTS // + +export = rffti; diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/docs/types/test.ts b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/docs/types/test.ts new file mode 100644 index 000000000000..6d1f815d9301 --- /dev/null +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/docs/types/test.ts @@ -0,0 +1,94 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import rffti = require( './index' ); + + +// TESTS // + +// The function returns a collection... +{ + const workspace = new Float64Array( ( 2*8 ) + 34 ); + + rffti( 8, workspace, 1, 0 ); // $ExpectType Float64Array +} + +// The compiler throws an error if the function is provided a first argument which is not a number... +{ + const workspace = new Float64Array( ( 2*8 ) + 34 ); + + rffti( '8', workspace, 1, 0 ); // $ExpectError + rffti( true, workspace, 1, 0 ); // $ExpectError + rffti( false, workspace, 1, 0 ); // $ExpectError + rffti( null, workspace, 1, 0 ); // $ExpectError + rffti( void 0, workspace, 1, 0 ); // $ExpectError + rffti( [], workspace, 1, 0 ); // $ExpectError + rffti( {}, workspace, 1, 0 ); // $ExpectError + rffti( ( x: number ): number => x, workspace, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a second argument which is not an array of numbers... +{ + rffti( 8, '50', 1, 0 ); // $ExpectError + rffti( 8, 50, 1, 0 ); // $ExpectError + rffti( 8, true, 1, 0 ); // $ExpectError + rffti( 8, false, 1, 0 ); // $ExpectError + rffti( 8, null, 1, 0 ); // $ExpectError + rffti( 8, void 0, 1, 0 ); // $ExpectError + rffti( 8, {}, 1, 0 ); // $ExpectError + rffti( 8, ( x: number ): number => x, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a third argument which is not a number... +{ + const workspace = new Float64Array( ( 2*8 ) + 34 ); + + rffti( 8, workspace, '1', 0 ); // $ExpectError + rffti( 8, workspace, true, 0 ); // $ExpectError + rffti( 8, workspace, false, 0 ); // $ExpectError + rffti( 8, workspace, null, 0 ); // $ExpectError + rffti( 8, workspace, void 0, 0 ); // $ExpectError + rffti( 8, workspace, [], 0 ); // $ExpectError + rffti( 8, workspace, {}, 0 ); // $ExpectError + rffti( 8, workspace, ( x: number ): number => x, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fourth argument which is not a number... +{ + const workspace = new Float64Array( ( 2*8 ) + 34 ); + + rffti( 8, workspace, 1, '0' ); // $ExpectError + rffti( 8, workspace, 1, true ); // $ExpectError + rffti( 8, workspace, 1, false ); // $ExpectError + rffti( 8, workspace, 1, null ); // $ExpectError + rffti( 8, workspace, 1, void 0 ); // $ExpectError + rffti( 8, workspace, 1, [] ); // $ExpectError + rffti( 8, workspace, 1, {} ); // $ExpectError + rffti( 8, workspace, 1, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + const workspace = new Float64Array( ( 2*8 ) + 34 ); + + rffti(); // $ExpectError + rffti( 8 ); // $ExpectError + rffti( 8, workspace ); // $ExpectError + rffti( 8, workspace, 1 ); // $ExpectError + rffti( 8, workspace, 1, 0, 123 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/examples/index.js b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/examples/index.js new file mode 100644 index 000000000000..92a7803afedf --- /dev/null +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/examples/index.js @@ -0,0 +1,42 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var Float64Array = require( '@stdlib/array/float64' ); +var rffti = require( './../lib' ); + +var N = 8; +var workspace = new Float64Array( ( 2*N ) + 34 ); + +rffti( N, workspace, 1, 0 ); + +console.log( 'Sequence length: %d', N ); +console.log( 'Twiddle factors:' ); +var i; +for ( i = N; i < 2*N; i++ ) { + console.log( ' workspace[%d] = %d', i, workspace[ i ] ); +} + +console.log( 'Factorization:' ); +var nf = workspace[ ( 2*N ) + 1 ]; + +console.log( ' number of factors: %d', nf ); +for ( i = 0; i < nf; i++ ) { + console.log( ' factor[%d]: %d', i, workspace[ ( 2*N ) + 2 + i ] ); +} diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/lib/index.js b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/lib/index.js new file mode 100644 index 000000000000..51c16c7bcb35 --- /dev/null +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/lib/index.js @@ -0,0 +1,53 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Initialize a workspace array for performing a real-valued Fourier transform. +* +* @module @stdlib/fft/base/fftpack/rffti +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* var rffti = require( '@stdlib/fft/base/fftpack/rffti' ); +* +* var N = 8; +* var workspace = new Float64Array( ( 2*N ) + 34 ); +* +* var out = rffti( N, workspace, 1, 0 ); +* // returns +* +* var bool = ( out === workspace ); +* // returns true +* +* var twiddleFactors = workspace.slice( N, 2*N ); +* // returns [ 0, ~0.707, ~0.707, 0, 0, 0, 0, 0 ] +* +* var factors = workspace.slice( 2*N, ( 2*N ) + 4 ); +* // returns [ 8, 2, 2, 4 ] +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/lib/main.js b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/lib/main.js new file mode 100644 index 000000000000..08aafc0ffdb1 --- /dev/null +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/lib/main.js @@ -0,0 +1,176 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* +* ## Notice +* +* The original C code and copyright notice are from the [PFFFT library]{@link https://github.com/marton78/pffft/blob/0b4ee12c4ba45a4a8e567550c16d96d1679f50ce/src/fftpack.c}. The implementation follows the original, but has been modified for JavaScript. +* +* ```text +* Copyright (c) 2004 the University Corporation for Atmospheric +* Research ("UCAR"). All rights reserved. Developed by NCAR's +* Computational and Information Systems Laboratory, UCAR, +* www.cisl.ucar.edu. +* +* Redistribution and use of the Software in source and binary forms, +* with or without modification, is permitted provided that the +* following conditions are met: +* +* - Neither the names of NCAR's Computational and Information Systems +* Laboratory, the University Corporation for Atmospheric Research, +* nor the names of its sponsors or contributors may be used to +* endorse or promote products derived from this Software without +* specific prior written permission. +* +* - Redistributions of source code must retain the above copyright +* notices, this list of conditions, and the disclaimer below. +* +* - Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions, and the disclaimer below in the +* documentation and/or other materials provided with the +* distribution. +* +* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +* EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT +* HOLDERS BE LIABLE FOR ANY CLAIM, INDIRECT, INCIDENTAL, SPECIAL, +* EXEMPLARY, OR CONSEQUENTIAL DAMAGES OR OTHER LIABILITY, WHETHER IN AN +* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +* SOFTWARE. +* ``` +*/ + +'use strict'; + +// MODULES // + +var rffti1 = require( './rffti1.js' ); + + +// MAIN // + +/** +* Initializes a workspace array for performing a real-valued Fourier transform. +* +* ## Notes +* +* The workspace array is divided into three sections: +* +* ```text +* size = N N 2+ceil(log2(N)/2) +* ↓ ↓ ↓ +* | scratch / workspace | twiddle factors | radix factor table | +* ↑ ↑ ↑ +* i = 0 ... N ... 2N ... +* ``` +* +* where +* +* - **scratch/workspace**: used as a scratch space when performing transforms. This section is not updated during initialization. +* - **twiddle factors**: a table of reusable complex-exponential constants stored as cosine/sine pairs. +* - **radix factor table**: a table containing the radix factorization of `N`. +* +* In general, a workspace array should have `2N + 34` indexed elements (as `log2(N)/2 ≤ 32` for all `2^64`). During initialization, only the sections for storing twiddle factors and the factorization of `N` are updated. +* +* > Note: FFTPACK only requires `2N+15`, but we increase that number here to accommodate larger workspace arrays, where `N` may exceed `2^30` indexed elements. +* +* The first two sections each contain `N` elements, while the last section contains the sequence length, the number of integer factors, and, at most, `ceil(log2(N)/2)` integer radix factors. +* +* The factorization section is comprised as follows: +* +* ```text +* | sequence_length | number_of_factors | integer_factors | +* ``` +* +* The sequence length and number of factors (`nf`) comprise a single element each. Only the first `nf` elements in the integer factors section are written to, with the rest being unused. +* +* As for twiddle factors, these are small, reusable complex-exponential constants that appear inside each "butterfly" stage of a Cooley–Tukey–style FFT. Every arithmetic step in an FFT multiplies one intermediate value by some +* +* ```tex +* W_N^k +* ``` +* +* where `W_N^k` is an N-th root of unity. Formally, in a forward FFT, +* +* ```tex +* W_N^k = e^{-2\pi ik/N} +* ``` +* +* In a backward FFT, +* +* ```tex +* W_N^k = e^{+2\pi ik/N} +* ``` +* +* As may be observed, `W_N^k` for forward and backward FFTs is the same, except the sign of the exponent is flipped. As a consequence, both real and backward FFT callers can reuse the same set of twiddle factors, with those performing a forward transform (e.g., `rfftf`) multiplying with `(cos,-sin)` and those performing a backward transform (e.g., `rfftb`) multiplying with `(cos,+sin)`. +* +* Because these constants only depend on the transform length `N` (and **not** on the input data), we can pre-compute and store them once, then "twiddle" them (i.e., reuse them with different indices) as we proceed through the factorization. +* +* > As a quick aside regarding the name "twiddle", early FFT papers (notably Gentleman & Sande, 1966) described how you "twiddle" one branch of each butterfly by a complex rotation before adding/subtracting. The coefficients themselves inherited the nickname "twiddle factors," and the term stuck. +* +* By reusing the workspace array when computing multiple transforms of the same length `N`, every subsequent `*f` (forward) or `*b` (backward) call can simply look up the pre-stored twiddle factors instead of recomputing sine and cosine on-the-fly. +* +* In short, twiddle factors are cached roots of unity that allow each stage of the algorithm to rotate data quickly and predictably. +* +* @param {NonNegativeInteger} N - length of the sequence to transform +* @param {Collection} workspace - workspace array +* @param {integer} strideW - stride length for `workspace` +* @param {NonNegativeInteger} offsetW - starting index for `workspace` +* @returns {Collection} workspace array +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var N = 8; +* var workspace = new Float64Array( ( 2*N ) + 34 ); +* +* var out = rffti( N, workspace, 1, 0 ); +* // returns +* +* var bool = ( out === workspace ); +* // returns true +* +* var twiddleFactors = workspace.slice( N, 2*N ); +* // returns [ 0, ~0.707, ~0.707, 0, 0, 0, 0, 0 ] +* +* var factors = workspace.slice( 2*N, ( 2*N ) + 4 ); +* // returns [ 8, 2, 2, 4 ] +*/ +function rffti( N, workspace, strideW, offsetW ) { + var offsetT; + var offsetF; + + // When a sub-sequence is a single data point, the FFT is the identity, so no initialization necessary... + if ( N === 1 ) { + return; + } + // Resolve the starting indices for storing twiddle factors and factorization results: + offsetT = offsetW + ( N*strideW ); // index offset for twiddle factors + offsetF = offsetT + ( N*strideW ); // index offset for factorization results + + // Initialize a provided workspace array: + rffti1( N, workspace, strideW, offsetT, workspace, strideW, offsetF ); + + return workspace; +} + + +// EXPORTS // + +module.exports = rffti; diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/lib/rffti1.js b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/lib/rffti1.js new file mode 100644 index 000000000000..60c1bfee8e0d --- /dev/null +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/lib/rffti1.js @@ -0,0 +1,183 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* +* ## Notice +* +* The original C code and copyright notice are from the [PFFFT library]{@link https://github.com/marton78/pffft/blob/0b4ee12c4ba45a4a8e567550c16d96d1679f50ce/src/fftpack.c}. The implementation follows the original, but has been modified for JavaScript. +* +* ```text +* Copyright (c) 2004 the University Corporation for Atmospheric +* Research ("UCAR"). All rights reserved. Developed by NCAR's +* Computational and Information Systems Laboratory, UCAR, +* www.cisl.ucar.edu. +* +* Redistribution and use of the Software in source and binary forms, +* with or without modification, is permitted provided that the +* following conditions are met: +* +* - Neither the names of NCAR's Computational and Information Systems +* Laboratory, the University Corporation for Atmospheric Research, +* nor the names of its sponsors or contributors may be used to +* endorse or promote products derived from this Software without +* specific prior written permission. +* +* - Redistributions of source code must retain the above copyright +* notices, this list of conditions, and the disclaimer below. +* +* - Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions, and the disclaimer below in the +* documentation and/or other materials provided with the +* distribution. +* +* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +* EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT +* HOLDERS BE LIABLE FOR ANY CLAIM, INDIRECT, INCIDENTAL, SPECIAL, +* EXEMPLARY, OR CONSEQUENTIAL DAMAGES OR OTHER LIABILITY, WHETHER IN AN +* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +* SOFTWARE. +* ``` +*/ + +'use strict'; + +// MODULES // + +var sincos = require( '@stdlib/math/base/special/sincos' ).assign; +var TWO_PI = require( '@stdlib/constants/float64/two-pi' ); +var floor = require( '@stdlib/math/base/special/floor' ); +var decompose = require( '@stdlib/fft/base/fftpack/decompose' ); + + +// VARIABLES // + +// Define a list of initial trial factors for FFT factorization: +var TRIAL_FACTORS = [ 4, 2, 3, 5 ]; + + +// MAIN // + +/** +* Initializes the working arrays for applying a Fourier transform to a real-valued sequence. +* +* @private +* @param {NonNegativeInteger} N - length of the sequence +* @param {Collection} twiddles - array of twiddle factors +* @param {integer} strideT - stride length for `twiddles` +* @param {NonNegativeInteger} offsetT - starting index for `twiddles` +* @param {Collection} factors - array containing a radix factorization +* @param {integer} strideF - stride length for `factors` +* @param {NonNegativeInteger} offsetF - starting index for `factors` +* @returns {void} +*/ +function rffti1( N, twiddles, strideT, offsetT, factors, strideF, offsetF ) { + var factor; + var argld; + var argh; + var fidx; + var nf; + var fi; + var l2; + var l1; + var ld; + var st; + var it; + var im; + var M; + var m; + var k; + var j; + + // Decompose the sequence length into its radix factors: + nf = decompose( N, 4, TRIAL_FACTORS, 1, 0, factors, strideF, offsetF ); + + // If the number of radix factors is `1`, the only twiddle factor we need is `W_N^0 = 1`, which the main transform kernels already hard-code, so nothing to pre-compute... + if ( nf-1 === 0 ) { + return; + } + // Compute the master angular step (i.e., the basic angle that generates all twiddles): + argh = TWO_PI / N; + + // Define the location of the first sine term we want to compute: + im = 1; + + // Initialize a running product of factors already processed: + l1 = 1; + + // Compute the index of the first radix factor: + fidx = offsetF + ( 2*strideF ); + + // Compute the stride length for each cosine/sine pair: + st = 2 * strideT; + + // Generate twiddle factors... + for ( k = 0; k < nf-1; k++ ) { + // Resolve the next radix factor: + factor = factors[ fidx ]; + + // Compute the length of the transform after including the current radix: + l2 = factor * l1; + + // Compute the number of the "butterfly wings" (at this stage, the data is viewed as a `factor`-point transform of sub-vectors of length `l1`; `M` describes how many such vectors fit in the full array of length `N`): + M = floor( N / l2 ); + + // Initialize a running offset used to step the angle: + ld = 0; + + // Iterate over each butterfly column within the current radix... + for ( j = 1; j < factor; j++ ) { + // Advance to the next column: + ld += l1; + + // Compute the angle step for this column: + argld = ld * argh; // 2π ⋅ j ⋅ li / N, which is the j-th column's base angle + + // Initialize a counter which counts from `1` to `(M/2)-1` (i.e., all non-trivial harmonics): + fi = 1.0; + + // Compute the index of the sine term: + it = offsetT + ( (im+1)*strideT ); + + // Iterate over each non-trivial harmonic in the column (note: we skip the `m=0` and `m=1` (i.e., the first cosine/sine pair, the first harmonic `W_N^0 = cos(0) + j sin(0) = 1 + j⋅0` is trivial and hard-coded by transform kernels)... + for ( m = 2; m < M; m += 2 ) { + // Compute `(cos(fi*argld), sin(fi*argld))`: + sincos( fi*argld, twiddles, -strideT, it ); // note: `sincos` returns the sine and cosine, in that order, so we need to use a negative stride when assigning the values to `twiddles` to ensure that cosine comes before sine in the twiddles table + + // Update for the next harmonic: + fi += 1.0; + + // Resolve the index of the next sine term: + it += st; + } + // Advance `im` by the size of the current block, skipping the cosine/sine pairs we have just written: + im += M; + } + // Update the running product of factors already processed: + l1 = l2; + + // Resolve the index of the next radix factor: + fidx += strideF; + } +} + + +// EXPORTS // + +module.exports = rffti1; diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/package.json b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/package.json new file mode 100644 index 000000000000..ea78bb766695 --- /dev/null +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/package.json @@ -0,0 +1,64 @@ +{ + "name": "@stdlib/fft/base/fftpack/rffti", + "version": "0.0.0", + "description": "Initialize a workspace array for performing a real-valued Fourier transform.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "fft", + "fftpack", + "rffti", + "fourier", + "transform", + "twiddle", + "workspace", + "initialization", + "real" + ], + "__stdlib__": {} +} diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/fixtures/c/fftpack/Makefile b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/fixtures/c/fftpack/Makefile new file mode 100644 index 000000000000..7ce16281940d --- /dev/null +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/fixtures/c/fftpack/Makefile @@ -0,0 +1,137 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +endif + +# Specify the path to FFTPACK: +FFTPACK ?= + +# Specify a list of FFTPACK source files: +FFTPACK_SRC ?= + +# Determine the OS: +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate [position independent code][1]: +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of C targets: +c_targets := runner.out + + +# RULES # + +#/ +# Compiles C source files. +# +# @param {string} [C_COMPILER] - C compiler +# @param {string} [CFLAGS] - C compiler flags +# @param {(string|void)} [fPIC] - flag indicating whether to generate position independent code +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler +# @param {string} CFLAGS - C compiler flags +# @param {(string|void)} fPIC - flag indicating whether to generate position independent code +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) -DFFTPACK_DOUBLE_PRECISION $(fPIC) -o $@ $(FFTPACK_SRC) $< -lm + +#/ +# Generates test fixtures. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean + +#/ +# Removes generated test fixtures. +# +# @example +# make clean-fixtures +#/ +clean-fixtures: + $(QUIET) -rm -f *.json + +.PHONY: clean-fixtures diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/fixtures/c/fftpack/large.json b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/fixtures/c/fftpack/large.json new file mode 100644 index 000000000000..01ea1093cdc9 --- /dev/null +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/fixtures/c/fftpack/large.json @@ -0,0 +1 @@ +{"lengths":[259,615,618,201,648,971,569,524,342,823],"offsets":[0,258,872,1489,1689,2336,3306,3874,4397,4738],"twiddles":[0.99970575512072213,0.024257023282068805,0.99882319364298633,0.048499771554363059,0.99735283494518367,0.072713978207805285,0.99529554431834921,0.096885393429768346,0.99265253245694707,0.12099979258994435,0.9894253547463896,0.14504298461139381,0.98561591034770846,0.16900082032184907,0.98122644107991797,0.1928592007803574,0.97625953010072786,0.21660408557436325,0.97071810038638084,0.24022150108234722,0.96460541301151181,0.26369754869715928,0.95792506523003795,0.28701841300520692,0.95068098835821235,0.31017036991668395,0.94287744546108421,0.33313979474205757,0.93451902884372884,0.35591317021005814,0.92561065734872361,0.37847709442245486,0.91615757346145843,0.40081828874093606,0.90616534022498785,0.42292360560145142,0,0.99882319364298633,0.048499771554363059,0.99529554431834921,0.096885393429768346,0.9894253547463896,0.14504298461139381,0.98122644107991797,0.1928592007803574,0.97071810038638084,0.24022150108234722,0.95792506523003795,0.28701841300520692,0.94287744546108421,0.33313979474205757,0.92561065734872361,0.37847709442245486,0.90616534022498785,0.42292360560145142,0.88458726083548767,0.46637471840524203,0.86092720562221858,0.50872816574229318,0.83524086119194496,0.54988426400046964,0.80758868325149491,0.58974614766365085,0.77803575431843952,0.62821999729564226,0.74665163054205241,0.66521526035479261,0.71351017799507233,0.70064486431960682,0.6786893988215752,0.73442542162374047,0.64227124765013588,0.76647742591803558,0,0.99735283494518367,0.072713978207805285,0.9894253547463896,0.14504298461139381,0.97625953010072786,0.21660408557436325,0.95792506523003795,0.28701841300520692,0.93451902884372884,0.35591317021005814,0.90616534022498785,0.42292360560145142,0.87301411316118815,0.48769494381363454,0.83524086119194496,0.54988426400046964,0.79304556838249773,0.60916231537159382,0.74665163054205241,0.66521526035479261,0.69630467249262196,0.71774633615570793,0.64227124765013588,0.76647742591803558,0.58483742680266448,0.81115053116597169,0.52430728355723166,0.85152913773331129,0.46100128447376204,0.88739946794752,0.3952545924093237,0.91857161243930208,0.3274152920553221,0.94488053558549301,0.25784254706223786,0.96618694926212789,0,0.99529554431834921,0.096885393429768346,0.98122644107991797,0.1928592007803574,0.95792506523003795,0.28701841300520692,0.92561065734872361,0.37847709442245486,0.88458726083548767,0.46637471840524203,0.83524086119194496,0.54988426400046964,0.77803575431843952,0.62821999729564226,0.71351017799507233,0.70064486431960682,0.64227124765013588,0.76647742591803558,0.56498924406486239,0.82509826935402997,0.4823913067609637,0.87595583630765872,0.3952545924093237,0.91857161243930208,0.30439896263176669,0.95254462968865894,0.21067926999572642,0.97755523894768614,0.11497731478221103,0.99336811761072363,0.01819354820511962,0.99983448370403183,-0.078761399854417713,0.99689349576219655,-0.17497528888387551,0.98457282528008272,0,0.99265253245694707,0.12099979258994435,0.97071810038638084,0.24022150108234722,0.93451902884372884,0.35591317021005814,0.88458726083548767,0.46637471840524203,0.8216565404512729,0.56998292038766007,0.74665163054205241,0.66521526035479261,0.66067472339008149,0.75067230525272433,0.56498924406486239,0.82509826935402997,0.46100128447376204,0.88739946794752,0.35023894093270863,0.93666038896407622,0.23432985889002245,0.97215714636707895,0.11497731478221103,0.99336811761072363,-0.0060648135026995014,0.99998160884947151,-0.12701781974687876,0.99190043525887683,-0.2461043073750987,0.96924334916027299,-0.36157430818203079,0.93234329496311918,-0.47173099800142432,0.88174251656851632,-0.57495563142708306,0.81818458913027947,0,0.9894253547463896,0.14504298461139381,0.95792506523003795,0.28701841300520692,0.90616534022498785,0.42292360560145142,0.83524086119194496,0.54988426400046964,0.74665163054205241,0.66521526035479261,0.64227124765013588,0.76647742591803558,0.52430728355723166,0.85152913773331129,0.3952545924093237,0.91857161243930208,0.25784254706223786,0.96618694926212789,0.11497731478221103,0.99336811761072363,-0.030319606129884956,0.99954025505935906,-0.17497528888387551,0.98457282528008272,-0.3159303684216761,0.94878237879344285,-0.45020374481767339,0.89292585814956849,-0.57495563142708306,0.81818458913027947,-0.68754761435867873,0.7261392965469432,-0.78559845305665621,0.61873667303222679,-0.86703444184891532,0.49824820787208046,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.99994781138976108,0.010216383745088785,0.99979125100634614,0.020431701132438921,0.99953033519109313,0.030644885915615212,0.99916509117766938,0.040854872070777773,0.99869555708922997,0.051060593907950605,0.9981217819344379,0.061260986182255367,0.9974438256023489,0.071454984205098687,0.99666175885616082,0.081641523955301387,0.99577566332582645,0.091819542190158046,0.99478563149953469,0.10198797655641534,0.99369176671405557,0.11214576570115752,0.99249418314395499,0.1222918493825874,0.99119300578967739,0.13242516858069164,0.98978837046449819,0.14254466560777812,0.98828042378034853,0.15264928421887447,0.98666932313251188,0.16273796972197613,0.98495523668319584,0.17280966908813197,0.98313834334397954,0.18286333106135669,0.98121883275713973,0.19289790626835787,0.97919690527585612,0.20291234732806676,0.97707277194329922,0.21290560896096089,0.97484665447060215,0.22287664809816748,0.97251878521371926,0.23282442399033618,0.97008940714917313,0.24274789831626933,0.9675587738486936,0.25264603529129942,0.96492714945275082,0.26251780177540102,0.96219480864298434,0.27236216738102731,0.95936203661353348,0.28217810458065901,0.95642912904126876,0.29196458881405485,0.95339639205493054,0.30172059859519229,0.95026414220317601,0.31144511561888744,0.94703270642153836,0.32113712486708279,0.94370242199830279,0.3307956147147923,0.94027363653930063,0.34041957703569159,0.93674670793162784,0.35000800730734355,0.93312200430628933,0.35955990471604782,0.92939990399977446,0.36907427226130246,0.92558079551456762,0.37855011685986856,0.92166507747859727,0.38798644944942523,0.91765315860362795,0.39738228509180523,0.91354545764260087,0.40673664307580015,0.90934240334592487,0.41604854701952437,0.90504443441672477,0.42531702497232671,0.90065199946505126,0.43454110951624053,0.8961655569610556,0.44371983786695968,0.89158557518713633,0.45285225197433127,0.88691253218906085,0.46193739862235467,0.88214691572606829,0.47097432952867496,0.87728922321995917,0.47996210144356261,0.87233996170317496,0.48889977624836689,0.86729964776587642,0.49778642105343401,0.86216880750202252,0.5066211082954799,0.85694797645445886,0.51540291583440645,0.85163769955901858,0.524130927049552,0.84623853108764413,0.53280423093536566,0.84075103459053335,0.54142192219649532,0.83517578283731808,0.54998310134228023,0.82951335775727975,0.55848687478063719,0.8237643503786094,0.5669323549113312,0.81792936076671774,0.57531866021862055,0.81200899796160186,0.58364491536326712,0.80600387991427569,0.59191025127390207,0.79991463342226965,0.6001138052377365,0.79374189406420737,0.60825472099060984,0.78748630613346571,0.61633214880636367,0.78114852257092537,0.62434524558553384,0.77472920489681862,0.63229317494335113,0.76822902314168173,0.64017510729704064,0.76164865577641871,0.64799021995241135,0.75498878964148508,0.65573769718972652,0.74825011987519663,0.66341673034884641,0.74143334984117326,0.67102651791363388,0.73453919105492382,0.6785662655956145,0.72756836310957995,0.68603518641688221,0.72052159360078705,0.69343250079224172,0.7133996180507598,0.70075743661057932,0.70620317983151026,0.70800922931545429,0.69893303008725727,0.71518712198490064,0.69158992765602345,0.72229036541043257,0.68417463899043041,0.72931821817524489,0.67668793807769811,0.73626994673160018,0.66913060635885824,0.74314482547739424,0.66150343264718992,0.74994213683189226,0.65380721304588529,0.7566611713106286,0.64604275086495444,0.76330122759945984,0.63821085653737841,0.76986161262776687,0.63031234753451815,0.77634164164079511,0.62234804828078927,0.78274063827112772,0.61431879006761103,0.78905793460928231,0.60622541096663807,0.7952928712734264,0.59806875574228535,0.80144479747820097,0.58984967576355352,0.80751307110264836,0.58156902891516571,0.81349705875723433,0.57322767950802367,0.81939613584996029,0.56482649818899355,0.82520968665155581,0.55636636185003019,0.8309371043597471,0.54784815353664951,0.83657779116259345,0.53927276235575861,0.84213115830088459,0.53064108338285343,0.84759662612959441,0.52195401756859361,0.85297362417838229,0.51321247164476247,0.85826159121113765,0.50441735802962662,0.86345997528455909,0,0.99979125100634614,0.020431701132438921,0.99916509117766938,0.040854872070777773,0.9981217819344379,0.061260986182255367,0.99666175885616082,0.081641523955301387,0.99478563149953469,0.10198797655641534,0.99249418314395499,0.1222918493825874,0.98978837046449819,0.14254466560777812,0.98666932313251188,0.16273796972197613,0.98313834334397954,0.18286333106135669,0.97919690527585612,0.20291234732806676,0.97484665447060215,0.22287664809816748,0.97008940714917313,0.24274789831626933,0.96492714945275082,0.26251780177540102,0.95936203661353348,0.28217810458065901,0.95339639205493054,0.30172059859519229,0.94703270642153836,0.32113712486708279,0.94027363653930063,0.34041957703569159,0.93312200430628933,0.35955990471604782,0.92558079551456762,0.37855011685986856,0.91765315860362795,0.39738228509180523,0.90934240334592487,0.41604854701952437,0.90065199946505126,0.43454110951624053,0.89158557518713633,0.45285225197433127,0.88214691572606829,0.47097432952867496,0.87233996170317496,0.48889977624836689,0.86216880750202252,0.5066211082954799,0.85163769955901858,0.524130927049552,0.84075103459053335,0.54142192219649532,0.82951335775727975,0.55848687478063719,0.81792936076671774,0.57531866021862055,0.80600387991427569,0.59191025127390207,0.79374189406420737,0.60825472099060984,0.78114852257092537,0.62434524558553384,0.76822902314168173,0.64017510729704064,0.75498878964148508,0.65573769718972652,0.74143334984117326,0.67102651791363388,0.72756836310957995,0.68603518641688221,0.7133996180507598,0.70075743661057932,0.69893303008725727,0.71518712198490064,0.68417463899043041,0.72931821817524489,0.66913060635885824,0.74314482547739424,0.65380721304588529,0.7566611713106286,0.63821085653737841,0.76986161262776687,0.62234804828078927,0.78274063827112772,0.60622541096663807,0.7952928712734264,0.58984967576355352,0.80751307110264836,0.57322767950802367,0.81939613584996029,0.55636636185003019,0.8309371043597471,0.53927276235575861,0.84213115830088459,0.52195401756859361,0.85297362417838229,0.50441735802962662,0.86345997528455909,0.48667010525891918,0.87358583358893394,0.4687196686987834,0.8833469715660448,0.45057354262035432,0.8927393139604326,0.43223930299474717,0.90175893948805141,0.41372460433010444,0.91040208247339727,0.39503717647585423,0.91866513442166986,0.37618482139551362,0.92654464552531168,0.35717540990938473,0.93403732610429602,0.33801687840850292,0.94114004797956152,0.31871722554120951,0.94784984577902098,0.29928450887373237,0.95416391817559776,0.27972684152616806,0.96007962905677469,0.26005238878527065,0.96559450862516527,0.24026936469546087,0.97070625442964964,0.22038602862947904,0.97541273232664261,0.20041068184011365,0.97971197737109483,0.18035166399444508,0.98360219463685361,0.16021734969205123,0.98708175996603997,0.14001614496862919,0.99014922064713251,0.11975648378649216,0.99280329602147055,0.099446824513407237,0.99504287801792723,0.079095646391243821,0.99686703161552659,0.05871144599590726,0.99827499523381313,0.038302733690035493,0.99926618105081,0.017878030069939755,0.9998401752484336,-0.0025541375917272082,0.99999673818526158,-0.022985238906090319,0.99973580449658295,-0.043406743929472351,0.99905748312168763,-0.063810126724628255,0.99796205725838438,-0.084186868920306773,0.99644998424476638,-0.10452846326765333,0.9945218953682734,-0.12482641719196928,0.99217859560213073,-0.14507225633834475,0.98942106326927448,-0.1652575281096848,0.9862504496339034,-0.18537380519565161,0.98266807842082904,-0.20541268909104968,0.97867544526282246,-0.22536581360218477,0.97427421707619122,-0.24522484833973299,0.96946623136484489,-0.26498150219666156,0.96425349545314099,-0.28462752680974923,0.9586381856478311,-0.30415472000326155,0.95262264632945692,-0.32355492921334233,0.94620938897357654,-0.34282005489169304,0.93940109110222803,-0.36194205388711781,0.93220059516606979,-0.3809129428035225,0.92461090735766271,-0.39972480133296751,0.91663519635639112,-0.41836977556237903,0.90827679200554534,-0.43684008125254309,0.89953918392211885,-0.45512800708800849,0.89042602003990068,-0.47322591789654772,0.88094110508646939,-0.49112625783682295,0.87108839899472801,0,0.99953033519109313,0.030644885915615212,0.9981217819344379,0.061260986182255367,0.99577566332582657,0.091819542190158032,0.99249418314395499,0.1222918493825874,0.98828042378034853,0.15264928421887447,0.98313834334397954,0.18286333106135666,0.97707277194329922,0.21290560896096086,0.97008940714917313,0.24274789831626933,0.96219480864298434,0.27236216738102731,0.95339639205493054,0.30172059859519229,0.94370242199830279,0.3307956147147923,0.93312200430628933,0.35955990471604776,0.92166507747859727,0.38798644944942517,0.90934240334592487,0.41604854701952432,0.8961655569610556,0.44371983786695962,0.88214691572606829,0.47097432952867496,0.86729964776587642,0.49778642105343401,0.85163769955901858,0.524130927049552,0.83517578283731808,0.54998310134228023,0.81792936076671774,0.57531866021862055,0,0.9981217819344379,0.061260986182255367,0.99249418314395499,0.1222918493825874,0.98313834334397954,0.18286333106135666,0.97008940714917313,0.24274789831626933,0.95339639205493054,0.30172059859519229,0.93312200430628933,0.35955990471604776,0.90934240334592487,0.41604854701952432,0.88214691572606829,0.47097432952867496,0.85163769955901858,0.524130927049552,0.81792936076671774,0.57531866021862055,0.78114852257092537,0.62434524558553384,0.74143334984117337,0.67102651791363377,0.69893303008725727,0.71518712198490053,0.6538072130458854,0.75666117131062849,0.60622541096663818,0.79529287127342629,0.55636636185003019,0.8309371043597471,0.50441735802962662,0.86345997528455909,0.45057354262035432,0.8927393139604326,0.39503717647585423,0.91866513442166986,0.33801687840850292,0.94114004797956152,0,0.99577566332582645,0.091819542190158046,0.98313834334397954,0.18286333106135669,0.96219480864298434,0.27236216738102731,0.93312200430628933,0.35955990471604782,0.8961655569610556,0.44371983786695968,0.85163769955901858,0.524130927049552,0.79991463342226965,0.6001138052377365,0.74143334984117326,0.67102651791363388,0.67668793807769811,0.73626994673160018,0.60622541096663807,0.7952928712734264,0.53064108338285343,0.84759662612959441,0.45057354262035432,0.8927393139604326,0.36669925317684809,0.93033953894239163,0.27972684152616806,0.96007962905677469,0.19039110916466842,0.98170831999685493,0.099446824513407237,0.99504287801792723,0.0076623461263018869,0.99997064379502698,-0.084186868920306773,0.99644998424476638,-0.17532481661118743,0.98451064426965618,-0.26498150219666156,0.96425349545314099,0,0.99249418314395499,0.1222918493825874,0.97008940714917313,0.24274789831626933,0.93312200430628933,0.35955990471604776,0.88214691572606829,0.47097432952867496,0.81792936076671774,0.57531866021862055,0.74143334984117337,0.67102651791363377,0.6538072130458854,0.75666117131062849,0.55636636185003019,0.8309371043597471,0.45057354262035432,0.8927393139604326,0.33801687840850292,0.94114004797956152,0.22038602862947904,0.97541273232664261,0.099446824513407445,0.99504287801792723,-0.022985238906090097,0.99973580449658295,-0.14507225633834453,0.98942106326927448,-0.26498150219666133,0.9642534954531411,-0.3809129428035225,0.92461090735766271,-0.49112625783682295,0.87108839899472801,-0.59396696538108751,0.80448943065523359,-0.68789125840396959,0.72581376165749512,-0.77148917982194276,0.63624244232656013,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.99994831684112406,0.010166791362219731,0.99979327270679419,0.020332531820652998,0.99953488362335152,0.030496170580141393,0.99917317629952429,0.040656657062771384,0.99870818812366646,0.050812941016468702,0.99813996715989384,0.060963972623559008,0.99746857214311491,0.071108702609283689,0.99669407247296038,0.081246082350259541,0.99581654820660925,0.091375063982871096,0.99483609005051377,0.10149460051158439,0.99375279935102301,0.11160364591717112,0.99256678808390786,0.1217011552648317,0.9912781788427858,0.13178608481220641,0.98988710482644893,0.1418573921172632,0.98839370982509611,0.15191403614605092,0.98679814820546974,0.1619549773803074,0.98510058489489893,0.17197917792491049,0.98330119536425242,0.18198560161516153,0.98140016560980015,0.19197321412388973,0.97939769213398775,0.20194098306836697,0.97729398192512484,0.21188787811702126,0.97508925243598943,0.22181287109593834,0.97278373156135023,0.23171493609514029,0.97037765761441064,0.24159304957462996,0.96787127930217487,0.25144619047019068,0.96526485569973985,0.26127334029892979,0.962558656223516,0.27107348326455549,0.95975296060337811,0.28084560636237593,0.95684805885375124,0.29058869948400995,0.9538442512436327,0.30030175552179805,0.9507418482655543,0.30998377047290337,0.94754117060348819,0.31963374354309215,0.94424254909969862,0.32925067725018159,0.94084632472054397,0.33883357752714643,0.93735284852123257,0.34838145382487162,0.93376248160953546,0.35789331921454187,0.9300755951084595,0.36736819048965696,0.92629257011788635,0.37680508826766201,0.92241379767517928,0.3862030370911827,0.91843967871476306,0.39556106552885462,0.9143706240266809,0.4048782062757369,0.91020705421413273,0.41415349625329845,0.90594939964999865,0.42338597670896833,0.90159810043235322,0.43257469331523801,0.89715360633897423,0.44171869626830707,0.89261637678085004,0.45081704038626075,0.88798688075469323,0.45986878520676988,0.88326559679446082,0.46887299508430325,0.87845301292189082,0.47782873928684144,0.87354962659605717,0.48673509209208354,0.86855594466194874,0.49559113288313561,0.86347248329807924,0.5043959462436709,0.85829976796313123,0.51314862205255429,0.85303833334164147,0.52184825557791659,0.84768872328873324,0.53049394757067447,0.84225149077389883,0.53908480435748241,0.83672719782384208,0.54761993793310804,0.83111641546438353,0.55609846605222191,0.82541972366143535,0.56451951232059261,0.81963771126105245,0.57288220628567577,0.81377097592856618,0.5811856835265895,0.8078201240868047,0.58942908574346708,0.80178577085341063,0.59761156084617539,0.79566853997725762,0.60573226304239336,0.78946906377397619,0.61379035292503703,0.78318798306059356,0.62178499755902727,0.77682594708929431,0.62971537056738647,0.77038361348031048,0.63758065221665838,0.76386164815394486,0.64538002950164097,0.7572607252617376,0.65311269622942336,0.75058152711678217,0.66077785310271953,0.7438247441231961,0.66837470780248853,0.73699107470475722,0.67590247506983359,0.73008122523271024,0.68336037678717121,0.72309590995275108,0.69074764205866301,0.71603585091119881,0.69806350728989941,0.70890177788035968,0.70530721626683024,0.70169442828309314,0.71247802023393192,0.69441454711658812,0.71957517797160275,0.68706288687535433,0.7265979558727812,0.67964020747344023,0.73354562801877499,0.67214727616588366,0.74041747625429755,0.66458486746940282,0.74721279026170062,0.65695376308233822,0.75393086763439732,0.64925475180385039,0.76057101394946713,0.64148862945238583,0.76713254283943633,0.63365619878341517,0.77361477606322449,0.62575826940645563,0.78001704357625279,0.61779565770138467,0.78633868359970283,0.60976918673405422,0.79257904268892332,0.60167968617121248,0.79873747580097387,0.59352799219474506,0.80481334636130053,0.58531494741524204,0.81080602632953613,0.57704140078489941,0.81671489626441918,0.56870820750976747,0.82253934538782236,0.56031622896134992,0.82827877164788677,0.55186633258756801,0.83393258178125396,0.54335939182309545,0.83950019137438903,0.53479628599907425,0.84498102492398985,0.52617790025222189,0.85037451589647417,0.51750512543333804,0.85568010678654038,0.50877885801522049,0.86089724917479449,0.49999999999999989,0.86602540378443871,0.49116945882590363,0.87106404053701414,0.48228814727345615,0.87601263860719325,0.47335698337112969,0.88087068647661559,0.46437689030045004,0.88563768198676129,0.45534879630057101,0.89031313239085785,0.44627363457232566,0.89489655440481297,0.43715234318176505,0.89938747425717036,0.42798586496319291,0.9037854277380819,0.41877514742170974,0.90808996024729027,0.40952114263527162,0.91230062684112057,0.40022480715627778,0.91641699227847162,0.39088710191269549,0.92043863106580548,0.38150899210873157,0.92436512750112976,0.37209144712506415,0.92819607571696594,0.36263544041864049,0.9319310797223036,0.3531419494220544,0.93556975344353199,0.34361195544251288,0.93911172076434679,0.33404644356040203,0.94255661556462866,0.32444640252746199,0.945904081758287,0.31481282466458482,0.94915377333006756,0.30514670575924108,0.9523053543713188,0.29544904496254892,0.95535849911471338,0.2857208446859959,0.95831289196792147,0.27596311049782252,0.96116822754623277,0.26617685101908162,0.96392421070412249,0.25636307781938011,0.96658055656576003,0.24652280531231693,0.96913699055445479,0.23665705065062695,0.97159324842103889,0.22676683362104103,0.97394907627118121,0.21685317653887543,0.97620423059163153,0.20691710414235823,0.97835847827539191,0.19695964348670594,0.98041159664581168,0.18698182383796097,0.9823633734796049,0.17698467656659911,0.98421360702878735,0.16696923504092209,0.98596210604153001,0.15693653452024103,0.98760868978192839,0.14688761204786591,0.98915318804868424,0.13682350634391002,0.99059544119269904,0.12674525769792169,0.991935300133576,0.11665390786135239,0.99317262637503012,0.10655049993987611,0.99430729201920387,0.09643607828556644,0.99533917977988795,0.08631168838894597,0.99626818299464404,0.076178376770918002,0.99709420563583062,0.066037190874590687,0.99781716232052897,0.055889178957007998,0.99843697831936873,0.045735389980794357,0.99895358956425229,0.035576873505727448,0.99936694265497772,0.025414679580249136,0.99967699486475792,0.015249858632925991,0.99988371414463784,0.0050834613638695023,0.99998707912680651,0,0.99979327270679419,0.020332531820652998,0.99917317629952429,0.040656657062771384,0.99813996715989384,0.060963972623559008,0.99669407247296038,0.081246082350259541,0.99483609005051377,0.10149460051158439,0.99256678808390786,0.1217011552648317,0.98988710482644893,0.1418573921172632,0.98679814820546974,0.1619549773803074,0.98330119536425242,0.18198560161516153,0.97939769213398775,0.20194098306836697,0.97508925243598943,0.22181287109593834,0.97037765761441064,0.24159304957462996,0.96526485569973985,0.26127334029892979,0.95975296060337811,0.28084560636237593,0.9538442512436327,0.30030175552179805,0.94754117060348819,0.31963374354309215,0.94084632472054397,0.33883357752714643,0.93376248160953546,0.35789331921454187,0.92629257011788635,0.37680508826766201,0.91843967871476306,0.39556106552885462,0.91020705421413273,0.41415349625329845,0.90159810043235322,0.43257469331523801,0.89261637678085004,0.45081704038626075,0.88326559679446082,0.46887299508430325,0.87354962659605717,0.48673509209208354,0.86347248329807924,0.5043959462436709,0.85303833334164147,0.52184825557791659,0.84225149077389883,0.53908480435748241,0.83111641546438353,0.55609846605222191,0.81963771126105245,0.57288220628567577,0.8078201240868047,0.58942908574346708,0.79566853997725762,0.60573226304239336,0.78318798306059356,0.62178499755902727,0.77038361348031048,0.63758065221665838,0.7572607252617376,0.65311269622942336,0.7438247441231961,0.66837470780248853,0.73008122523271024,0.68336037678717121,0.71603585091119881,0.69806350728989941,0.70169442828309314,0.71247802023393192,0.68706288687535433,0.7265979558727812,0.67214727616588366,0.74041747625429755,0.65695376308233822,0.75393086763439732,0.64148862945238583,0.76713254283943633,0.62575826940645563,0.78001704357625279,0.60976918673405422,0.79257904268892332,0.59352799219474506,0.80481334636130053,0.57704140078489941,0.81671489626441918,0.56031622896134992,0.82827877164788677,0.54335939182309545,0.83950019137438903,0.52617790025222189,0.85037451589647417,0.50877885801522049,0.86089724917479449,0,0.99917317629952429,0.040656657062771384,0.99669407247296038,0.081246082350259541,0.99256678808390786,0.1217011552648317,0.98679814820546974,0.1619549773803074,0.97939769213398775,0.20194098306836697,0.97037765761441064,0.24159304957462996,0.95975296060337811,0.28084560636237593,0.94754117060348819,0.31963374354309215,0.93376248160953546,0.35789331921454187,0.91843967871476306,0.39556106552885462,0.90159810043235322,0.43257469331523801,0.88326559679446082,0.46887299508430325,0.86347248329807924,0.5043959462436709,0.84225149077389883,0.53908480435748241,0.81963771126105245,0.57288220628567577,0.79566853997725762,0.60573226304239336,0.77038361348031048,0.63758065221665838,0.7438247441231961,0.66837470780248853,0.71603585091119881,0.69806350728989941,0.68706288687535433,0.7265979558727812,0.65695376308233822,0.75393086763439732,0.62575826940645563,0.78001704357625279,0.59352799219474506,0.80481334636130053,0.56031622896134992,0.82827877164788677,0.52617790025222189,0.85037451589647417,0.49116945882590363,0.87106404053701414,0.45534879630057101,0.89031313239085785,0.41877514742170974,0.90808996024729027,0.38150899210873157,0.92436512750112976,0.34361195544251288,0.93911172076434679,0.30514670575924108,0.9523053543713188,0.26617685101908162,0.96392421070412249,0.22676683362104103,0.97394907627118121,0.18698182383796097,0.9823633734796049,0.14688761204786591,0.98915318804868424,0.10655049993987611,0.99430729201920387,0.066037190874590687,0.99781716232052897,0.025414679580249136,0.99967699486475792,-0.01524985863292609,0.99988371414463784,-0.055889178957008102,0.99843697831936873,-0.096436078285566551,0.99533917977988795,-0.13682350634391011,0.99059544119269904,-0.17698467656659922,0.98421360702878735,-0.21685317653887551,0.97620423059163153,-0.25636307781938023,0.96658055656576003,-0.2954490449625492,0.95535849911471327,-0.33404644356040208,0.94255661556462866,-0.3720914471250642,0.92819607571696594,-0.40952114263527173,0.91230062684112057,-0.44627363457232572,0.89489655440481286,-0.48228814727345626,0.87601263860719325,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.99951145760046589,0.03125453767682429,0.99804630774921599,0.062478537019982648,0.99560598202189809,0.093641489534350766,0.99219286482368529,0.12471294637273277,0.98781029105950946,0.15566254808696697,0.98246254287557611,0.18646005429168117,0.97615484547534526,0.21707537321171355,0.96889336201406373,0.24747859108432871,0.96068518757684018,0.27764000138750056,0.95153834224614542,0.30753013386570344,0.94146176326551134,0.33711978332485076,0.93046529630708663,0.36638003816824616,0.91855968585157977,0.39528230864566533,0.90575656468999055,0.42379835478796629,0.89206844255738649,0.45190031399993386,0.87750869390983122,0.47956072828439789,0.86209154485640649,0.50675257107102523,0.84583205925909744,0.53344927362357031,0.82874612401412162,0.55962475099978393,0.81085043352908504,0.5852534275386132,0.79216247341112933,0.61031026184979209,0.77270050338201135,0.63477077128140225,0.75248353943680657,0.65861105584150048,0.73153133526366898,0.68180782155043773,0.70986436294280331,0.70433840320105223,0.68750379294350594,0.72618078650449913,0.66447147343882174,0.74731362960007708,0.64078990895802601,0.76771628390803637,0.61648223839779126,0.78736881430499195,0.59157221241352231,0.80625201860222984,0.5660841702129531,0.82434744630787338,0.54004301577467573,0.84163741665457892,0.51347419351484191,0.85810503587514431,0,0.99804630774921599,0.062478537019982648,0.99219286482368529,0.12471294637273277,0.98246254287557611,0.18646005429168117,0.96889336201406373,0.24747859108432871,0.95153834224614542,0.30753013386570344,0.93046529630708663,0.36638003816824616,0.90575656468999055,0.42379835478796629,0.87750869390983122,0.47956072828439789,0.84583205925909744,0.53344927362357031,0.81085043352908504,0.5852534275386132,0.77270050338201135,0.63477077128140225,0.73153133526366898,0.68180782155043773,0.68750379294350594,0.72618078650449913,0.64078990895802601,0.76771628390803637,0.59157221241352231,0.80625201860222984,0.54004301577467573,0.84163741665457892,0.48640366342581109,0.87373421370915205,0.43086374494097046,0.90241699523858832,0.37364027613685968,0.92757368658687767,0.31495685110861033,0.94910599088813508,0.25504276856167651,0.96692977315025064,0.19413213585362751,0.98097538900265424,0.13246295424668797,0.99118795682364902,0.070276188945293,0.99752757218401011,0.0078148275523839076,0.99996946376893259,-0.054677069376585792,0.99850409016908293,-0.11695532197208247,0.99313717716255423,-0.17877658515512931,0.9838896953420494,-0.23989929948009772,0.97079777817471258,-0.30008463500034077,0.95391258081477903,-0.35909742446862458,0.93330008022071897,-0.41670708222598662,0.90904081735789222,-0.47268850518856537,0.88122958249402839,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.99995299150722616,0.0096961216859783959,0.99981197044850145,0.01939133177182437,0.9995769500822006,0.029084718743111401,0.99924795250423004,0.03877537125681671,0.99882500864595036,0.048462378227002958,0.99830815827126818,0.058144828910475822,0.99769744997289767,0.067821812992409344,0.99699294116779202,0.077492420671930934,0.99619469809174555,0.087155742747658166,0.99530279579316583,0.096810870703179092,0.99431731812601842,0.10645689679246825,0.99323835774194302,0.11609291412523022,0.99206601608154232,0.12571801675216268,0.99080040336484532,0.13533129975013108,0.98944163858094447,0.14493185930724672,0.98798984947680901,0.15451879280784048,0.98644517254527386,0.16409119891732396,0.98480775301220802,0.17364817766693033,0.98307774482286003,0.18318883053832663,0.98125531062738469,0.19271226054808968,0.97934062176555148,0.20221757233203794,0.97733385825063557,0.21170387222941073,0.97523520875249314,0.22117026836688777,0.97304487057982381,0.23061587074244014,0.97076304966161997,0.24003979130900588,0.9683899605278059,0.24944114405798126,0.96592582628906831,0.25881904510252074,0.96337087861588033,0.26817261276063731,0.96072535771672052,0.27750096763809573,0.9579895123154889,0.28680323271109021,0.95516359962812303,0.29607853340869988,0.95224788533841531,0.30532599769511309,0.9492426435730339,0.31454475615161365,0.94614815687575049,0.32373394205832101,0.94296471618087596,0.33289269147567657,0.93969262078590843,0.34202014332566871,0.93633217832339311,0.35111543947278878,0.93288370473200055,0.36017772480471039,0.92934752422682243,0.36920614731268442,0.92572396926889045,0.37819985817164248,0.92201338053391846,0.38715801182000059,0.918216106880274,0.39607976603915679,0.91433250531617938,0.40496428203267359,0.91036294096614667,0.41381072450513912,0.90630778703664994,0.42261826174069944,0.90216742478103773,0.43138606568125343,0.89794224346368812,0.44011331200430481,0.89363264032341228,0.44879918020046211,0.88923902053610615,0.45744285365058074,0.88476179717665782,0.46604351970253877,0.8802013911801112,0.47460036974764036,0.87555823130209087,0.48311259929663841,0.87083275407849214,0.49157940805537054,0.86602540378443871,0.49999999999999994,0.8611366323925137,0.50837358345185557,0.85616689953026648,0.51669937115186282,0.85111667243699973,0.52497658033456018,0.84598642591984108,0.53320443280169116,0.84077664230910321,0.54138215499536957,0.83548781141293649,0.54950897807080601,0.83012043047127881,0.55758413796859274,0.82467500410910677,0.56560687548653854,0.8191520442889918,0.57357643635104605,0.81355207026296761,0.5814920712880266,0.80787560852371121,0.58935303609334477,0.80212319275504385,0.59715859170278618,0.79629536378175581,0.60490800426154168,0.79039266951875931,0.61260054519320284,0.78441566491957571,0.62023549126826005,0.77836491192416002,0.62781212467209857,0.77224097940606917,0.63532973307248508,0.76604444311897801,0.64278760968653925,0.75977588564254939,0.65018505334718335,0.75343589632766073,0.65752136856906362,0.74702507124099604,0.66479586561393778,0.74054401310900464,0.67200786055552242,0.73399333126123534,0.6791566753437932,0.72737364157304873,0.6862416378687336,0.72068556640771464,0.69326208202352424,0.7139297345578991,0.70021734776716849,0.70710678118654757,0.70710678118654746,0.70021734776716849,0.71392973455789899,0.69326208202352424,0.72068556640771453,0.6862416378687336,0.72737364157304873,0.6791566753437932,0.73399333126123523,0.67200786055552242,0.74054401310900453,0.66479586561393789,0.74702507124099593,0.65752136856906362,0.75343589632766073,0.65018505334718346,0.75977588564254939,0.64278760968653936,0.76604444311897801,0.63532973307248508,0.77224097940606906,0.62781212467209857,0.77836491192416002,0.62023549126826005,0.78441566491957571,0.61260054519320284,0.79039266951875931,0.60490800426154168,0.79629536378175569,0.59715859170278629,0.80212319275504373,0.589353036093345,0.8078756085237111,0.58149207128802671,0.8135520702629675,0.57357643635104616,0.81915204428899169,0.56560687548653865,0.82467500410910666,0.55758413796859296,0.8301204304712787,0.54950897807080612,0.83548781141293638,0.54138215499536968,0.84077664230910309,0.53320443280169139,0.84598642591984097,0.52497658033456018,0.85111667243699973,0.51669937115186304,0.85616689953026648,0.50837358345185557,0.8611366323925137,0.50000000000000011,0.8660254037844386,0.49157940805537059,0.87083275407849203,0.48311259929663858,0.87555823130209076,0.47460036974764042,0.88020139118011109,0.46604351970253893,0.8847617971766577,0.45744285365058079,0.88923902053610615,0.44879918020046228,0.89363264032341216,0.44011331200430487,0.89794224346368812,0.43138606568125354,0.90216742478103762,0.42261826174069944,0.90630778703664994,0.41381072450513923,0.91036294096614667,0.40496428203267359,0.91433250531617938,0.3960797660391569,0.918216106880274,0.38715801182000059,0.92201338053391846,0.37819985817164259,0.92572396926889033,0.36920614731268442,0.92934752422682243,0.3601777248047105,0.93288370473200044,0.35111543947278878,0.93633217832339311,0.34202014332566882,0.93969262078590832,0.33289269147567657,0.94296471618087596,0.32373394205832112,0.94614815687575038,0.31454475615161387,0.94924264357303378,0.3053259976951132,0.95224788533841531,0.29607853340870011,0.95516359962812303,0.28680323271109032,0.9579895123154889,0.27750096763809595,0.96072535771672041,0.26817261276063747,0.96337087861588033,0.25881904510252096,0.9659258262890682,0.24944114405798137,0.9683899605278059,0.2400397913090061,0.97076304966161997,0.23061587074244025,0.97304487057982381,0.22117026836688797,0.97523520875249303,0.21170387222941084,0.97733385825063546,0.20221757233203813,0.97934062176555148,0.19271226054808976,0.98125531062738469,0.18318883053832682,0.98307774482285992,0.17364817766693041,0.98480775301220802,0.16409119891732415,0.98644517254527386,0.15451879280784056,0.98798984947680901,0.14493185930724692,0.98944163858094447,0.13533129975013117,0.99080040336484532,0.12571801675216288,0.99206601608154232,0.1160929141252303,0.99323835774194302,0.10645689679246843,0.99431731812601842,0.096810870703179161,0.99530279579316583,0.08715574274765836,0.99619469809174555,0.077492420671931017,0.99699294116779202,0.067821812992409525,0.99769744997289767,0.058144828910475899,0.99830815827126818,0.048462378227003132,0.99882500864595036,0.038775371256816779,0.99924795250423004,0.029084718743111582,0.9995769500822006,0.019391331771824435,0.99981197044850145,0.0096961216859785693,0.99995299150722616,0,0,0.99981197044850145,0.01939133177182437,0.99924795250423004,0.03877537125681671,0.99830815827126818,0.058144828910475822,0.99699294116779202,0.077492420671930934,0.99530279579316583,0.096810870703179092,0.99323835774194302,0.11609291412523022,0.99080040336484532,0.13533129975013108,0.98798984947680901,0.15451879280784048,0.98480775301220802,0.17364817766693033,0.98125531062738469,0.19271226054808968,0.97733385825063557,0.21170387222941073,0.97304487057982381,0.23061587074244014,0.9683899605278059,0.24944114405798126,0.96337087861588033,0.26817261276063731,0.9579895123154889,0.28680323271109021,0.95224788533841531,0.30532599769511309,0.94614815687575049,0.32373394205832101,0.93969262078590843,0.34202014332566871,0.93288370473200055,0.36017772480471039,0.92572396926889045,0.37819985817164248,0.918216106880274,0.39607976603915679,0.91036294096614667,0.41381072450513912,0.90216742478103773,0.43138606568125343,0.89363264032341228,0.44879918020046211,0.88476179717665782,0.46604351970253877,0.87555823130209087,0.48311259929663841,0.86602540378443871,0.49999999999999994,0.85616689953026648,0.51669937115186282,0.84598642591984108,0.53320443280169116,0.83548781141293649,0.54950897807080601,0.82467500410910677,0.56560687548653854,0.81355207026296761,0.5814920712880266,0.80212319275504385,0.59715859170278618,0.79039266951875931,0.61260054519320284,0.77836491192416002,0.62781212467209857,0.76604444311897801,0.64278760968653925,0.75343589632766073,0.65752136856906362,0.74054401310900464,0.67200786055552242,0.72737364157304873,0.6862416378687336,0.7139297345578991,0.70021734776716849,0,0.99924795250423004,0.03877537125681671,0.99699294116779202,0.077492420671930934,0.99323835774194302,0.11609291412523022,0.98798984947680901,0.15451879280784048,0.98125531062738469,0.19271226054808968,0.97304487057982381,0.23061587074244014,0.96337087861588033,0.26817261276063731,0.95224788533841531,0.30532599769511309,0.93969262078590843,0.34202014332566871,0.92572396926889045,0.37819985817164248,0.91036294096614667,0.41381072450513912,0.89363264032341228,0.44879918020046211,0.87555823130209087,0.48311259929663841,0.85616689953026648,0.51669937115186282,0.83548781141293649,0.54950897807080601,0.81355207026296761,0.5814920712880266,0.79039266951875931,0.61260054519320284,0.76604444311897801,0.64278760968653925,0.74054401310900464,0.67200786055552242,0.7139297345578991,0.70021734776716849,0.6862416378687336,0.72737364157304873,0.65752136856906362,0.75343589632766073,0.62781212467209857,0.77836491192416002,0.59715859170278629,0.80212319275504373,0.56560687548653865,0.82467500410910666,0.53320443280169139,0.84598642591984097,0.50000000000000011,0.8660254037844386,0.46604351970253893,0.8847617971766577,0.43138606568125354,0.90216742478103762,0.3960797660391569,0.918216106880274,0.3601777248047105,0.93288370473200044,0.32373394205832112,0.94614815687575038,0.28680323271109032,0.9579895123154889,0.24944114405798137,0.9683899605278059,0.21170387222941084,0.97733385825063546,0.17364817766693041,0.98480775301220802,0.13533129975013117,0.99080040336484532,0.096810870703179161,0.99530279579316583,0.058144828910475899,0.99830815827126818,0.019391331771824435,0.99981197044850145,0,0.99830815827126818,0.058144828910475822,0.99323835774194302,0.11609291412523022,0.98480775301220802,0.1736481776669303,0.97304487057982381,0.23061587074244014,0.9579895123154889,0.28680323271109021,0.93969262078590843,0.34202014332566866,0.918216106880274,0.39607976603915673,0.89363264032341228,0.44879918020046211,0.86602540378443871,0.49999999999999994,0.83548781141293649,0.54950897807080601,0.80212319275504385,0.59715859170278618,0.76604444311897812,0.64278760968653925,0.72737364157304885,0.68624163786873349,0.68624163786873371,0.72737364157304862,0.64278760968653947,0.76604444311897801,0.59715859170278629,0.80212319275504373,0.54950897807080612,0.83548781141293638,0.50000000000000011,0.8660254037844386,0.44879918020046228,0.89363264032341216,0.3960797660391569,0.918216106880274,0.34202014332566882,0.93969262078590832,0.28680323271109032,0.9579895123154889,0.23061587074244025,0.97304487057982381,0.17364817766693064,0.98480775301220802,0.11609291412523053,0.99323835774194291,0.058144828910476121,0.99830815827126818,2.8327694488239898e-16,1,-0.058144828910475552,0.99830815827126818,-0.11609291412522996,0.99323835774194302,-0.17364817766693008,0.98480775301220813,-0.23061587074243992,0.97304487057982392,-0.28680323271108998,0.9579895123154889,-0.34202014332566849,0.93969262078590843,-0.39607976603915662,0.91821610688027411,-0.44879918020046178,0.8936326403234125,-0.49999999999999983,0.86602540378443871,-0.54950897807080568,0.8354878114129366,-0.59715859170278596,0.80212319275504396,-0.64278760968653903,0.76604444311897835,-0.68624163786873349,0.72737364157304885,0,0.99699294116779202,0.077492420671930934,0.98798984947680901,0.15451879280784048,0.97304487057982381,0.23061587074244014,0.95224788533841531,0.30532599769511309,0.92572396926889045,0.37819985817164248,0.89363264032341228,0.44879918020046211,0.85616689953026648,0.51669937115186282,0.81355207026296761,0.5814920712880266,0.76604444311897801,0.64278760968653925,0.7139297345578991,0.70021734776716849,0.65752136856906362,0.75343589632766073,0.59715859170278629,0.80212319275504373,0.53320443280169139,0.84598642591984097,0,0.98798984947680901,0.15451879280784048,0.95224788533841531,0.30532599769511309,0.89363264032341228,0.44879918020046211,0.81355207026296761,0.5814920712880266,0.7139297345578991,0.70021734776716849,0.59715859170278629,0.80212319275504373,0.46604351970253893,0.8847617971766577,0.32373394205832112,0.94614815687575038,0.17364817766693041,0.98480775301220802,0.019391331771824435,0.99981197044850145,-0.13533129975013106,0.99080040336484532,-0.28680323271108998,0.9579895123154889,-0.43138606568125326,0.90216742478103773,0,0.97304487057982381,0.23061587074244014,0.89363264032341228,0.44879918020046211,0.76604444311897812,0.64278760968653925,0.59715859170278629,0.80212319275504373,0,0.89363264032341228,0.44879918020046211,0.59715859170278629,0.80212319275504373,0.17364817766693064,0.98480775301220802,-0.28680323271108998,0.9579895123154889,0,0.76604444311897801,0.64278760968653925,0,0.17364817766693041,0.98480775301220802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.9999281110792807,0.011990524318042962,0.99971245465315683,0.023979324664381761,0.99935306172824367,0.035964677315181159,0.99884998397728031,0.047944859042308149,0.9982032937316998,0.059918147361093972,0.99741308397122974,0.071882820777989201,0.99647946831052381,0.083837159038076495,0.99540258098282641,0.095779443372404918,0.9941825768206729,0.10770795674511109,0.99281963123362849,0.11962098410029072,0.9913139401830674,0.13151681260858564,0.98966572015399901,0.14339373191345081,0.98787520812394114,0.15525003437706569,0.98594266152884857,0.16708401532585457,0.98386835822609919,0.17889397329558099,0.9816525964545445,0.19067821027598067,0.97929569479162915,0.20243503195489748,0.97679799210758655,0.21416274796188825,0.97415984751671725,0.22585967211126057,0.97138164032575602,0.23752412264450873,0.9684637699793357,0.24915442247211347,0.96540665600255637,0.26074889941467033,0.96221073794066658,0.27230588644331183,0.95887647529586684,0.28382372191938954,0.95540434746124281,0.29530074983338067,0.9517948536518398,0.30673532004298554,0.9480485128328866,0.3181257885103817,0.94416586364517918,0.32947051753859996,0.94014746432763696,0.34076787600698882,0.93599389263703991,0.35201623960573386,0.93170574576495979,0.36321399106939706,0.9272836402518978,0.37435952040944409,0.92272821189863918,0.38545122514572466,0.91804011567483923,0.39648751053687392,0.91322002562485372,0.40746678980960094,0.90826863477082542,0.41838748438683115,0.90318665501304352,0.42924802411467144,0.89797481702758775,0.44004684748816275,0.8926338701612736,0.45078240187579038,0.88716458232391271,0.46145314374271784,0.88156773987790471,0.47205753887271301,0.87584414752517514,0.48259406258873427,0.86999462819147799,0.49306119997214548,0.86402002290807622,0.50345744608052756,0.85792119069082129,0.51378130616405604,0.85169900841664437,0.52403129588041286,0.84535437069748198,0.53420594150820178,0.83888818975165003,0.54430378015883696,0.83230139527268743,0.55432335998687421,0.82559493429568631,0.56426324039875353,0.81876977106112947,0.57412199225992522,0.81182688687625448,0.58389819810032739,0.80476727997396258,0.59359045231818686,0.79759196536929577,0.60319736138211355,0.79030197471349939,0.61271754403145939,0.78289835614569425,0.62214963147491276,0.77538217414217658,0.63149226758730093,0.76775450936337097,0.64074410910457025,0.76001645849845445,0.64990382581691819,0.75216913410767716,0.65897010076004747,0.74421366446240123,0.66794163040451704,0.73615119338287993,0.67681712484316014,0.72798288007380163,0.68559530797654455,0.71970989895762205,0.69427491769644789,0.71133343950570849,0.70285470606731981,0,0.99971245465315683,0.023979324664381761,0.99884998397728031,0.047944859042308149,0.99741308397122974,0.071882820777989201,0.99540258098282641,0.095779443372404918,0.99281963123362849,0.11962098410029072,0.98966572015399901,0.14339373191345081,0.98594266152884857,0.16708401532585457,0.9816525964545445,0.19067821027598067,0.97679799210758655,0.21416274796188825,0.97138164032575602,0.23752412264450873,0.96540665600255637,0.26074889941467033,0.95887647529586684,0.28382372191938954,0.9517948536518398,0.30673532004298554,0.94416586364517918,0.32947051753859996,0.93599389263703991,0.35201623960573386,0.9272836402518978,0.37435952040944409,0.91804011567483923,0.39648751053687392,0.90826863477082542,0.41838748438683115,0.89797481702758775,0.44004684748816275,0.88716458232391271,0.46145314374271784,0.87584414752517514,0.48259406258873427,0.86402002290807622,0.50345744608052756,0.85169900841664437,0.52403129588041286,0.83888818975165003,0.54430378015883696,0.82559493429568631,0.56426324039875353,0.81182688687625448,0.58389819810032739,0.79759196536929577,0.60319736138211355,0.78289835614569425,0.62214963147491276,0.76775450936337097,0.64074410910457025,0.75216913410767716,0.65897010076004747,0.73615119338287993,0.67681712484316014,0.71970989895762205,0.69427491769644789,0.70285470606731981,0.71133343950570849,0.68559530797654455,0.72798288007380163,0.66794163040451704,0.74421366446240123,0.64990382581691819,0.76001645849845434,0.63149226758730093,0.77538217414217658,0.61271754403145928,0.7903019747134995,0.59359045231818686,0.80476727997396258,0.57412199225992511,0.81876977106112958,0.5543233599868741,0.83230139527268754,0.53420594150820166,0.84535437069748198,0.51378130616405593,0.85792119069082129,0.49306119997214531,0.86999462819147799,0.47205753887271307,0.88156773987790471,0.45078240187579044,0.8926338701612736,0.4292480241146715,0.90318665501304352,0.40746678980960094,0.91322002562485372,0.38545122514572466,0.92272821189863918,0.36321399106939706,0.93170574576495979,0.34076787600698882,0.94014746432763696,0.3181257885103817,0.9480485128328866,0.29530074983338062,0.95540434746124281,0.27230588644331177,0.96221073794066658,0.24915442247211336,0.9684637699793357,0.22585967211126048,0.97415984751671736,0.20243503195489734,0.97929569479162915,0.1788939732955811,0.98386835822609919,0.15525003437706575,0.98787520812394103,0.13151681260858569,0.9913139401830674,0.10770795674511113,0.9941825768206729,0.083837159038076495,0.99647946831052381,0.059918147361093958,0.9982032937316998,0.035964677315181139,0.99935306172824367,0.011990524318042921,0.9999281110792807,0,0.99935306172824367,0.035964677315181159,0.99741308397122974,0.071882820777989201,0.9941825768206729,0.10770795674511109,0.98966572015399901,0.14339373191345081,0.98386835822609919,0.17889397329558099,0.97679799210758655,0.21416274796188825,0.9684637699793357,0.24915442247211342,0.95887647529586684,0.28382372191938954,0.9480485128328866,0.3181257885103817,0.93599389263703991,0.35201623960573386,0.92272821189863918,0.38545122514572461,0.90826863477082542,0.41838748438683115,0.8926338701612736,0.45078240187579038,0.87584414752517525,0.48259406258873416,0.85792119069082129,0.51378130616405604,0.83888818975165003,0.54430378015883696,0.81876977106112947,0.57412199225992522,0.79759196536929577,0.60319736138211355,0.77538217414217669,0.63149226758730093,0.75216913410767716,0.65897010076004747,0.72798288007380163,0.68559530797654455,0.70285470606731981,0.71133343950570849,0.67681712484316014,0.73615119338287982,0.64990382581691819,0.76001645849845434,0.62214963147491276,0.78289835614569425,0.59359045231818686,0.80476727997396258,0.56426324039875353,0.8255949342956862,0.53420594150820189,0.84535437069748187,0.50345744608052756,0.86402002290807633,0.47205753887271307,0.88156773987790471,0.4400468474881627,0.89797481702758775,0.40746678980960094,0.91322002562485372,0.37435952040944415,0.9272836402518978,0.34076787600698882,0.94014746432763696,0.30673532004298559,0.9517948536518398,0.27230588644331177,0.96221073794066658,0.23752412264450873,0.97138164032575602,0.20243503195489757,0.97929569479162915,0.16708401532585451,0.98594266152884857,0.13151681260858569,0.9913139401830674,0.095779443372405057,0.99540258098282641,0.059918147361093958,0.9982032937316998,0.023979324664381838,0.99971245465315683,-0.011990524318042799,0.9999281110792807,-0.047944859042308129,0.99884998397728031,-0.08383715903807637,0.99647946831052381,-0.11962098410029073,0.99281963123362849,-0.15525003437706564,0.98787520812394114,-0.1906782102759805,0.98165259645454461,-0.22585967211126057,0.97415984751671725,-0.26074889941467022,0.96540665600255637,-0.29530074983338073,0.95540434746124281,-0.32947051753859991,0.94416586364517918,-0.36321399106939695,0.9317057457649599,-0.39648751053687392,0.91804011567483923,-0.42924802411467117,0.90318665501304363,-0.46145314374271773,0.88716458232391282,-0.49306119997214543,0.86999462819147799,-0.52403129588041297,0.85169900841664425,-0.55432335998687399,0.83230139527268754,-0.58389819810032739,0.81182688687625448,-0.61271754403145939,0.79030197471349939,-0.64074410910457014,0.76775450936337108,-0.66794163040451704,0.74421366446240123,-0.69427491769644789,0.71970989895762205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.99983124163332271,0.018370853381597361,0.99932502349206376,0.036735506292772425,0.99848151643331617,0.055087760355865434,0.99730100515482734,0.073421421378035326,0.9957838880989075,0.091730301441903458,0.99393067731794948,0.11000822099407928,0.99174199830160237,0.12824901093086305,0.98921858976565791,0.14644651468042152,0.98636130340272232,0.16459459028073389,0.98317110359475501,0.18268711245260688,0.97964906708757393,0.20071797466705893,0.97579638262743562,0.21868109120637577,0.97161435055981382,0.2365703992181423,0.96710438239051078,0.25437986076155633,0.96226800030925042,0.27210346484533499,0.95710683667591423,0.28973522945652458,0.95162263346959186,0.3072692035795303,0.94581724170063464,0.32469946920468346,0.93969262078590843,0.34202014332566871,0.93325083788745711,0.35922537992513726,0.92649406721480176,0.37630937194783542,0.91942458929110782,0.39326635326058312,0.91204479018347051,0.41009060059844005,0.90435716069757754,0.42677643549640359,0.89636429553702013,0.44331822620598577,0.88806889242753762,0.4597103895960224,0.87947375120648907,0.47594739303707351,0.87058177287786243,0.49202375626877815,0.86139595863313612,0.50793405324953411,0.85191940883832706,0.52367291398787785,0.84215532198756582,0.53923502635494613,0.83210699362355012,0.55461513787740879,0.82177781522524518,0.5698080575102662,0.81117127306320225,0.58480865738891352,0.80029094702288417,0.59961187455988163,0.78914050939639357,0.61421271268966782,0.77772372364301401,0.62860624375108209,0.76604444311897801,0.64278760968653925,0.75410660977689625,0.65675202404773436,0.74191425283528156,0.67049477361114895,0.72947148741862089,0.68401121996884306,0.71678251316845132,0.69729680109399539,0.70385161282591147,0.71034703288066403,0.69068315078624443,0.72315751065724665,0.6772815716257411,0.73572391067313159,0.66365139860162137,0.7480419915580353,0.64979723212535956,0.76010759575353637,0.63572374820996813,0.77191665091632078,0.62143569689176481,0.78346517129266602,0.6069379006271568,0.79474925906369964,0.59223525266498012,0.80576510566097803,0.57733271539494657,0.8165089930519428,0.56223531867275423,0.8269772949948182,0.54694815812242692,0.83716647826252855,0.53147639341645603,0.84707310383522183,0.51582524653432404,0.85669382806099625,0.50000000000000011,0.8660254037844386,0.48400599509899889,0.87506468144259364,0.46784863007560795,0.88380861012799428,0.45153335831088948,0.89225423861839392,0.43506568648207333,0.90039871637285351,0.41845117270396115,0.90823929449384633,0.40169542465296953,0.9157733266550574,0.38480409767444568,0.92299826999456269,0.36778289287389332,0.9299116859730876,0.35063755519275447,0.93651124119705476,0.33337387146939557,0.94279470820614331,0.31599766848595262,0.94875996622509429,0.29851481100169464,0.95440500187950739,0.28093119977356945,0.95972790987538903,0.26325276956459931,0.96472689364222042,0.24548548714079924,0.96940026593933037,0.22763534925729345,0.97374644942536759,0.20970838063431035,0.97776397719067931,0.19171063192373849,0.98145149325241787,0.17364817766693041,0.98480775301220802,0.15552711424444327,0.98783162367621935,0.13735355781840825,0.99052208463750324,0.11913364226822376,0.99287822782046486,0.10087351712026828,0.99489925798735368,0.082579345472332394,0.99658449300666985,0.064257301913470136,0.99793336408339472,0.045913570439971865,0.99894541595096864,0.027554342368162059,0.99962030702495142,0.0091858142447264219,0.99995780951831237,0,0.99932502349206376,0.036735506292772425,0.99730100515482734,0.073421421378035326,0.99393067731794948,0.11000822099407928,0.98921858976565791,0.14644651468042152,0.98317110359475501,0.18268711245260688,0.97579638262743562,0.21868109120637577,0.96710438239051078,0.25437986076155633,0.95710683667591423,0.28973522945652458,0.94581724170063464,0.32469946920468346,0.93325083788745711,0.35922537992513726,0.91942458929110782,0.39326635326058312,0.90435716069757754,0.42677643549640359,0.88806889242753762,0.4597103895960224,0.87058177287786243,0.49202375626877815,0.85191940883832706,0.52367291398787785,0.83210699362355012,0.55461513787740879,0.81117127306320225,0.58480865738891352,0.78914050939639357,0.61421271268966782,0.76604444311897801,0.64278760968653925,0.74191425283528156,0.67049477361114895,0.71678251316845132,0.69729680109399539,0.69068315078624443,0.72315751065724665,0.66365139860162137,0.7480419915580353,0.63572374820996813,0.77191665091632078,0.6069379006271568,0.79474925906369964,0.57733271539494657,0.8165089930519428,0.54694815812242692,0.83716647826252855,0.51582524653432404,0.85669382806099625,0,0.99730100515482734,0.073421421378035326,0.98921858976565791,0.14644651468042152,0.97579638262743562,0.21868109120637577,0.95710683667591423,0.28973522945652458,0.93325083788745711,0.35922537992513726,0.90435716069757754,0.42677643549640359,0.87058177287786243,0.49202375626877815,0.83210699362355012,0.55461513787740879,0.78914050939639357,0.61421271268966782,0.74191425283528156,0.67049477361114895,0.69068315078624443,0.72315751065724665,0.63572374820996813,0.77191665091632078,0.57733271539494657,0.8165089930519428,0.51582524653432404,0.85669382806099625,0.45153335831088948,0.89225423861839392,0.38480409767444568,0.92299826999456269,0.31599766848595262,0.94875996622509429,0.24548548714079924,0.96940026593933037,0.17364817766693041,0.98480775301220802,0.10087351712026828,0.99489925798735368,0.027554342368162059,0.99962030702495142,-0.045913570439971747,0.99894541595096864,-0.11913364226822364,0.99287822782046486,-0.19171063192373816,0.98145149325241798,-0.26325276956459898,0.96472689364222042,-0.33337387146939523,0.94279470820614342,-0.40169542465296926,0.91577332665505751,-0.46784863007560762,0.88380861012799439,0,0.99393067731794948,0.11000822099407928,0.97579638262743562,0.21868109120637577,0.94581724170063475,0.3246994692046834,0.90435716069757754,0.42677643549640359,0.85191940883832706,0.52367291398787785,0.78914050939639369,0.61421271268966771,0.71678251316845132,0.69729680109399528,0.63572374820996813,0.77191665091632078,0.54694815812242692,0.83716647826252855,0,0.97579638262743562,0.21868109120637577,0.90435716069757754,0.42677643549640359,0.78914050939639369,0.61421271268966771,0.63572374820996813,0.77191665091632078,0.45153335831088948,0.89225423861839392,0.24548548714079946,0.96940026593933037,0.027554342368162281,0.99962030702495142,-0.19171063192373816,0.98145149325241798,-0.40169542465296926,0.91577332665505751,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]} diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/fixtures/c/fftpack/medium.json b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/fixtures/c/fftpack/medium.json new file mode 100644 index 000000000000..9426aa08c1c5 --- /dev/null +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/fixtures/c/fftpack/medium.json @@ -0,0 +1 @@ +{"lengths":[34,49,74,77,101,16,81,113,56,96],"offsets":[0,33,81,154,230,330,345,425,537,592],"twiddles":[0.98297309968390179,0.18374951781657034,0.93247222940435581,0.36124166618715292,0.85021713572961422,0.52643216287735572,0.73900891722065909,0.67369564364655721,0.60263463637925641,0.79801722728023949,0.44573835577653831,0.89516329135506234,0.27366299007208278,0.96182564317281904,0.092268359463302016,0.99573417629503447,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.99179001382324616,0.127877161684506,0.96729486303902945,0.25365458390950735,0.92691675734602175,0.37526700487937409,0,0.96729486303902945,0.25365458390950735,0.87131870412338941,0.49071755200393785,0.71834935009772771,0.69568255060348638,0,0.92691675734602175,0.37526700487937409,0.71834935009772771,0.69568255060348638,0.404783343122394,0.91441262301581239,0,0.87131870412338941,0.49071755200393785,0.51839256831052516,0.85514276300534608,0.032051577571655332,0.99948621620068789,0,0.80141362186795673,0.59811053049121587,0.28452758663103267,0.95866785303666058,-0.34536505442130727,0.93846842204976055,0,0.71834935009772771,0.69568255060348638,0.032051577571655332,0.99948621620068789,-0.67230089026131656,0.74027799707531572,0,0,0,0,0,0,0,0.99639748854252652,0.084805924475509192,0.98561591034770846,0.16900082032184907,0.96773294693349887,0.25197806138512518,0.94287744546108421,0.33313979474205757,0.91122849038813569,0.4119012482439926,0.87301411316118815,0.48769494381363454,0.82850964924384218,0.55997478613759533,0.77803575431843952,0.62821999729564226,0.72195609395452454,0.69193886897754608,0.66067472339008149,0.75067230525272433,0.59463317630428669,0.80399713036694054,0.52430728355723166,0.85152913773331129,0.45020374481767328,0.89292585814956849,0.37285647778030861,0.92788902729650935,0.29282277127655043,0.95616673473925096,0.21067926999572642,0.97755523894768614,0.12701781974687887,0.99190043525887683,0.042441203196148462,0.99909896620468142,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.99667258249419322,0.08150928354706316,0.98671247339128887,0.16247613626020579,0.97018595557406451,0.24236173709321232,0.94720301029191012,0.32063446055273548,0.91791658525375941,0.39677341457824244,0,0.98671247339128887,0.16247613626020579,0.94720301029191012,0.32063446055273548,0.88252157678632126,0.4702719069927368,0.79438708541211267,0.60741185247774743,0.68514171496784426,0.72840979565826902,0,0.97018595557406451,0.24236173709321232,0.88252157678632126,0.4702719069927368,0.74223412300426994,0.67014066183755949,0.55768866698682951,0.83005020975508048,0.33988930158261688,0.94046545001381143,0,0.94720301029191012,0.32063446055273548,0.79438708541211267,0.60741185247774743,0.55768866698682951,0.83005020975508048,0.26210168293910224,0.96504026226913986,-0.061161660821842483,0.99812787319336693,0,0.91791658525375941,0.39677341457824244,0.68514171496784426,0.72840979565826902,0.33988930158261688,0.94046545001381143,-0.061161660821842483,0.99812787319336693,-0.45217190728268547,0.89193080800269398,0,0.88252157678632126,0.4702719069927368,0.55768866698682951,0.83005020975508048,0.10182298670383554,0.99480253285700404,-0.37796670142890643,0.92581919002089819,-0.76895052533936181,0.63930828993555178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.92387953251128674,0.38268343236508978,0,0,0.70710678118654757,0.70710678118654746,0,0,0.38268343236508984,0.92387953251128674,0,0,0,0,0,0.99699294116779202,0.077492420671930934,0.98798984947680901,0.15451879280784048,0.97304487057982381,0.23061587074244014,0.95224788533841531,0.30532599769511309,0.92572396926889045,0.37819985817164248,0.89363264032341228,0.44879918020046211,0.85616689953026648,0.51669937115186282,0.81355207026296761,0.5814920712880266,0.76604444311897801,0.64278760968653925,0.7139297345578991,0.70021734776716849,0.65752136856906362,0.75343589632766073,0.59715859170278629,0.80212319275504373,0.53320443280169139,0.84598642591984097,0,0.98798984947680901,0.15451879280784048,0.95224788533841531,0.30532599769511309,0.89363264032341228,0.44879918020046211,0.81355207026296761,0.5814920712880266,0.7139297345578991,0.70021734776716849,0.59715859170278629,0.80212319275504373,0.46604351970253893,0.8847617971766577,0.32373394205832112,0.94614815687575038,0.17364817766693041,0.98480775301220802,0.019391331771824435,0.99981197044850145,-0.13533129975013106,0.99080040336484532,-0.28680323271108998,0.9579895123154889,-0.43138606568125326,0.90216742478103773,0,0.97304487057982381,0.23061587074244014,0.89363264032341228,0.44879918020046211,0.76604444311897812,0.64278760968653925,0.59715859170278629,0.80212319275504373,0,0.89363264032341228,0.44879918020046211,0.59715859170278629,0.80212319275504373,0.17364817766693064,0.98480775301220802,-0.28680323271108998,0.9579895123154889,0,0.76604444311897801,0.64278760968653925,0,0.17364817766693041,0.98480775301220802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.9937122098932426,0.11196447610330786,0.97492791218182362,0.22252093395631439,0.94388333030836757,0.33027906195516704,0.90096886790241915,0.43388373911755812,0.84672419922828424,0.53203207651533657,0.7818314824680298,0.62348980185873348,0.70710678118654757,0.70710678118654746,0.62348980185873359,0.7818314824680298,0.53203207651533657,0.84672419922828412,0.43388373911755818,0.90096886790241915,0.33027906195516715,0.94388333030836757,0.22252093395631445,0.97492791218182362,0.11196447610330791,0.9937122098932426,0,0,0.97492791218182362,0.22252093395631439,0.90096886790241915,0.43388373911755812,0.7818314824680298,0.62348980185873348,0,0.90096886790241915,0.43388373911755812,0.62348980185873359,0.7818314824680298,0.22252093395631445,0.97492791218182362,0,0.7818314824680298,0.62348980185873348,0.22252093395631445,0.97492791218182362,-0.43388373911755806,0.90096886790241915,0,0,0,0,0,0,0,0.99785892323860348,0.065403129230143062,0.99144486137381038,0.13052619222005157,0.98078528040323043,0.19509032201612825,0.96592582628906831,0.25881904510252074,0.94693012949510569,0.32143946530316153,0.92387953251128674,0.38268343236508978,0.89687274153268837,0.44228869021900125,0.86602540378443871,0.49999999999999994,0.83146961230254524,0.55557023301960218,0.79335334029123528,0.60876142900872054,0.7518398074789775,0.65934581510006884,0.70710678118654757,0.70710678118654746,0.65934581510006895,0.75183980747897738,0.60876142900872066,0.79335334029123517,0.5555702330196024,0.83146961230254512,0.50000000000000011,0.8660254037844386,0.44228869021900147,0.89687274153268826,0.38268343236508984,0.92387953251128674,0.3214394653031617,0.94693012949510558,0.25881904510252096,0.9659258262890682,0.19509032201612833,0.98078528040323043,0.13052619222005171,0.99144486137381038,0.06540312923014327,0.99785892323860348,0,0,0.99144486137381038,0.13052619222005157,0.96592582628906831,0.25881904510252074,0.92387953251128674,0.38268343236508978,0.86602540378443871,0.49999999999999994,0.79335334029123528,0.60876142900872054,0,0,0.96592582628906831,0.25881904510252074,0.86602540378443871,0.49999999999999994,0.70710678118654757,0.70710678118654746,0.50000000000000011,0.8660254037844386,0.25881904510252096,0.9659258262890682,0,0,0.92387953251128674,0.38268343236508978,0.70710678118654757,0.70710678118654746,0.38268343236508984,0.92387953251128674,6.123233995736766e-17,1,-0.38268343236508973,0.92387953251128674,0,0,0.86602540378443871,0.49999999999999994,0,0.50000000000000011,0.8660254037844386,0,6.123233995736766e-17,1,0,0,0]} diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/fixtures/c/fftpack/runner.c b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/fixtures/c/fftpack/runner.c new file mode 100644 index 000000000000..6f783f0bf820 --- /dev/null +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/fixtures/c/fftpack/runner.c @@ -0,0 +1,286 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** +* Generate FFTPACK test fixtures. +* +* ## Notes +* +* - Run this script from the directory in which fixtures should be written. +* +*/ + +#include +#include +#include + +/** +* Define prototypes for external functions. +*/ +extern void rffti( int n, double *wsave ); + +/** +* Generates a random number on the interval [0,1]. +* +* @return random number +*/ +double rand_double( void ) { + int r = rand(); + return (double)r / ( (double)RAND_MAX + 1.0 ); +} + +/** +* Generates an array of pseudorandom integers drawn from a uniform distribution. +* +* ## Notes +* +* - WARNING: the method used here is not particularly robust, as some integer values may be sampled more frequently than others. +* +* +* @param out output array +* @param len array length +* @param a lower bound (inclusive) +* @param b upper bound (exclusive) +*/ +void rand_array_i32( int *out, const unsigned int len, const int a, const int b ) { + unsigned int i; + unsigned int r; + double delta; + + delta = (double)b - (double)a; + + for ( i = 0; i < len; i++ ) { + r = (unsigned int)( delta * rand_double() ); // truncation + out[ i ] = (int)( a + r ); + } +} + +/** +* Writes an array of doubles to a file as a series of comma-separated values. +* +* @param f file to write to +* @param x array of doubles +* @param len array length +*/ +void write_array_f64( FILE *f, const double *x, const unsigned int len ) { + unsigned int i; + + for ( i = 0; i < len; i++ ) { + fprintf( f, "%.17g", x[ i ] ); + if ( i < len-1 ) { + fprintf( f, "," ); + } + } +} + +/** +* Writes an array of integers to a file as a series of comma-separated values. +* +* @param f file to write to +* @param x array of integers +* @param len array length +*/ +void write_array_i32( FILE *f, const int *x, const unsigned int len ) { + unsigned int i; + + for ( i = 0; i < len; i++ ) { + fprintf( f, "%d", x[ i ] ); + if ( i < len-1 ) { + fprintf( f, "," ); + } + } +} + +/** +* Writes a named array of doubles to a file as JSON. +* +* @param f file to write to +* @param name array name +* @param x data +* @param len array length +*/ +void write_named_array_f64( FILE *f, const char *name, const double *x, const unsigned int len ) { + fprintf( f, "\"%s\":[", name ); + write_array_f64( f, x, len ); + fprintf( f, "]" ); +} + +/** +* Writes a named array of integers to a file as JSON. +* +* @param f file to write to +* @param name array name +* @param x data +* @param len array length +*/ +void write_named_array_i32( FILE *f, const char *name, const int *x, const unsigned int len ) { + fprintf( f, "\"%s\":[", name ); + write_array_i32( f, x, len ); + fprintf( f, "]" ); +} + +/** +* Writes data to a file as JSON. +* +* ## Notes +* +* - This function SHOULD be tailored to the input data (e.g., input types, output types, number of arguments, etc) and may vary from use case to use case. +* +* +* @param f file to write to +* @param lengths sequence lengths +* @param offsets twiddle offsets +* @param twiddles twiddle factors +* @param num number of sequence lengths +* @param total total number of twiddle values +*/ +void write_data_as_json( FILE *f, const int *lengths, const int *offsets, const double *twiddles, const unsigned int num, const unsigned int total ) { + fprintf( f, "{" ); + write_named_array_i32( f, "lengths", lengths, num ); + fprintf( f, "," ); + write_named_array_i32( f, "offsets", offsets, num ); + fprintf( f, "," ); + write_named_array_f64( f, "twiddles", twiddles, total ); + fprintf( f, "}\n" ); +} + +/** +* Generates test fixtures. +* +* @param lengths sequence lengths +* @param offsets twiddle offsets into flat output array +* @param num number of sequence lengths +* @param total total number of twiddle values +* @param name output filename +*/ +void generate( const int *lengths, const int *offsets, const unsigned int num, const unsigned int total, const char *name ) { + unsigned int i; + unsigned int j; + double *twiddles; + double *wsave; + FILE *f; + int off; + int n; + + // Allocate an output array: + twiddles = (double*) malloc( total * sizeof(double) ); + if ( twiddles == NULL ) { + printf( "Error allocating memory.\n" ); + exit( 1 ); + } + + // Generate fixture data: + for ( i = 0; i < num; i++ ) { + n = lengths[ i ]; + wsave = (double*) calloc( 2*n + 15, sizeof(double) ); + if ( wsave == NULL ) { + printf( "Error allocating memory.\n" ); + exit( 1 ); + } + rffti( n, wsave ); + + // Copy twiddle region into flat array (N-1 values starting at wsave[n]): + off = offsets[ i ]; + for ( j = 0; j < (unsigned int)( n - 1 ); j++ ) { + twiddles[ off + j ] = wsave[ n + j ]; + } + free( wsave ); + } + // Open a new file: + f = fopen( name, "w" ); + if ( f == NULL ) { + printf( "Error opening file.\n" ); + exit( 1 ); + } + + // Write data as JSON: + write_data_as_json( f, lengths, offsets, twiddles, num, total ); + + // Close the file: + fclose( f ); + + // Free allocated memory: + free( twiddles ); +} + +/** +* Computes offsets into a flat twiddle array for each sequence length. +* +* @param offsets output array of offsets +* @param lengths sequence lengths +* @param num number of sequence lengths +* @return total number of twiddle values +*/ +unsigned int compute_offsets( int *offsets, const int *lengths, const unsigned int num ) { + unsigned int total; + unsigned int i; + + total = 0; + for ( i = 0; i < num; i++ ) { + offsets[ i ] = total; + total += lengths[ i ] - 1; + } + return total; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + unsigned int total; + unsigned int num; + int *lengths; + int *offsets; + + // Use the current time to seed the random number generator: + srand( time( NULL ) ); + + // Define the number of sequence lengths per range: + num = 10; + + // Allocate arrays: + lengths = (int*) malloc( num * sizeof(int) ); + if ( lengths == NULL ) { + printf( "Error allocating memory.\n" ); + exit( 1 ); + } + offsets = (int*) malloc( num * sizeof(int) ); + if ( offsets == NULL ) { + printf( "Error allocating memory.\n" ); + exit( 1 ); + } + + // Generate fixture data: + rand_array_i32( lengths, num, 2, 16 ); + total = compute_offsets( offsets, lengths, num ); + generate( lengths, offsets, num, total, "small.json" ); + + rand_array_i32( lengths, num, 16, 128 ); + total = compute_offsets( offsets, lengths, num ); + generate( lengths, offsets, num, total, "medium.json" ); + + rand_array_i32( lengths, num, 128, 1024 ); + total = compute_offsets( offsets, lengths, num ); + generate( lengths, offsets, num, total, "large.json" ); + + // Free allocated memory: + free( lengths ); + free( offsets ); + + return 0; +} diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/fixtures/c/fftpack/small.json b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/fixtures/c/fftpack/small.json new file mode 100644 index 000000000000..fbf7013f13bc --- /dev/null +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/fixtures/c/fftpack/small.json @@ -0,0 +1 @@ +{"lengths":[13,13,12,9,14,4,5,5,15,11],"offsets":[0,12,24,35,43,56,59,63,67,81],"twiddles":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.86602540378443871,0.49999999999999994,0,0.50000000000000011,0.8660254037844386,0,6.123233995736766e-17,1,0,0,0,0.76604444311897801,0.64278760968653925,0,0.17364817766693041,0.98480775301220802,0,0,0,0.90096886790241915,0.43388373911755812,0.62348980185873359,0.7818314824680298,0.22252093395631445,0.97492791218182362,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.91354545764260087,0.40673664307580015,0.66913060635885824,0.74314482547739424,0,0.66913060635885824,0.74314482547739424,-0.10452846326765333,0.9945218953682734,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]} diff --git a/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/test.js b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/test.js new file mode 100644 index 000000000000..8173a6ee269a --- /dev/null +++ b/lib/node_modules/@stdlib/fft/base/fftpack/rffti/test/test.js @@ -0,0 +1,231 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var Float64Array = require( '@stdlib/array/float64' ); +var isAlmostSameValue = require( '@stdlib/number/float64/base/assert/is-almost-same-value' ); +var rffti = require( './../lib' ); + + +// FIXTURES // + +var small = require( './fixtures/c/fftpack/small.json' ); +var medium = require( './fixtures/c/fftpack/medium.json' ); +var large = require( './fixtures/c/fftpack/large.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof rffti, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function has an arity of 4', function test( t ) { + t.strictEqual( rffti.length, 4, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a reference to the workspace array', function test( t ) { + var workspace; + var out; + var N; + + N = 8; + workspace = new Float64Array( ( 2*N ) + 34 ); + out = rffti( N, workspace, 1, 0 ); + + t.strictEqual( out, workspace, 'same reference' ); + t.end(); +}); + +tape( 'the function correctly initializes twiddle factors (small sequence lengths)', function test( t ) { + var workspace; + var expected; + var lengths; + var offsets; + var ulps; + var off; + var y; + var e; + var N; + var i; + var k; + + lengths = small.lengths; + offsets = small.offsets; + expected = small.twiddles; + + ulps = 1; + for ( k = 0; k < lengths.length; k++ ) { + N = lengths[ k ]; + off = offsets[ k ]; + workspace = new Float64Array( ( 2*N ) + 34 ); + rffti( N, workspace, 1, 0 ); + + t.strictEqual( workspace[ N ], 0.0, 'returns expected value' ); + for ( i = 0; i < N-1; i++ ) { + y = workspace[ N+i+1 ]; + e = expected[ off+i ]; + t.strictEqual( isAlmostSameValue( y, e, ulps ), true, 'within '+ulps+' ULPs. N: '+N+'. y: '+y+'. E: '+e ); + } + } + t.end(); +}); + +tape( 'the function correctly initializes twiddle factors (medium sequence lengths)', function test( t ) { + var workspace; + var expected; + var lengths; + var offsets; + var ulps; + var off; + var y; + var e; + var N; + var i; + var k; + + lengths = medium.lengths; + offsets = medium.offsets; + expected = medium.twiddles; + + ulps = 1; + for ( k = 0; k < lengths.length; k++ ) { + N = lengths[ k ]; + off = offsets[ k ]; + workspace = new Float64Array( ( 2*N ) + 34 ); + rffti( N, workspace, 1, 0 ); + + t.strictEqual( workspace[ N ], 0.0, 'returns expected value' ); + for ( i = 0; i < N-1; i++ ) { + y = workspace[ N+i+1 ]; + e = expected[ off+i ]; + t.strictEqual( isAlmostSameValue( y, e, ulps ), true, 'within '+ulps+' ULPs. N: '+N+'. y: '+y+'. E: '+e ); + } + } + t.end(); +}); + +tape( 'the function correctly initializes twiddle factors (large sequence lengths)', function test( t ) { + var workspace; + var expected; + var lengths; + var offsets; + var ulps; + var off; + var y; + var e; + var N; + var i; + var k; + + lengths = large.lengths; + offsets = large.offsets; + expected = large.twiddles; + + ulps = 1; + for ( k = 0; k < lengths.length; k++ ) { + N = lengths[ k ]; + off = offsets[ k ]; + workspace = new Float64Array( ( 2*N ) + 34 ); + rffti( N, workspace, 1, 0 ); + + t.strictEqual( workspace[ N ], 0.0, 'returns expected value' ); + for ( i = 0; i < N-1; i++ ) { + y = workspace[ N+i+1 ]; + e = expected[ off+i ]; + t.strictEqual( isAlmostSameValue( y, e, ulps ), true, 'within '+ulps+' ULPs. N: '+N+'. y: '+y+'. E: '+e ); + } + } + t.end(); +}); + +tape( 'the function does not modify the scratch region of the workspace', function test( t ) { + var workspace; + var N; + var i; + + N = 8; + workspace = new Float64Array( ( 2*N ) + 34 ); + + for ( i = 0; i < workspace.length; i++ ) { + workspace[ i ] = i + 1.0; + } + rffti( N, workspace, 1, 0 ); + for ( i = 0; i < N; i++ ) { + t.strictEqual( workspace[ i ], i + 1.0, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function does not modify the workspace when N is 1', function test( t ) { + var workspace; + var expected; + var N; + var i; + + N = 1; + workspace = new Float64Array( ( 2*N ) + 34 ); + for ( i = 0; i < workspace.length; i++ ) { + workspace[ i ] = i + 1.0; + } + expected = new Float64Array( workspace ); + + rffti( N, workspace, 1, 0 ); + + t.deepEqual( workspace, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function correctly handles stride and offset parameters', function test( t ) { + var workspace; + var expected; + var stride; + var offset; + var nf; + var N; + var i; + + N = 8; + stride = 2; + offset = 3; + workspace = new Float64Array( offset + ( ( ( 2*N ) + 34 ) * stride ) ); + + rffti( N, workspace, stride, offset ); + + t.strictEqual( workspace[ offset + ( 2*N * stride ) ], N, 'returns expected value' ); + + nf = workspace[ offset + ( ( ( 2*N ) + 1 ) * stride ) ]; + t.strictEqual( nf, 2, 'returns expected value' ); + t.strictEqual( workspace[ offset + ( ( ( 2*N ) + 2 ) * stride ) ], 2, 'returns expected value' ); + t.strictEqual( workspace[ offset + ( ( ( 2*N ) + 3 ) * stride ) ], 4, 'returns expected value' ); + + expected = new Float64Array( ( 2*N ) + 34 ); + rffti( N, expected, 1, 0 ); + + for ( i = 0; i < N-1; i++ ) { + t.strictEqual( workspace[ offset + ( ( N+i+1 ) * stride ) ], expected[ N+i+1 ], 'returns expected value' ); + } + t.end(); +});