diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/README.md b/lib/node_modules/@stdlib/math/base/special/cexpf/README.md new file mode 100644 index 000000000000..3a61a6e70fb5 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/README.md @@ -0,0 +1,216 @@ + + +# cexpf + +> Evaluate the [exponential][exponential-function] function for a single-precision complex floating-point number. + +
+ +The [exponential][exponential-function] function of a complex number is defined as + + + +```math +\mathop{\mathrm{exp}}(z) = e^{x + i y} = (\exp{x}) (\cos(y) + i \sin(y)) +``` + + + +
+ + + +
+ +## Usage + +```javascript +var cexpf = require( '@stdlib/math/base/special/cexpf' ); +``` + +#### cexpf( z ) + +Evaluates the [exponential][exponential-function] function for a single-precision complex floating-point number. + +```javascript +var Complex64 = require( '@stdlib/complex/float32/ctor' ); + +var v = cexpf( new Complex64( 0.0, 0.0 ) ); +// returns [ 1.0, 0.0 ] + +v = cexpf( new Complex64( 0.0, 1.0 ) ); +// returns [ ~0.540, ~0.841 ] +``` + +
+ + + +
+ +## Examples + + + +```javascript +var Complex64Array = require( '@stdlib/array/complex64' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var cexpf = require( '@stdlib/math/base/special/cexpf' ); + +// Create an array of random numbers: +var arr = new Complex64Array( uniform( 200, -50.0, 50.0 ) ); + +// Compute the exponential function of each number in the array: +logEachMap( 'cexpf(%s) = %s', arr, cexpf ); +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/cexpf.h" +``` + +#### stdlib_base_cexpf( z ) + +Evaluates the [exponential][exponential-function] function for a single-precision complex floating-point number. + +```c +#include "stdlib/complex/float32/ctor.h" +#include "stdlib/complex/float32/real.h" +#include "stdlib/complex/float32/imag.h" + +stdlib_complex64_t z = stdlib_complex64( 0.0f, 0.0f ); +stdlib_complex64_t out = stdlib_base_cexpf( z ); + +float re = stdlib_complex64_real( out ); +// returns 1.0f + +float im = stdlib_complex64_imag( out ); +// returns 0.0f +``` + +The function accepts the following arguments: + +- **z**: `[in] stdlib_complex64_t` input value. + +```c +stdlib_complex64_t stdlib_base_cexpf( const stdlib_complex64_t z ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/cexpf.h" +#include "stdlib/complex/float32/ctor.h" +#include "stdlib/complex/float32/reim.h" +#include + +int main( void ) { + const stdlib_complex64_t x[] = { + stdlib_complex64( 3.14f, 1.5f ), + stdlib_complex64( -3.14f, -1.5f ), + stdlib_complex64( 0.0f, 0.0f ), + stdlib_complex64( 0.0f/0.0f, 0.0f/0.0f ) + }; + + stdlib_complex64_t v; + stdlib_complex64_t y; + float re1; + float im1; + float re2; + float im2; + int i; + for ( i = 0; i < 4; i++ ) { + v = x[ i ]; + y = stdlib_base_cexpf( v ); + stdlib_complex64_reim( v, &re1, &im1 ); + stdlib_complex64_reim( y, &re2, &im2 ); + printf( "cexpf(%f + %fi) = %f + %fi\n", re1, im1, re2, im2 ); + } +} +``` + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/benchmark.js new file mode 100644 index 000000000000..b216588ab8ba --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/benchmark.js @@ -0,0 +1,58 @@ +/** +* @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 uniform = require( '@stdlib/random/base/uniform' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); +var realf = require( '@stdlib/complex/float32/real' ); +var imagf = require( '@stdlib/complex/float32/imag' ); +var pkg = require( './../package.json' ).name; +var cexpf = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var values; + var y; + var i; + + values = [ + new Complex64( uniform( -50.0, 50.0 ), uniform( -50.0, 50.0 ) ), + new Complex64( uniform( -50.0, 50.0 ), uniform( -50.0, 50.0 ) ) + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = cexpf( values[ i%values.length ] ); + if ( isnanf( realf( y ) ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnanf( imagf( y ) ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/benchmark.native.js new file mode 100644 index 000000000000..ad651b3e1aee --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/benchmark.native.js @@ -0,0 +1,68 @@ +/** +* @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 resolve = require( 'path' ).resolve; +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/base/uniform' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var realf = require( '@stdlib/complex/float32/real' ); +var imagf = require( '@stdlib/complex/float32/imag' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var cexpf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( cexpf instanceof Error ) +}; + + +// MAIN // + +bench( format( '%s::native', pkg ), opts, function benchmark( b ) { + var values; + var y; + var i; + + values = [ + new Complex64( uniform( -50.0, 50.0 ), uniform( -50.0, 50.0 ) ), + new Complex64( uniform( -50.0, 50.0 ), uniform( -50.0, 50.0 ) ) + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = cexpf( values[ i%values.length ] ); + if ( isnanf( realf( y ) ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnanf( imagf( y ) ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/c/Makefile b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/c/Makefile new file mode 100644 index 000000000000..928de45a1a06 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/c/Makefile @@ -0,0 +1,127 @@ +#/ +# @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 := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [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 +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +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], [2][2]). +# +# [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 := benchmark.out + + +# RULES # + +#/ +# Compiles C source files. +# +# @param {string} [C_COMPILER] - C compiler +# @param {string} [CFLAGS] - C compiler flags +# @param {(string|void)} [fPIC] - compiler 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 - compiler flag indicating whether to generate position independent code +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm + +#/ +# Runs compiled benchmarks. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/c/benchmark.c new file mode 100644 index 000000000000..7124022d93f8 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/c/benchmark.c @@ -0,0 +1,142 @@ +/** +* @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. +*/ + +#include +#include +#include +#include +#include +#include + +#define NAME "cexpf" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +static void print_version( void ) { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +static void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +static void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +static double tic( void ) { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Generates a random number on the interval [min,max). +* +* @param min minimum value (inclusive) +* @param max maximum value (exclusive) +* @return random number +*/ +static float random_uniform( const float min, const float max ) { + float v = (float)rand() / ( (float)RAND_MAX + 1.0f ); + return min + ( v*(max-min) ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + float complex z[ 100 ]; + float complex w; + double elapsed; + double t; + float re; + float im; + int i; + + for ( i = 0; i < 100; i++ ) { + re = random_uniform( -50.0f, 50.0f ); + im = random_uniform( -50.0f, 50.0f ); + z[ i ] = re + im*I; + } + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + w = cexpf( z[ i%100 ] ); + if ( w != w ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( w != w ) { + printf( "should not return NaN\n" ); + } + return elapsed; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + double elapsed; + int i; + + // Use the current time to seed the random number generator: + srand( time( NULL ) ); + + print_version(); + for ( i = 0; i < REPEATS; i++ ) { + printf( "# c::%s\n", NAME ); + elapsed = benchmark(); + print_results( elapsed ); + printf( "ok %d benchmark finished\n", i+1 ); + } + print_summary( REPEATS, REPEATS ); +} diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/c/native/Makefile b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/c/native/Makefile new file mode 100644 index 000000000000..979768abbcec --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/c/native/Makefile @@ -0,0 +1,146 @@ +#/ +# @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 := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [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 +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +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], [2][2]). +# +# [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 includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := benchmark.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled benchmarks. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/c/native/benchmark.c new file mode 100644 index 000000000000..0c9bb08088e3 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/c/native/benchmark.c @@ -0,0 +1,145 @@ +/** +* @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. +*/ + +#include "stdlib/math/base/special/cexpf.h" +#include "stdlib/complex/float32/ctor.h" +#include "stdlib/complex/float32/reim.h" +#include +#include +#include +#include +#include + +#define NAME "cexpf" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +static void print_version( void ) { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +static void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +static void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +static double tic( void ) { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Generates a random number on the interval [min,max). +* +* @param min minimum value (inclusive) +* @param max maximum value (exclusive) +* @return random number +*/ +static float random_uniform( const float min, const float max ) { + float v = (float)rand() / ( (float)RAND_MAX + 1.0f ); + return min + ( v*(max-min) ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + stdlib_complex64_t z[ 100 ]; + stdlib_complex64_t w; + double elapsed; + double t; + float re; + float im; + int i; + + for ( i = 0; i < 100; i++ ) { + re = random_uniform( -50.0f, 50.0f ); + im = random_uniform( -50.0f, 50.0f ); + z[ i ] = stdlib_complex64( re, im ); + } + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + w = stdlib_base_cexpf( z[ i%100 ] ); + stdlib_complex64_reim( w, &re, &im ); + if ( re != re ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( im != im ) { + printf( "should not return NaN\n" ); + } + return elapsed; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + double elapsed; + int i; + + // Use the current time to seed the random number generator: + srand( time( NULL ) ); + + print_version(); + for ( i = 0; i < REPEATS; i++ ) { + printf( "# c::native::%s\n", NAME ); + elapsed = benchmark(); + print_results( elapsed ); + printf( "ok %d benchmark finished\n", i+1 ); + } + print_summary( REPEATS, REPEATS ); +} diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/julia/REQUIRE b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/julia/REQUIRE new file mode 100644 index 000000000000..98645e192e41 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/julia/REQUIRE @@ -0,0 +1,2 @@ +julia 1.5 +BenchmarkTools 0.5.0 diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/julia/benchmark.jl b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/julia/benchmark.jl new file mode 100755 index 000000000000..47179f72f150 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/julia/benchmark.jl @@ -0,0 +1,144 @@ +#!/usr/bin/env julia +# +# @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 BenchmarkTools +using Printf + +# Benchmark variables: +name = "cexpf"; +repeats = 3; + +""" + print_version() + +Prints the TAP version. + +# Examples + +``` julia +julia> print_version() +``` +""" +function print_version() + @printf( "TAP version 13\n" ); +end + +""" + print_summary( total, passing ) + +Print the benchmark summary. + +# Arguments + +* `total`: total number of tests +* `passing`: number of passing tests + +# Examples + +``` julia +julia> print_summary( 3, 3 ) +``` +""" +function print_summary( total, passing ) + @printf( "#\n" ); + @printf( "1..%d\n", total ); # TAP plan + @printf( "# total %d\n", total ); + @printf( "# pass %d\n", passing ); + @printf( "#\n" ); + @printf( "# ok\n" ); +end + +""" + print_results( iterations, elapsed ) + +Print benchmark results. + +# Arguments + +* `iterations`: number of iterations +* `elapsed`: elapsed time (in seconds) + +# Examples + +``` julia +julia> print_results( 1000000, 0.131009101868 ) +``` +""" +function print_results( iterations, elapsed ) + rate = iterations / elapsed + + @printf( " ---\n" ); + @printf( " iterations: %d\n", iterations ); + @printf( " elapsed: %0.9f\n", elapsed ); + @printf( " rate: %0.9f\n", rate ); + @printf( " ...\n" ); +end + +""" + benchmark() + +Run a benchmark. + +# Notes + +* Benchmark results are returned as a two-element array: [ iterations, elapsed ]. +* The number of iterations is not the true number of iterations. Instead, an 'iteration' is defined as a 'sample', which is a computed estimate for a single evaluation. +* The elapsed time is in seconds. + +# Examples + +``` julia +julia> out = benchmark(); +``` +""" +function benchmark() + t = BenchmarkTools.@benchmark exp(ComplexF32( (rand()*100.0)-50.0, (rand()*100.0)-50.0 )) samples=1e6 + + # Compute the total "elapsed" time and convert from nanoseconds to seconds: + s = sum( t.times ) / 1.0e9; + + # Determine the number of "iterations": + iter = length( t.times ); + + # Return the results: + [ iter, s ]; +end + +""" + main() + +Run benchmarks. + +# Examples + +``` julia +julia> main(); +``` +""" +function main() + print_version(); + for i in 1:repeats + @printf( "# julia::%s\n", name ); + results = benchmark(); + print_results( results[ 1 ], results[ 2 ] ); + @printf( "ok %d benchmark finished\n", i ); + end + print_summary( repeats, repeats ); +end + +main(); diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/python/benchmark.py b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/python/benchmark.py new file mode 100644 index 000000000000..3bb8f4e081ea --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/benchmark/python/benchmark.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python +# +# @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. + +"""Benchmark cexpf.""" + +from __future__ import print_function +import timeit + +NAME = "cexpf" +REPEATS = 3 +ITERATIONS = 1000000 + + +def print_version(): + """Print the TAP version.""" + print("TAP version 13") + + +def print_summary(total, passing): + """Print the benchmark summary. + + # Arguments + + * `total`: total number of tests + * `passing`: number of passing tests + + """ + print("#") + print("1.." + str(total)) # TAP plan + print("# total " + str(total)) + print("# pass " + str(passing)) + print("#") + print("# ok") + + +def print_results(elapsed): + """Print benchmark results. + + # Arguments + + * `elapsed`: elapsed time (in seconds) + + # Examples + + ``` python + python> print_results(0.131009101868) + ``` + """ + rate = ITERATIONS / elapsed + + print(" ---") + print(" iterations: " + str(ITERATIONS)) + print(" elapsed: " + str(elapsed)) + print(" rate: " + str(rate)) + print(" ...") + + +def benchmark(): + """Run the benchmark and print benchmark results.""" + setup = "from random import random; from cmath import exp;" + stmt = "re = (random()*100.0) - 50.0; im = (random()*100.0) - 50.0; y = exp(re + 1.0j * im);" + + t = timeit.Timer(stmt, setup=setup) + + print_version() + + for i in range(REPEATS): + print("# python::" + NAME) + elapsed = t.timeit(number=ITERATIONS) + print_results(elapsed) + print("ok " + str(i+1) + " benchmark finished") + + print_summary(REPEATS, REPEATS) + + +def main(): + """Run the benchmark.""" + benchmark() + + +if __name__ == "__main__": + main() diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/binding.gyp b/lib/node_modules/@stdlib/math/base/special/cexpf/binding.gyp new file mode 100644 index 000000000000..0d6508a12e99 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/binding.gyp @@ -0,0 +1,170 @@ +# @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. + +# A `.gyp` file for building a Node.js native add-on. +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # List of files to include in this file: + 'includes': [ + './include.gypi', + ], + + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Target name should match the add-on export name: + 'addon_target_name%': 'addon', + + # Set variables based on the host OS: + 'conditions': [ + [ + 'OS=="win"', + { + # Define the object file suffix: + 'obj': 'obj', + }, + { + # Define the object file suffix: + 'obj': 'o', + } + ], # end condition (OS=="win") + ], # end conditions + }, # end variables + + # Define compile targets: + 'targets': [ + + # Target to generate an add-on: + { + # The target name should match the add-on export name: + 'target_name': '<(addon_target_name)', + + # Define dependencies: + 'dependencies': [], + + # Define directories which contain relevant include headers: + 'include_dirs': [ + # Local include directory: + '<@(include_dirs)', + ], + + # List of source files: + 'sources': [ + '<@(src_files)', + ], + + # Settings which should be applied when a target's object files are used as linker input: + 'link_settings': { + # Define libraries: + 'libraries': [ + '<@(libraries)', + ], + + # Define library directories: + 'library_dirs': [ + '<@(library_dirs)', + ], + }, + + # C/C++ compiler flags: + 'cflags': [ + # Enable commonly used warning options: + '-Wall', + + # Aggressive optimization: + '-O3', + ], + + # C specific compiler flags: + 'cflags_c': [ + # Specify the C standard to which a program is expected to conform: + '-std=c99', + ], + + # C++ specific compiler flags: + 'cflags_cpp': [ + # Specify the C++ standard to which a program is expected to conform: + '-std=c++11', + ], + + # Linker flags: + 'ldflags': [], + + # Apply conditions based on the host OS: + 'conditions': [ + [ + 'OS=="mac"', + { + # Linker flags: + 'ldflags': [ + '-undefined dynamic_lookup', + '-Wl,-no-pie', + '-Wl,-search_paths_first', + ], + }, + ], # end condition (OS=="mac") + [ + 'OS!="win"', + { + # C/C++ flags: + 'cflags': [ + # Generate platform-independent code: + '-fPIC', + ], + }, + ], # end condition (OS!="win") + ], # end conditions + }, # end target <(addon_target_name) + + # Target to copy a generated add-on to a standard location: + { + 'target_name': 'copy_addon', + + # Declare that the output of this target is not linked: + 'type': 'none', + + # Define dependencies: + 'dependencies': [ + # Require that the add-on be generated before building this target: + '<(addon_target_name)', + ], + + # Define a list of actions: + 'actions': [ + { + 'action_name': 'copy_addon', + 'message': 'Copying addon...', + + # Explicitly list the inputs in the command-line invocation below: + 'inputs': [], + + # Declare the expected outputs: + 'outputs': [ + '<(addon_output_dir)/<(addon_target_name).node', + ], + + # Define the command-line invocation: + 'action': [ + 'cp', + '<(PRODUCT_DIR)/<(addon_target_name).node', + '<(addon_output_dir)/<(addon_target_name).node', + ], + }, + ], # end actions + }, # end target copy_addon + ], # end targets +} diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/cexpf/docs/repl.txt new file mode 100644 index 000000000000..2a1fea7b335d --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/docs/repl.txt @@ -0,0 +1,25 @@ + +{{alias}}( z ) + Evaluates the exponential function for a single-precision complex floating- + point number. + + Parameters + ---------- + z: Complex64 + Complex number. + + Returns + ------- + out: Complex64 + Complex number. + + Examples + -------- + > var y = {{alias}}( new {{alias:@stdlib/complex/float32/ctor}}( 0.0, 0.0 ) ) + [ 1.0, 0.0 ] + > y = {{alias}}( new {{alias:@stdlib/complex/float32/ctor}}( 0.0, 1.0 ) ) + [ ~0.540, ~0.841 ] + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/cexpf/docs/types/index.d.ts new file mode 100644 index 000000000000..445a251aefb6 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/docs/types/index.d.ts @@ -0,0 +1,48 @@ +/* +* @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 { Complex64 } from '@stdlib/types/complex'; + +/** +* Evaluates the exponential function for a single-precision complex floating-point number. +* +* @param z - complex number +* @returns result +* +* @example +* var Complex64 = require( '@stdlib/complex/float32/ctor' ); +* +* var v = cexpf( new Complex64( 0.0, 0.0 ) ); +* // returns [ 1.0, 0.0 ] +* +* @example +* var Complex64 = require( '@stdlib/complex/float32/ctor' ); +* +* var v = cexpf( new Complex64( 1.0, 0.0 ) ); +* // returns [ ~2.718, 0.0 ] +*/ +declare function cexpf( z: Complex64 ): Complex64; + + +// EXPORTS // + +export = cexpf; diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/special/cexpf/docs/types/test.ts new file mode 100644 index 000000000000..8d042f85f9ec --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/docs/types/test.ts @@ -0,0 +1,46 @@ +/* +* @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 Complex64 = require( '@stdlib/complex/float32/ctor' ); +import cexpf = require( './index' ); + + +// TESTS // + +// The function returns a complex number... +{ + cexpf( new Complex64( 1.0, 2.0 ) ); // $ExpectType Complex64 +} + +// The compiler throws an error if the function is provided a value other than a complex number... +{ + cexpf( 2 ); // $ExpectError + cexpf( true ); // $ExpectError + cexpf( false ); // $ExpectError + cexpf( null ); // $ExpectError + cexpf( undefined ); // $ExpectError + cexpf( '5' ); // $ExpectError + cexpf( [] ); // $ExpectError + cexpf( {} ); // $ExpectError + cexpf( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + cexpf(); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/examples/c/Makefile b/lib/node_modules/@stdlib/math/base/special/cexpf/examples/c/Makefile new file mode 100644 index 000000000000..c8f8e9a1517b --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @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 := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [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 +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +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], [2][2]). +# +# [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 includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := example.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled examples. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/cexpf/examples/c/example.c new file mode 100644 index 000000000000..74101b48850a --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/examples/c/example.c @@ -0,0 +1,46 @@ +/** +* @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. +*/ + +#include "stdlib/math/base/special/cexpf.h" +#include "stdlib/complex/float32/ctor.h" +#include "stdlib/complex/float32/reim.h" +#include + +int main( void ) { + const stdlib_complex64_t x[] = { + stdlib_complex64( 3.14f, 1.5f ), + stdlib_complex64( -3.14f, -1.5f ), + stdlib_complex64( 0.0f, 0.0f ), + stdlib_complex64( 0.0f/0.0f, 0.0f/0.0f ) + }; + + stdlib_complex64_t v; + stdlib_complex64_t y; + float re1; + float im1; + float re2; + float im2; + int i; + for ( i = 0; i < 4; i++ ) { + v = x[ i ]; + y = stdlib_base_cexpf( v ); + stdlib_complex64_reim( v, &re1, &im1 ); + stdlib_complex64_reim( y, &re2, &im2 ); + printf( "cexpf(%f + %fi) = %f + %fi\n", re1, im1, re2, im2 ); + } +} diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/examples/index.js b/lib/node_modules/@stdlib/math/base/special/cexpf/examples/index.js new file mode 100644 index 000000000000..f3c0360925a7 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/examples/index.js @@ -0,0 +1,30 @@ +/** +* @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 Complex64Array = require( '@stdlib/array/complex64' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var cexpf = require( './../lib' ); + +// Create an array of random numbers: +var arr = new Complex64Array( uniform( 200, -50.0, 50.0 ) ); + +// Compute the exponential function of each number in the array: +logEachMap( 'cexpf(%s) = %s', arr, cexpf ); diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/include.gypi b/lib/node_modules/@stdlib/math/base/special/cexpf/include.gypi new file mode 100644 index 000000000000..bee8d41a2caf --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/include.gypi @@ -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. + +# A GYP include file for building a Node.js native add-on. +# +# Main documentation: +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Source directory: + 'src_dir': './src', + + # Include directories: + 'include_dirs': [ + '[ ~2.718, 0.0 ] +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/lib/main.js b/lib/node_modules/@stdlib/math/base/special/cexpf/lib/main.js new file mode 100644 index 000000000000..ed9dfa50b683 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/lib/main.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 Complex64 = require( '@stdlib/complex/float32/ctor' ); +var copysignf = require( '@stdlib/math/base/special/copysignf' ); +var sincosf = require( '@stdlib/math/base/special/sincosf' ).assign; +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var isInfinitef = require( '@stdlib/math/base/assert/is-infinitef' ); +var expf = require( '@stdlib/math/base/special/expf' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var PINF = require( '@stdlib/constants/float32/pinf' ); +var NINF = require( '@stdlib/constants/float32/ninf' ); +var realf = require( '@stdlib/complex/float32/real' ); +var imagf = require( '@stdlib/complex/float32/imag' ); + + +// VARIABLES // + +var WORKSPACE = [ 0.0, 0.0 ]; + + +// MAIN // + +/** +* Evaluates the exponential function for a single-precision complex floating-point number. +* +* @param {Complex64} z - complex number +* @returns {Complex64} result +* +* @example +* var Complex64 = require( '@stdlib/complex/float32/ctor' ); +* var cexpf = require( '@stdlib/math/base/special/cexpf' ); +* +* var v = cexpf( new Complex64( 0.0, 0.0 ) ); +* // returns [ 1.0, 0.0 ] +* +* @example +* var Complex64 = require( '@stdlib/complex/float32/ctor' ); +* var cexpf = require( '@stdlib/math/base/special/cexpf' ); +* +* var v = cexpf( new Complex64( 1.0, 0.0 ) ); +* // returns [ ~2.718, 0.0 ] +*/ +function cexpf( z ) { + var im; + var re; + var e; + + re = realf( z ); + im = imagf( z ); + + if ( isnanf( re ) ) { + re = NaN; + im = ( im === 0.0 ) ? im : re; + } else if ( isInfinitef( im ) ) { + if ( re === PINF ) { + re = -re; + im = NaN; + } else if ( re === NINF ) { + re = -0.0; + im = copysignf( 0.0, im ); + } else { + re = NaN; + im = NaN; + } + } else { + e = expf( re ); + if ( im === 0.0 ) { + re = e; + } else { + sincosf( im, WORKSPACE, 1, 0 ); + re = f32( WORKSPACE[ 1 ] * e ); + im = f32( WORKSPACE[ 0 ] * e ); + } + } + return new Complex64( re, im ); +} + + +// EXPORTS // + +module.exports = cexpf; diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/lib/native.js b/lib/node_modules/@stdlib/math/base/special/cexpf/lib/native.js new file mode 100644 index 000000000000..c4429c4bc428 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/lib/native.js @@ -0,0 +1,58 @@ +/** +* @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 Complex64 = require( '@stdlib/complex/float32/ctor' ); +var addon = require( './../src/addon.node' ); + + +// MAIN // + +/** +* Evaluates the exponential function for a single-precision complex floating-point number. +* +* @private +* @param {Complex64} z - complex number +* @returns {Complex64} result +* +* @example +* var Complex64 = require( '@stdlib/complex/float32/ctor' ); +* var cexpf = require( '@stdlib/math/base/special/cexpf' ); +* +* var v = cexpf( new Complex64( 0.0, 0.0 ) ); +* // returns [ 1.0, 0.0 ] +* +* @example +* var Complex64 = require( '@stdlib/complex/float32/ctor' ); +* var cexpf = require( '@stdlib/math/base/special/cexpf' ); +* +* var v = cexpf( new Complex64( 1.0, 0.0 ) ); +* // returns [ ~2.718, 0.0 ] +*/ +function cexpf( z ) { + var v = addon( z ); + return new Complex64( v.re, v.im ); +} + + +// EXPORTS // + +module.exports = cexpf; diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/manifest.json b/lib/node_modules/@stdlib/math/base/special/cexpf/manifest.json new file mode 100644 index 000000000000..810cf1d2adaf --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/manifest.json @@ -0,0 +1,99 @@ +{ + "options": { + "task": "build" + }, + "fields": [ + { + "field": "src", + "resolve": true, + "relative": true + }, + { + "field": "include", + "resolve": true, + "relative": true + }, + { + "field": "libraries", + "resolve": false, + "relative": false + }, + { + "field": "libpath", + "resolve": true, + "relative": false + } + ], + "confs": [ + { + "task": "build", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/napi/unary", + "@stdlib/math/base/special/expf", + "@stdlib/math/base/special/sincosf", + "@stdlib/math/base/assert/is-nanf", + "@stdlib/math/base/assert/is-infinitef", + "@stdlib/math/base/special/copysignf", + "@stdlib/constants/float32/ninf", + "@stdlib/constants/float32/pinf", + "@stdlib/constants/float32/nan", + "@stdlib/complex/float32/ctor", + "@stdlib/complex/float32/reim" + ] + }, + { + "task": "benchmark", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/special/expf", + "@stdlib/math/base/special/sincosf", + "@stdlib/math/base/assert/is-nanf", + "@stdlib/math/base/assert/is-infinitef", + "@stdlib/math/base/special/copysignf", + "@stdlib/constants/float32/ninf", + "@stdlib/constants/float32/pinf", + "@stdlib/constants/float32/nan", + "@stdlib/complex/float32/ctor", + "@stdlib/complex/float32/reim" + ] + }, + { + "task": "examples", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/special/expf", + "@stdlib/math/base/special/sincosf", + "@stdlib/math/base/assert/is-nanf", + "@stdlib/math/base/assert/is-infinitef", + "@stdlib/math/base/special/copysignf", + "@stdlib/constants/float32/ninf", + "@stdlib/constants/float32/pinf", + "@stdlib/constants/float32/nan", + "@stdlib/complex/float32/ctor", + "@stdlib/complex/float32/reim" + ] + } + ] +} diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/package.json b/lib/node_modules/@stdlib/math/base/special/cexpf/package.json new file mode 100644 index 000000000000..918a1b08e48b --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/package.json @@ -0,0 +1,200 @@ +{ + "name": "@stdlib/math/base/special/cexpf", + "version": "0.0.0", + "description": "Evaluate the exponential function for a single-precision complex floating-point number.", + "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", + "gypfile": true, + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "include": "./include", + "lib": "./lib", + "src": "./src", + "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", + "stdmath", + "mathematics", + "math", + "arithmetic", + "complex", + "cmplx", + "number", + "exponential", + "exp", + "pow", + "cexpf" + ], + "__stdlib__": { + "scaffold": { + "$schema": "math/base@v1.0", + "base_alias": "cexp", + "alias": "cexpf", + "pkg_desc": "evaluate the exponential function for a single-precision complex floating-point number", + "desc": "evaluates the exponential function for a single-precision complex floating-point number", + "short_desc": "exponential function", + "parameters": [ + { + "name": "x", + "desc": "input value", + "type": { + "javascript": "Complex64", + "jsdoc": "Complex64", + "c": "stdlib_complex64_t", + "dtype": "complex64" + }, + "domain": null, + "rand": { + "prng": "random/base/uniform", + "parameters": [ + [ + -10, + 10 + ], + [ + -10, + 10 + ] + ] + }, + "example_values": [ + { + "re": -3.14, + "im": -1.5 + }, + { + "re": 0, + "im": 0 + }, + { + "re": -1.5, + "im": 2.5 + }, + { + "re": 2.5, + "im": -1.5 + }, + { + "re": 0, + "im": -3.7 + }, + { + "re": 4.2, + "im": 0 + }, + { + "re": 21.2, + "im": 3 + }, + { + "re": 11, + "im": -5 + }, + { + "re": 33, + "im": -14.67 + }, + { + "re": -42, + "im": 9.3 + }, + { + "re": -3, + "im": 3 + }, + { + "re": 73, + "im": 31 + }, + { + "re": -2.45, + "im": 1.23 + }, + { + "re": 2.45, + "im": -1.23 + }, + { + "re": 1.77, + "im": -3.14 + }, + { + "re": -7.5, + "im": 8.2 + }, + { + "re": 5.5, + "im": -12.3 + }, + { + "re": -15.8, + "im": 0.4 + }, + { + "re": 0.99, + "im": -0.99 + } + ] + } + ], + "returns": { + "desc": "function value", + "type": { + "javascript": "Complex64", + "jsdoc": "Complex64", + "c": "stdlib_complex64_t", + "dtype": "complex64" + } + }, + "keywords": [ + "complex", + "cmplx", + "exponential", + "exp", + "pow", + "cexpf" + ], + "extra_keywords": [] + } + } +} diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/src/Makefile b/lib/node_modules/@stdlib/math/base/special/cexpf/src/Makefile new file mode 100644 index 000000000000..2caf905cedbe --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/src/Makefile @@ -0,0 +1,70 @@ +#/ +# @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 := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [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 +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + + +# RULES # + +#/ +# Removes generated files for building an add-on. +# +# @example +# make clean-addon +#/ +clean-addon: + $(QUIET) -rm -f *.o *.node + +.PHONY: clean-addon + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: clean-addon + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/src/addon.c b/lib/node_modules/@stdlib/math/base/special/cexpf/src/addon.c new file mode 100644 index 000000000000..de7bba9fb2d5 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/src/addon.c @@ -0,0 +1,22 @@ +/** +* @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. +*/ + +#include "stdlib/math/base/special/cexpf.h" +#include "stdlib/math/base/napi/unary.h" + +STDLIB_MATH_BASE_NAPI_MODULE_C_C( stdlib_base_cexpf ) diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/src/main.c b/lib/node_modules/@stdlib/math/base/special/cexpf/src/main.c new file mode 100644 index 000000000000..b6890b8aaefb --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/src/main.c @@ -0,0 +1,83 @@ +/** +* @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. +*/ + +#include "stdlib/math/base/special/cexpf.h" +#include "stdlib/math/base/special/expf.h" +#include "stdlib/math/base/special/sincosf.h" +#include "stdlib/math/base/assert/is_nanf.h" +#include "stdlib/math/base/assert/is_infinitef.h" +#include "stdlib/math/base/special/copysignf.h" +#include "stdlib/constants/float32/pinf.h" +#include "stdlib/constants/float32/ninf.h" +#include "stdlib/constants/float32/nan.h" +#include "stdlib/complex/float32/ctor.h" +#include "stdlib/complex/float32/reim.h" + +/** +* Evaluates the exponential function of a single-precision complex floating-point number. +* +* @param z input value +* @return result +* +* @example +* #include "stdlib/complex/float32/ctor.h" +* #include "stdlib/complex/float32/real.h" +* #include "stdlib/complex/float32/imag.h" +* +* stdlib_complex64_t z = stdlib_complex64( 0.0f, 0.0f ); +* stdlib_complex64_t out = stdlib_base_cexpf( z ); +* +* float re = stdlib_complex64_real( out ); +* // returns 1.0f +* +* float im = stdlib_complex64_imag( out ); +* // returns 0.0f +*/ +stdlib_complex64_t stdlib_base_cexpf( const stdlib_complex64_t z ) { + float re; + float im; + float e; + + stdlib_complex64_reim( z, &re, &im ); + + if ( stdlib_base_is_nanf( re ) ) { + re = STDLIB_CONSTANT_FLOAT32_NAN; + im = ( im == 0.0f ) ? im : re; + } else if ( stdlib_base_is_infinitef( im ) ) { + if ( re == STDLIB_CONSTANT_FLOAT32_PINF ) { + re = -re; + im = STDLIB_CONSTANT_FLOAT32_NAN; + } else if ( re == STDLIB_CONSTANT_FLOAT32_NINF ) { + re = -0.0f; + im = stdlib_base_copysignf( 0.0f, im ); + } else { + re = STDLIB_CONSTANT_FLOAT32_NAN; + im = STDLIB_CONSTANT_FLOAT32_NAN; + } + } else { + e = stdlib_base_expf( re ); + if ( im == 0.0f ) { + re = e; + } else { + stdlib_base_sincosf( im, &im, &re ); + re *= e; + im *= e; + } + } + return stdlib_complex64( re, im ); +} diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/test/fixtures/julia/REQUIRE b/lib/node_modules/@stdlib/math/base/special/cexpf/test/fixtures/julia/REQUIRE new file mode 100644 index 000000000000..308c3be89c85 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/test/fixtures/julia/REQUIRE @@ -0,0 +1,2 @@ +julia 1.5 +JSON 0.21 diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/test/fixtures/julia/general_complex.json b/lib/node_modules/@stdlib/math/base/special/cexpf/test/fixtures/julia/general_complex.json new file mode 100644 index 000000000000..4548bbf69833 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/test/fixtures/julia/general_complex.json @@ -0,0 +1 @@ +{"expim":[0.23375246,-1.6129425e32,1.3655952e17,-1.5633736e19,7.2921054e17,-2.7042375e22,-6670.1465,4.955994e27,-4.123809e23,-1.0350542e27,-5405.599,46.710632,172.31241,-16811.338,6.8819795e6,-1.0972322e25,-316.06796,-2.1564774e9,-77136.9,1.0691778e9,-1.4450802,15745.898,-1.1910278e29,-1.00243725e27,3738.8093,-0.579794,2.981645e8,-2.2533037e19,61.380943,-2.3965719e19,5.499248e11,7.608034e31,-4775.6753,2.84124e26,4.246292e10,-1.8480647e25,-8.146405e10,-0.0026018445,-1.9743042e17,112351.55,30.430626,6.2755003e29,-2.3434278e25,-2.033315e28,-1.081223e22,-1.0512601e21,5.170523e13,-0.0068565095,1896.4393,7.739782e13,-9.635446e10,1.3962104e33,-5.5249148e32,-7.1549983e37,-5.4116724e12,3.991954e11,7.861864e35,-4.4650806e21,-1.1359718e16,-72689.3,-5.6873165e10,2.523501e26,8.8488595e29,-2.5058793e37,-3801.6648,9.897404e20,-6.1665205e22,1.0450878e15,6.384059e36,1.6677722e28,-3.134413e23,5.5967713e23,3.7037948e22,6.720906e12,-7.845866e27,1.3807269e30,118.99218,5.635926e18,-0.0040527126,1.6385855e12,8.22915e23,3.2472975e28,1.2885838e16,-1.07359696e18,1.7777076e21,3.2339317e25,6.026838e26,-6.160673e8,4.729263e11,2.5958752e20,-1.6258384e34,25542.564,2.375555e36,3.6331394e27,-1.7488048e6,-2.0126148e15,1.8124541e18,-7.320723e11,-1.1342366e11,5.801563e21,-6.8752925e6,-1.6702777,1.8538708e13,-7.677006e14,-6.0158068e13,-9.633878e12,-2.8921144e25,-5.3085292e13,1.3214167e31,-2.338284e32,3.413965e21,0.7047319,1.4372317e37,-1034.3773,1.9866275e8,2.727006e8,-5.3633595e25,-1.6566532e31,2.0695768e12,-2.1322304e37,-1.5267587e36,-3.8175406e33,-267.09424,3.958236e32,-1.6046311e18,8.842213e19,-1.1726393,-9.984677e19,3.0951298e26,-8.2752886e14,-0.01153617,-1.5204085e15,-423.89404,-1.6051679e32,1.8947101e21,3.0560038e25,-1.673441e36,2.4834979e35,3.1152445e9,1.5599925e22,1.7541672e13,6.1089956e24,-6.8510604e22,3.4727183e20,-2.4073092e17,2.5316845e24,-33068.914,2.486129e15,-4.492959e13,-2.011457e13,-3.6465948e26,-1.01305406e34,4.3193888e18,-1428.3845,1.7206134e6,5.5461082,-1.37938735e23,-2.2419225e34,4.6992445e18,1.0753263e22,0.033994235,9.207667e32,7.2891995e30,-2.856497e14,-15833.123,1.0812001,2.8020473e37,-3.170914e31,1.1233668e8,5.1164637e13,0.0024415005,8.716494e37,-9.0885865e17,-8.818224e20,-1.0696859e28,4.052958e6,0.16819145,9.517289e30,-1.5628872e36,1.2507472e30,-4.8353907e32,-1.5624453e23,-2.2161674e20,-1.0054748e38,-3.806016e20,86332.83,-6.413059e20,-9.910339e33,2.1466538e12,8.792575e28,-3.5952016e23,0.5111417,8.8719435e35,1.868114e14,-6.7921616e31,-1.7899841e25,-6.937215e37,-1.1574991e33,0.4364368,2.941857e28,0.007907622,5.1924908e7,2.8399647e10,-1.4577636e9,3.7302717e9,422104.88,9.62567e7,6.3235636e14,2.772547e19,-4.937278e16,-7.9010153,2.4751657e23,-4.768911e19,-4.469123e31,4.031721e8,-2.502843e20,-5.3600913e31,1.1946499e31,134.86261,1.713457e27,1.30711015e20,1.09466056e8,-1.1568392e33,204.26598,-9.3848026e8,-8.313338e22,2.221806e35,-1.2190267e17,1.5030547,-1.1945577e34,8.2325094e32,2.0624168e18,-1.0444867e23,5.076743e23,-3.3503202e37,-1.6455056e16,7.5163416e7,-3.4944367e21,-3.8650382e29,17.989315,-6.2875835e28,2.6058056e7,1.6373694e22,-0.012698408,5.671424e22,5.669582e7,-2.594101e28,2.2318412e6,2.8439296e7,502.1287,-1.0499509e22,-6.7920744e33,-6.7146165e33,8.211689e36,-5.3147092e7,-3.35598e18,3.1305935e6,9.752611e16,-0.025203755,-6.096358e13,3.554923e31,-1.31188856e8,-2.617851e14,-26105.62,3.106895e33,1.4535768e33,-4.1227615e31,2.874441e13,2.4762298e7,1.7921931e28,766.52167,4.1931335e30,5.272356e13,-0.005416645,-38.23218,-3.8273243e15,7.3933766e8,-1.1827427e29,905090.0,-1.1168426e37,1.3052048e30,1.84081e15,-9.405259e9,7.349936e13,-2.0331814e37,2.9208786e11,-6.3830288e16,-5.6876e33,22.22825,-1503.2012,-5.788928e23,-5.9654705e6,1.6168019e35,-66.350426,-358.20346,-0.008665499,5.079355e15,1.0302078e32,-8.2457496e20,6.4397968e13,-14538.814,-1.1826231e11,-1.2354211e10,-27060.918,1.5570151e36,5.5605843e13,1.9763706e20,-3.205567e36,-138.68304,-7.967043e28,3.3508622e12,-6.534467e17,-2.2685827e24,4.155087e27,1.5176726e20,8.430687,3.3134128e37,-1.2965281e9,-0.11951135,-1.50641e8,0.0067015467,-1.6234839e9,-2.6675087e34,6.194831e17,-347.00873,1.6995744e34,7.934334e36,-9.978389,-2.1059735e6,2.265141e26,2.899516e6,6.9667905e13,1.91487e18,5.6718324e16,-0.3689795,-22.662333,-1.5005653e7,-1.7266046e11,-0.0053255977,85.928314,-1.6530473e20,2.0752652e26,4.8237634e23,0.18571691,3.25165e13,2.1422907e33,3.2690156e19,6.3665283e32,-156.65239,-1.7735209e9,-9775.594,1261.1389,3.7217596e7,2.8816535e19,-4.2990437e20,-1.4515451e28,9.437855e22,-1.1464694e34,-8.030137e14,6.29455e20,5.508387e24,3.637144e26,1613.0198,-1.8331436e17,-8.2512883e34,-0.020002753,-3.3075362e33,7.040569e34,-3.5546307e14,-2.4808144e33,1819.555,-677.1279,-6.634539e20,9.214724e33,-2.0769413e32,6.5383547e10,-1.6071664e19,-3.6454078e24,-3.89096e25,1.3580157e28,0.45792854,-5.8281443e12,2.28676e29,-2.8105054e35,-1.5715895e7,1.4710075e18,2.400536e17,-1.5416152e20,-5.9945336e27,7.036568,7.9449055e10,-0.01881058,-2.4608928e31,5.719624e29,12507.454,-4.3472748e7,-4.2582165e16,-8.9289495e28,8.0008025e15,1.1805673e31,2.103077e20,104753.64,-2.6988796e10,-781261.4,1.5285763e32,6.4988543e25,-7.15529e21,-2.475992e19,818130.44,-1.6841475e19,2.1982029e27,-9.410942e31,-24938.334,-5.2616725e22,1.4628821e36,-1.8307134e6,5.320159e19,758.6964,-9.329791e36,242.45444,1.3099082e31,-467.65796,6.129738e22,-0.17103036,-2.6040872e26,-2.3988458e23,-38.46713,-0.5386326,1.4708952e11,-0.011293235,-0.2258209,-1.2504842e6,-0.91522115,2.8835223e28,1.6568028e30,-1.3845099,-1.6553614e8,-19508.441,-5.114197e17,1.0670827e7,5.6217485e13,-1.6011598e35,-8.2503025e20,7.346883e20,1016.84454,-6.823922e22,3.2478534e11,2.006849,3.6036988e32,4.3815226e19,2.9724393e32,1.938249e24,-1.7884083e11,60.84639,17.878344,-1.8202572e18,-1.0711257e29,7006.3086,1.6088772e37,-1.6909752e23,369.9967,0.07394749,3.3018512e27,-0.17315733,6.052163e17,1.0611523e7,-3.1318197e30,-4.118574e29,-1.2504361e35,4.5715295e6,-3.121441e18,8.763505e34,7.9426276e31,-9.409765e13,1.0281586e36,-1.5353869e11,-9.38975e31,7.123276e32,-7.90557,1.451343e35,1.8610522e8,-5.109991,-1.6508477e28,8.85944e37,-1.6962958e6,-8.8409916e17,-1.5004407e37,-7.1534844e21,0.009883928,-2.5924776e10,-3.869721e16,-17115.979,-2.3371457e28,6.0574106e35,129578.77,6.7999224e10,1.2857558e14,0.21973774,6.457578e35,-12397.958],"re":[-1.2939574,74.49524,39.457115,44.253906,41.17177,51.6989,10.640672,64.26794,55.56882,62.20585,8.621749,4.131912,5.4028664,9.788336,16.000887,60.74348,7.23169,21.873472,11.2968445,21.232878,0.41122308,9.846733,68.14052,62.79781,8.263155,-0.54441285,20.577726,45.957302,5.2848625,44.950104,29.786276,73.43037,8.481209,63.74085,24.536566,58.178905,25.570738,-4.4298663,40.65881,12.51875,3.931747,68.69326,58.98076,65.44659,50.735325,48.405025,33.244534,-4.5367556,7.8477783,33.668472,25.632559,76.32312,75.60479,87.26523,29.384691,27.137966,83.89759,50.658203,37.031452,13.638206,24.873549,61.790855,70.61818,86.11696,8.718499,48.565212,52.557606,34.589024,86.30006,65.529564,54.50203,54.72902,52.21363,30.238981,64.316765,74.12027,4.782021,43.175694,-3.647618,30.15231,58.099392,65.66149,38.964333,42.13417,49.42214,58.75524,61.96496,20.276499,27.37625,47.812767,79.997475,10.236633,84.08738,67.74939,14.600608,35.242283,43.62343,27.577875,26.5455,50.142788,16.130926,1.8087409,32.6842,34.92889,31.73095,31.383173,58.945225,31.620277,72.0852,74.57556,49.616173,0.32771724,86.12489,7.267007,19.652384,25.402834,59.32308,71.89133,29.374683,87.90047,85.37545,77.33535,5.673456,75.624,43.73364,47.514023,0.21900317,46.053856,61.04105,34.5132,-4.239325,35.428776,6.3668885,74.72482,49.042236,58.682083,83.46563,84.3445,22.118036,53.373074,32.830776,57.29484,54.559944,47.331177,40.061466,56.191635,11.856659,35.49227,31.85136,30.633812,61.45739,78.9227,43.099827,8.501976,14.39583,2.5242476,53.78168,79.13571,42.996105,51.62976,-2.4242797,76.800606,71.07964,37.4931,9.693676,0.7230005,86.27709,72.96999,19.405128,31.868498,-4.923374,87.45506,41.362232,48.75621,67.54366,16.253675,-0.66088027,71.90684,83.91449,70.17001,76.25289,54.313152,46.94732,87.854294,49.003967,11.371938,50.71694,79.22663,28.458096,67.640976,54.333862,-0.5548927,84.988304,37.22638,73.71951,58.624146,87.49906,77.98016,-0.48653552,66.11634,-3.4487855,20.627834,24.93919,21.744884,22.353903,14.08255,18.479498,35.099903,45.440712,42.73496,2.492219,54.244625,45.661095,72.87831,20.278965,49.434402,73.071175,71.64017,4.9880185,62.846367,47.295532,18.638262,77.7152,7.2513604,21.053667,53.22103,81.736145,39.381935,0.45873344,79.58088,75.99888,42.218964,53.052746,54.747536,86.4328,37.741745,18.147694,49.718624,69.48508,3.7674346,66.82183,17.098536,51.677402,-4.1601467,54.75463,17.885567,65.42885,18.275621,17.333649,6.739811,51.99184,78.24033,78.10563,85.03133,18.383753,43.201405,14.957022,39.1738,-3.670815,31.74184,72.94115,18.693832,33.202038,10.559973,77.29224,77.5531,72.82029,32.4004,17.044962,65.26683,6.816427,70.52201,32.245403,-3.9519956,4.0546823,36.17315,20.432013,67.81487,15.338829,86.10753,69.445114,37.402992,23.008495,33.336964,86.01123,26.418343,40.7688,78.45389,5.4226255,9.713528,54.836388,15.603811,83.613945,4.958043,9.1601305,-4.634081,36.168644,73.78354,48.9864,32.856293,9.6058855,25.939058,25.810596,10.210627,85.2641,31.785282,47.857937,85.42428,4.942162,66.70651,30.316519,41.48345,57.32289,64.74222,46.80366,2.2995353,86.42595,22.218983,-2.035521,19.221872,-4.902596,22.027111,80.81441,40.999348,7.692266,79.26046,84.96534,2.8865793,17.581127,60.80431,15.026153,33.33368,44.91607,39.164173,-0.85310566,3.7663815,16.761665,25.99963,-4.9691415,5.416188,47.03863,60.894108,55.49196,-1.1391028,31.155483,76.96875,46.0216,75.5341,5.540796,21.381668,10.113023,7.175218,18.631262,47.511837,48.43193,66.3775,53.718872,78.49553,35.18991,49.62897,57.02221,63.0567,7.4000187,40.91491,80.4243,-1.4433714,78.08205,80.49091,33.719242,76.93274,7.510377,6.54565,47.986736,80.6273,74.42574,25.507858,44.285126,56.966198,59.576584,64.792046,1.3607649,31.993292,69.30052,82.24263,17.101374,41.889874,41.171375,46.509743,63.99391,3.4339883,25.100657,-3.695112,72.692375,70.109436,9.849591,17.600306,39.809525,67.81189,37.53432,72.347824,49.072346,12.681783,24.020325,13.610225,78.661964,60.486263,51.084,45.32845,13.9736,44.334026,66.11295,74.99072,10.247046,53.645462,83.4301,14.441429,46.124706,7.3243012,85.35316,5.503466,71.65034,6.1574497,53.577225,-1.383699,61.981564,53.846848,3.871569,-0.048846345,25.854404,-3.9340675,-1.4194167,14.400178,0.4083955,65.572174,69.97446,1.3162174,18.935497,11.215119,41.27759,17.747553,33.787334,81.91458,48.587772,48.206245,7.8220515,55.571404,27.526112,0.7209712,75.09339,47.14661,75.306526,55.92413,25.943106,9.778119,2.9500988,42.05243,68.28124,9.135227,85.69689,54.20359,5.9136305,-2.6042616,63.715252,-1.7354262,41.78864,17.125834,70.662,68.21055,81.56328,15.3353615,43.00187,82.315056,74.25804,33.613235,84.166916,25.918266,75.21298,75.7051,2.9465063,82.53171,19.539534,1.8748411,65.335175,87.798004,14.441065,41.36817,85.62518,50.46659,-3.6280735,25.572737,38.461617,9.773012,65.58164,82.49436,12.516227,24.963652,32.628273,-1.5137764,83.89458,9.695719],"expre":[0.14330539,-1.5738493e32,7.6781855e15,5.480037e18,-2.1324817e17,-8.509247e21,41265.23,-6.471224e27,1.2949642e24,-5.855077e25,-1262.561,-41.21923,-140.03952,-5924.179,-5.6339595e6,2.3994123e26,-1345.9438,2.3082258e9,23258.148,1.2758925e9,0.43336332,10447.259,-3.7324565e29,1.5832095e27,1030.8248,0.021224936,-8.115138e8,8.815774e19,-187.53758,2.3024772e19,-8.612549e12,1.57661e31,-675.964,4.803307e27,1.5778509e10,3.0835113e23,-9.797408e10,0.011628561,4.0980107e17,-249265.94,40.921482,-2.6429064e29,3.3900135e25,-1.6979806e28,2.901843e20,-4.070203e19,-2.691845e14,-0.008225054,-1719.6876,4.1161057e14,9.533033e10,-1.2591964e32,-4.0241144e32,-3.3994203e37,2.0182221e12,4.6224235e11,-2.6149905e36,-8.962679e21,4.148708e15,834363.9,2.813523e10,-6.3637755e26,-4.5828658e30,-1.8337925e36,-4789.625,7.38373e20,-2.596315e22,-1.162275e14,2.94913e37,-2.3458131e28,3.4707466e23,-1.7643385e23,-2.9634357e22,1.1790278e13,-3.420018e27,1.5488411e32,9.174023,-5.3147536e15,0.02573597,-1.2336272e13,1.7050617e25,-4.9063233e27,8.255971e16,-1.6743848e18,-2.3027693e21,5.998893e24,-5.4830265e26,-1.722443e8,-6.1409316e11,5.2074862e20,5.282091e34,-11241.834,2.2924476e36,2.6493862e29,1.3225981e6,1.819902e14,8.630639e18,6.026875e11,-3.1810958e11,-1.4519003e21,-7.4383905e6,5.8697386,1.554175e14,-1.2619845e15,-4.6298117e12,-4.1509383e13,-2.730276e25,-9.976959e12,-1.5330693e31,7.0430476e31,9.057625e20,-1.1955467,-2.0852832e37,-990.6684,-2.7925005e8,-1.07723194e11,2.2168193e25,-1.8787579e30,5.330591e12,1.4798783e38,-1.1872031e37,-5.544055e32,-115.603615,-5.73415e32,9.714781e18,-4.224418e20,0.41777042,8.5903376e18,9.388243e25,-5.1509932e14,-0.008647305,1.9021583e15,399.15057,2.3370055e32,-6.072123e20,-8.060343e23,5.851948e35,4.262004e36,-2.5629668e9,1.5042095e23,-1.803769e14,4.580393e24,-4.9078575e23,-9.28691e19,-6.8574195e16,9.530284e22,137088.16,-7.429371e14,5.1117786e13,1.0445184e12,3.2798827e26,1.5916003e34,2.938501e18,-4712.7827,-481105.94,11.181617,-1.8098178e23,-6.51076e33,-3.100404e17,2.4171767e22,-0.08175608,-2.0637596e33,1.3017189e30,-1.9186598e16,-3497.144,-1.7541686,-9.190974e36,3.7396684e31,-2.4291578e8,4.6640967e13,-0.0068525956,-3.968734e37,-1.3719944e17,-1.2068587e21,-2.1542962e29,-1.0710835e7,0.48823872,1.400569e31,2.2956403e36,-2.7065806e30,-1.2140525e33,3.5424385e23,1.0418504e20,-1.0135727e38,-1.8767243e21,-9463.892,1.0599724e22,-2.35687e34,-7.877214e11,2.2088337e29,-1.6427283e23,-0.2614649,8.0788285e36,-1.469522e16,-7.8423207e31,-2.2625363e25,-7.2139303e37,7.2594395e33,0.43294755,4.258223e28,-0.03078483,-9.074963e8,-6.1517775e10,-2.3644178e9,-3.4882399e9,1.2360031e6,4.453059e7,-1.6345927e15,-4.666649e19,3.6267408e18,9.148519,2.6351032e23,-4.8002553e19,-1.9806001e30,4.9868086e8,-2.934365e21,8.373483e30,-5.0491388e30,57.593376,9.6623876e26,-3.213185e20,5.8900908e7,-5.5201424e33,1395.1476,-1.0274242e9,-9.981059e22,-2.22524e35,3.5151101e16,-0.4937293,3.4422698e34,5.9141386e32,-6.5861296e17,-3.3788373e22,3.1563633e23,8.054761e36,-1.8293717e16,-1.1967948e7,-1.7611039e21,-1.4525492e30,39.35205,8.384044e28,-5.6156245e6,-2.2400434e22,0.009070547,5.9937492e23,-1.4659006e7,-2.0869159e27,8.6468296e7,1.8120476e7,-680.1246,-3.651939e22,-6.6928455e33,-4.9362265e33,2.134963e36,-8.039554e7,-4.709264e18,-75225.086,3.3225616e16,-0.0035726898,2.008837e12,3.1709063e31,7.6195945e6,-2.1918139e13,-28379.154,-1.9997e33,-4.5704706e33,9.069276e30,-1.1428646e14,5.018844e6,1.2986071e28,-495.47864,6.256566e29,8.605914e13,-0.018437102,43.171337,-3.4102698e15,1.0897933e8,-2.5698384e29,4.4972505e6,-2.224359e37,6.1820568e29,-1.7438407e16,2.8512346e9,2.9152614e14,9.879235e36,5.5957205e10,5.037389e17,1.0345291e34,225.37947,-16471.396,3.0288415e23,-406186.84,2.049879e36,125.901505,9503.55,-0.0043921475,-4.9273452e14,-4.0257827e31,-1.6912812e21,-1.7440196e14,-3033.6233,-1.4116687e11,-1.6148506e11,2652.4475,1.0594678e37,3.1085386e13,5.7577276e20,-1.2153117e37,19.682344,4.8714516e28,1.4277554e13,-8.0600394e17,-7.5178045e24,-1.2420928e28,1.4818762e20,-5.321222,8.5624106e36,-4.2700388e9,-0.05269384,1.6418219e8,0.003202143,3.3063542e9,1.2222114e35,-1.5845074e17,2163.6848,2.0263298e34,3.6841745e35,14.89911,4.3138956e7,1.1767357e26,-1.6891171e6,2.9145195e14,3.2064752e19,-8.48284e16,0.21308789,36.805965,-1.1707746e7,9.203318e10,-0.004464096,207.96675,2.1132527e20,-1.8683355e26,-1.16237784e24,0.26072425,9.710644e12,1.5996742e33,-9.136224e19,1.6262798e31,-201.05777,-7.655733e8,-22641.926,341.83273,-1.1769522e8,4.2968897e20,9.915521e20,6.5615757e28,-1.9173281e23,-4.4765026e33,-1.7414938e15,3.5217611e21,1.8583283e24,2.4002012e27,-273.336,-5.5832726e17,1.9077654e34,-0.23528159,7.437268e33,-5.689882e34,-2.6039737e14,-7.051192e32,-163.67807,161.8793,-1.982065e20,1.0334042e35,-3.253853e31,-1.0020846e11,-5.8162285e18,4.1140228e24,6.385916e25,2.2582438e27,3.872191,-7.821821e13,-1.2286831e30,4.3966615e35,2.1624362e7,5.130342e17,7.205163e17,-3.5057183e19,1.5723017e27,-30.190872,5.3649044e9,0.01623021,2.7823246e31,-2.747442e30,-14236.893,-6.961723e6,1.8984448e17,-2.6754594e29,-1.8325855e16,2.3522084e31,-2.0396351e21,-304305.84,1.5455724e9,230003.66,-1.4535602e34,-1.739744e26,1.3555965e22,-4.172363e19,-838176.1,-6.2052995e18,5.1534255e28,3.5770413e32,13163.23,-1.9147888e23,-8.872723e35,-381116.72,-9.349681e19,1313.3165,7.0698845e36,38.813545,-2.8836045e29,-65.49692,1.7505663e23,0.18323173,7.864276e26,3.8016686e22,-28.739794,-0.7853677,-8.3645596e10,-0.015975304,-0.08659558,-1.2869106e6,1.1939832,-8.405652e27,-1.8075699e30,3.4627624,2.4457526e7,71635.68,-6.7210926e17,4.988247e7,4.6832384e14,3.400729e35,9.562845e20,4.516179e20,2278.4087,1.3608447e24,8.397889e11,-0.4488416,-1.9526009e32,2.9566195e20,4.1101447e32,-4.766447e22,4.6964433e10,17643.33,6.743477,-2.1488139e17,-4.3808533e29,-6079.717,-3.6954566e36,3.0300146e23,6.113132,0.0012305204,-3.3308917e27,0.03327248,-1.2711916e18,2.5255202e7,3.738048e30,-8.335838e28,2.331145e35,11360.715,-3.5626945e18,5.541282e35,1.5903934e32,-3.8498416e14,-3.4235414e36,-9.464969e10,4.522935e32,2.521152e32,-17.320438,6.814473e35,-2.4306974e8,4.0491433,-1.7001474e28,-1.0180305e38,785363.1,2.7076214e17,-3.3111978e36,4.1443148e21,-0.024660299,-1.2501302e11,-3.251463e16,3894.9739,1.9316979e28,2.890937e35,239977.9,1.4045464e10,7.3307945e13,-0.0122207515,2.6447033e36,10501.656],"im":[13.587196,66.77111,7.797815,30.182274,-4.427885,29.540276,24.972486,21.33758,93.93948,54.921364,42.18205,77.69205,83.93465,60.922253,-4.0263767,62.786156,91.33684,36.94769,42.70435,32.113403,92.96834,44.967293,9.7336645,18.285105,70.41681,67.58083,40.488598,81.43117,-3.457903,74.592804,78.47605,39.06557,10.854965,0.059082907,89.17962,-1.5541128,60.383907,62.611732,24.683783,40.417244,82.32082,77.36762,87.35975,60.56529,55.004704,61.22236,28.084564,54.10198,8.59054,63.01772,36.90837,-4.6224456,73.19792,73.38389,23.918907,0.71234035,27.982285,91.56838,93.027145,25.045841,55.43727,65.595924,84.63226,61.188007,22.662054,82.61125,54.579365,70.79659,81.89459,46.505848,87.23007,8.159363,52.511086,94.76588,29.434063,12.575285,58.04252,58.120407,62.675663,15.57591,94.296005,45.70305,62.986683,28.84449,46.466465,57.93605,-3.974203,35.85569,52.75082,88.42703,37.400513,39.684517,57.351868,0.013712277,80.758125,23.652124,0.2069944,-0.88203114,66.31595,64.64787,29.020412,-0.2772298,12.685093,-2.595072,73.75062,59.918312,66.78762,67.35847,58.978874,80.403175,70.4265,-3.6742291,-3.7450511,54.214054,8.806432,78.537285,30.237072,79.99769,12.936703,94.10468,-3.0136933,86.24958,10.587099,52.802895,37.535416,9.218445,61.603302,67.630066,82.9577,73.27066,29.201897,18.175238,36.88366,74.79638,27.013674,89.56176,11.331978,75.45643,71.374275,62.935192,78.44287,76.32566,53.545773,45.814404,10.718066,-4.7500153,94.01108,45.84348,11.845312,23.613827,61.99356,11.999544,7.2565966,9.719065,33.259373,82.14185,54.05832,35.84568,26.769419,31.834505,40.44665,-3.5612485,20.243633,9.439665,17.061375,8.872416,45.870045,55.845387,90.67303,69.946655,46.781624,89.962654,-1.720623,35.188538,72.306244,40.47896,69.44679,57.145523,5.685457,15.275082,53.786102,62.416454,67.983696,47.905277,3.34168,58.22865,56.48824,41.238747,27.055235,0.37883645,67.11565,33.459553,37.80849,53.394363,41.554466,28.94365,47.889736,81.52329,19.638968,94.85235,53.155643,65.91629,-3.574092,66.52594,40.02179,31.745016,89.10209,34.188393,52.87099,18.835943,68.40268,63.585964,10.206901,-1.6150848,82.3613,59.77535,61.416023,8.253857,20.016745,19.90689,78.153465,63.909008,28.480911,25.27812,10.164964,16.402452,27.489708,36.409054,39.587288,31.081903,88.91243,83.56131,79.797745,63.846405,67.78018,29.006868,8.011882,79.64379,41.100765,19.27833,55.9052,58.331722,52.775875,11.615837,56.64301,58.37248,86.31352,81.707214,38.70261,21.355185,78.81977,79.33257,54.343945,7.5996222,66.55756,35.176674,26.727562,70.35748,10.85476,92.70992,19.691988,42.469517,73.7439,66.71714,71.25772,78.231895,23.778477,-3.3879938,70.48586,57.492424,90.10923,13.98905,25.682405,91.39194,24.407944,22.834106,83.10586,78.97115,12.764972,72.721954,7.4116383,9.319607,17.573107,6.5301576,74.27973,70.49655,37.57307,-0.5026717,12.664679,28.365343,30.327175,67.47626,69.19375,93.762764,94.210106,4.243273,89.632095,64.77518,41.29434,21.637428,79.90491,47.821228,9.501133,11.09328,88.11051,13.627417,31.74658,34.81541,4.8533707,30.393927,75.628746,10.106024,66.26652,15.385142,25.930073,83.81523,45.30021,53.701862,79.69534,18.107143,45.107346,43.52586,62.61697,1.8212066,62.67283,19.54748,32.940323,87.37447,62.783073,70.20671,90.06288,75.63286,50.32513,52.81772,93.2007,12.014469,29.182566,11.485295,66.84662,38.09093,55.884857,2.3037703,78.146454,44.60124,1.28059,88.894,34.213905,39.24437,66.63534,92.26948,28.681906,26.438847,65.667175,94.31474,24.723637,6.0654726,8.967358,60.8888,34.98957,0.17686546,26.378164,75.548615,64.57051,9.742017,48.9219,47.208702,5.864727,65.082344,73.19518,79.83369,45.642807,42.646164,48.404377,50.354416,29.689728,65.39533,79.76338,36.974033,49.71825,26.538755,6.4008994,15.782337,65.78944,55.979897,68.48657,32.65115,25.454344,17.055157,36.384827,-3.3705742,58.05204,30.557022,5.559015,40.635456,52.686253,-1.729588,50.044834,3.4637048,40.42906,75.86339,3.0388453,9.0932455,55.035076,74.11374,59.679745,-3.4990935,43.49663,85.358574,84.049706,67.19122,37.74174,93.99052,55.463535,72.5248,52.38148,23.356697,40.323376,75.92208,80.75907,1.4120573,26.725548,48.55554,75.73504,43.231327,18.52979,30.002302,73.18577,60.291416,33.503788,60.305614,48.32851,60.461304,11.912375,58.40311,71.514725,68.73468,92.82367,6.0173044,47.77434,37.909855,31.535395,49.825443,5.571338,45.00193,38.11888,31.365824,63.200882,52.056313,27.200089,69.26216,6.90931,76.99361,67.80105,75.40167,20.059666,-1.6883025,41.0805,52.550987,1.7965719,37.19009,76.9525,58.102825,2.3605728,36.318153,15.263617,94.64555,11.868989,86.1941,24.640396,70.68335,47.84337,69.27189,0.4631777,85.06272,21.699398,41.85907,-0.20469536,20.08018,9.852966,69.32488,21.33771,43.08159,66.74413,8.708643,23.995546,5.009577,67.32704,80.635704,84.4418,9.629256,73.12863,80.334366,55.668575,32.541435,31.91103,57.915775,63.884464,20.47591,69.35452,36.831093]} diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/test/fixtures/julia/pure_imaginary.json b/lib/node_modules/@stdlib/math/base/special/cexpf/test/fixtures/julia/pure_imaginary.json new file mode 100644 index 000000000000..435fcee6131a --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/test/fixtures/julia/pure_imaginary.json @@ -0,0 +1 @@ +{"expim":[-0.20874824,-0.6785699,0.9099953,-0.2904082,-0.736761,-0.91644484,0.51000005,0.93020755,-0.47547886,0.85712653,0.9956019,0.99640936,0.83669776,0.09332635,-0.918825,0.9212356,-0.976907,0.7805966,-0.9698222,0.95824,0.3010133,-0.37215015,0.5331578,-0.6054617,-0.86732733,-0.67651325,0.5161068,-0.890426,0.9987693,-0.60274637,-0.915306,-0.9336909,-0.31847957,0.9156194,0.47480196,-0.882558,0.53688484,-0.967646,-0.04315842,0.2285658,0.29908514,0.1278654,-0.5165356,0.68917334,0.9569492,0.95599365,-0.49736246,0.22831558,0.70724237,0.52268976,-0.8897873,-0.40274155,-0.448465,-0.014573487,0.96474916,-0.3072022,0.3267034,-0.79785115,0.16542354,0.50751793,-0.9095333,0.4881561,-0.8401695,-0.99989843,0.73003364,0.045152664,0.5080375,0.120743126,-0.8700044,-0.5143704,0.74023336,-0.77989465,-0.7334136,0.9990589,-0.90879565,-0.14456524,0.8351407,0.7265723,-0.8025252,-0.7110607,-0.36432272,-0.9063838,0.57229674,0.9578519,0.23664254,0.5758031,0.9929746,0.92181104,-0.69951326,0.21886598,-0.34082553,-0.15005845,-0.92361504,-0.024061788,-0.82295525,-0.83909076,-0.60770607,-0.06513737,0.6484684,-0.96648794,-0.9892921,0.8208599,-0.6104737,0.12353733,-0.97014016,0.28517306,-0.96939963,0.20621814,-0.9341517,-0.97403365,0.96053755,0.6558421,-0.88701415,-0.531851,-0.74426967,-0.45462018,0.32885516,-0.99655056,0.7344877,-0.42655575,-0.9311028,-0.96941614,-0.48190245,-0.61402804,-0.8416364,-0.486967,-0.71382844,0.5745569,0.76110005,0.7794857,-0.7183803,-0.9220463,-0.7919266,0.951006,-0.94009644,-0.99225473,-0.6190339,0.8641078,-0.43660334,-0.76810884,0.9418525,0.38884693,-0.7926642,0.48945647,-0.8827543,0.47321406,0.9536372,-0.37465757,-0.9863434,0.82031846,0.6020551,-0.2820595,-0.8638502,-0.93415844,-0.236075,-0.98668414,0.81676555,0.837899,0.6421033,0.9664688,0.16609055,0.99176043,0.76483065,-0.9095489,-0.748607,-0.5783882,-0.6044665,0.8760967,-0.62768704,-0.70298207,0.65929055,-0.9861681,-0.36114213,-0.026147166,0.99994224,-0.89431906,0.977462,0.6410248,0.052040383,0.64872,-0.84958166,-0.12061728,-0.7338302,-0.8586476,-0.90225005,0.97557783,-0.99700636,0.6999968,0.5479985,-0.39952672,-0.18673027,-0.9668618,0.9849894,0.3478209,0.20856488,-0.9970987,0.27637482,-0.22428706,0.96254313,-0.1404258,0.96602833,-0.983624,-0.9763098,0.9197915,-0.90084726,0.6346649,-0.26463038,-0.856057,-0.47055435,0.6132104,-0.49853152,-0.8293884,-0.39918575,-0.6856977,-0.33119434,-0.9671623,0.40960014,0.22585034,-0.70473254,-0.1366443,-0.023402,0.54349536,0.9849075,0.98882675,0.96700376,0.85242593,-0.782799,-0.65618986,-0.9929999,-0.44764888,0.99698514,-0.22430919,0.016615596,-0.65799886,-0.59263086,-0.998869,0.07977886,-0.43636352,0.1514315,0.44563365,0.8461406,-0.50550056,-0.93602175,0.9652854,0.8496279,-0.98902714,-0.25390747,-0.98364615,-0.8119325,-0.9805097,-0.80313396,-0.8360958,-0.7100847,0.9868284,-0.99319255,-0.96536994,-0.8986644,-0.022701122,-0.9751271,-0.755991,-0.02278118,0.62161875,0.9889639,-0.8062581,0.6883893,0.65326124,0.28380764,-0.648888,0.64171827,-0.22183648,-0.48775718,0.22275151,-0.97122616,-0.8932034,-0.16424073,0.9894229,0.9211014,-0.119657665,0.44897312,-0.15538053,0.015289399,-0.6643803,-0.6259659,-0.97383964,-0.2648721,0.66970325,0.38767093,0.60728836,-0.97938687,0.5064281,0.4076383,-0.9957016,-0.97838444,-0.57782423,0.55996513,-0.5202141,0.6874535,0.77116126,0.80065113,-0.99660915,0.8886243,-0.82509106,0.29041702,0.19277245,-0.8992126,0.48073152,-0.5559377,0.3535795,-0.90916854,0.14736818,0.89711833,-0.9464371,0.7364237,0.21882339,-0.41104406,-0.44983515,-0.7862891,-0.050156232,0.91795516,0.67436475,-0.9323341,-0.7536015,-0.71310437,-0.80709195,0.6962925,0.9341841,-0.36595416,0.48941442,-0.62416905,0.6445074,0.9744296,0.04518175,-0.9662915,-0.4620291,-0.99923927,-0.81847745,-0.8929455,0.6510115,-0.63401884,0.22095641,0.59538066,0.6775658,-0.96006286,0.8585522,-0.7934843,0.8533553,-0.9976589,0.4254591,-0.991512,-0.9894647,-0.8513019,-0.67062086,0.49842754,0.61009216,-0.05120504,0.7592036,0.9994268,-0.47173133,0.654398,-0.99633014,0.9988676,-0.13350736,0.9964892,-0.82935345,0.9961568,0.81073684,0.9080813,0.92447674,0.9964914,-0.89607626,0.6929172,0.5313503,-0.20057638,-0.15718488,0.9845446,-0.86348975,0.5793759,0.9850792,0.10250661,0.825805,-0.9078361,0.79966277,-0.9971891,-0.73458797,-0.94384164,0.9570701,-0.22930959,-0.24292485,-0.29973596,-0.3968643,0.9456928,0.9628303,0.99608916,-0.94221246,-0.5343111,-0.47458398,0.16731875,-0.15376616,-0.36113185,-0.110462256,-0.51217157,-0.62813646,-0.36316526,0.6389301,-0.9760974,0.83116674,0.47794944,0.97675955,0.7492201,-0.46567413,0.78519505,-0.08806333,-0.999738,-0.33247426,-0.40815878,0.35269448,0.03958899,0.52100754,-0.99968076,-0.9194938,0.7924616,0.7028658,-0.99375266,0.421814,-0.85446554,0.8660996,0.08526651,-0.6865804,0.97078454,0.64123917,-0.5144923,-0.056549653,-0.014472027,0.24978395,-0.6563873,0.62540156,0.89626175,-0.08588685,0.9808638,0.03538439,0.7269476,0.76945084,0.9259586,-0.4796624,0.1744829,0.24170169,-0.9811709,-0.022780782,-0.9169165,0.9971265,-0.43693346,0.080945656,0.56230104,0.513198,0.38211465,-0.967466,0.6813911,0.8442229,0.27187988,0.8046026,-0.97034657,0.98839915,0.87408006,0.42957944,-0.5822963,-0.9995473,-0.66347456,0.94481504,0.9483694,-0.52873975,-0.363924,0.81773424,0.9930826,0.875281,-0.3782596,-0.7497824,0.18998758,-0.99999005,0.6469908,0.11142503,-0.9378503,0.079062596,-0.8634419,-0.90528625,0.98716277,-0.7494569,0.9243406,-0.44486797,0.16585983,0.05814784,0.082880914,-0.2252737,0.5269559,0.9891951,0.9662126,0.8033943,0.65068334,-0.8983305,0.27047613,-0.59655255],"re":[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"expre":[0.9779694,-0.7345358,0.4146185,0.95690286,0.6761533,-0.4001611,0.86017436,-0.367034,-0.8797271,-0.5151059,0.09368527,0.08466644,-0.54766494,0.99563557,0.39466533,0.38900506,-0.21366501,0.62503517,0.24381311,0.28596538,0.95361996,-0.9281725,-0.8460158,-0.7958745,-0.4977382,-0.73643047,-0.8565242,-0.45512807,0.04959785,-0.79793286,-0.4027592,-0.35808003,0.94792974,-0.4020462,-0.8800927,0.47020358,-0.8436555,-0.25231162,-0.99906826,0.97352844,0.95422643,-0.99179155,0.8562657,0.7245965,0.2902555,0.2933873,0.86754286,0.97358716,0.70697117,-0.85252297,-0.4563754,-0.9153137,-0.8938004,0.9998938,-0.26317108,-0.95164424,-0.9451269,0.6028545,-0.9862226,-0.86164117,-0.41563103,0.8727563,0.5423239,0.014252737,-0.6834112,-0.9989801,-0.8613349,-0.99268377,0.49304393,0.85756814,0.67235005,-0.6259108,-0.6797827,0.043374132,0.41724154,0.9894953,0.5500363,-0.68709004,0.59661824,0.7031306,-0.93127275,0.4224552,0.8200466,-0.2872626,-0.9715968,0.8175884,0.11832777,0.3876395,0.7146196,-0.9757549,0.94012654,-0.98867714,-0.38332134,0.9997105,-0.5681062,0.54399145,-0.79416203,0.9978763,0.7612416,-0.25671208,-0.14594932,0.57112956,-0.79203653,-0.9923399,0.24254496,0.95847607,-0.24548806,-0.978506,0.35687622,0.22640325,-0.27815038,-0.7548981,0.46174222,0.84683794,-0.6678792,0.8906854,0.9443804,0.08298751,0.678622,-0.90446126,-0.36475682,-0.24542278,-0.8762249,0.7892842,0.5400446,0.87342036,-0.7003206,-0.8184647,0.6486345,0.62642,0.69565064,0.3870796,-0.61061627,-0.30917245,-0.34090856,0.12421974,0.7853643,-0.5033068,-0.8996541,0.6403193,-0.33602652,-0.9213024,-0.6096585,-0.8720277,-0.4698349,0.8809475,-0.30095872,-0.92716324,0.16470203,0.571907,-0.7984546,0.9593969,0.50374883,-0.35685855,0.9717348,0.162648,-0.5769697,-0.54582524,0.7666181,0.25678414,0.9861105,0.12810627,0.64423144,0.4155969,0.663014,0.8157616,-0.79663056,0.48213542,-0.7784658,0.71120757,-0.7518883,-0.1657482,0.9325108,0.9996581,-0.010745341,-0.44742984,0.21111156,-0.7675201,0.998645,-0.76102716,-0.5274571,-0.9926991,-0.679333,-0.51256645,0.4312132,-0.21965405,0.077319734,-0.71414596,-0.8364793,-0.9167215,-0.9824112,0.25530043,-0.17261466,-0.937561,0.9780085,-0.07612001,-0.9610499,-0.9745231,0.27112857,0.9900912,0.2584361,-0.18023273,0.2163776,-0.3924074,0.43413612,-0.77278745,-0.9643499,0.51688147,0.882371,0.7899196,-0.8668716,-0.5586724,0.91687006,-0.7278865,-0.94356257,-0.25415957,-0.9122652,0.974162,-0.7094731,0.9906202,0.9997261,-0.83941215,-0.17308134,-0.14906937,-0.25476208,0.522848,-0.62227464,-0.7545958,0.11811499,-0.8942094,0.07759311,-0.974518,0.99986196,0.7530189,-0.80547416,0.047546413,-0.9968126,-0.89977044,-0.98846775,-0.8952154,-0.53295976,0.8628263,0.3519421,0.26119742,0.52738255,0.14773387,0.96722853,0.18011172,-0.5837513,0.1964707,0.5957985,0.5485834,0.7041163,0.16177067,-0.11648409,-0.26088482,0.4386368,-0.99974227,0.2216464,-0.654582,0.9997405,0.78331995,-0.14815651,0.591564,-0.7253414,0.7571326,-0.95888126,-0.7608839,-0.7669405,0.9750839,0.87297934,0.9748753,0.2381591,-0.4496529,0.9864203,-0.14505981,0.38932282,0.9928152,-0.89354527,-0.9878547,-0.9998831,-0.7473947,0.7798504,0.22723623,0.9642835,-0.7426288,-0.9217978,0.7944815,-0.20199345,-0.86228216,0.91314346,-0.09261944,-0.20679423,-0.8161612,0.8285162,-0.8540359,-0.72622836,0.6366399,0.59913087,0.082281,-0.45863584,-0.56499976,0.9569002,0.9812435,-0.43751198,0.87686783,0.83122396,0.9354045,0.41642836,-0.9890817,0.4417904,0.3228881,0.67652065,-0.97576445,0.9116155,0.8931116,-0.6178587,-0.9987414,-0.3966841,-0.73839843,0.361598,0.6573316,0.70105785,0.5904258,0.7177581,0.35679138,-0.9306329,0.8720513,0.7812893,0.7645981,-0.22469307,0.9989788,-0.2574506,0.8868648,0.03899825,-0.57453865,-0.45016477,0.75906783,-0.7733176,0.9752837,-0.80344373,-0.7354622,0.27978444,-0.5127261,-0.6085908,0.52132976,0.068386085,-0.9049777,0.13001512,0.14477447,-0.5246762,0.74180025,0.8669314,-0.79233044,0.99868816,-0.65085316,-0.03385433,0.88174236,-0.7561503,0.08559357,-0.04757725,0.9910478,0.08372131,-0.55872434,0.087587915,0.58541083,-0.41879395,-0.38123852,0.08369529,0.4439002,0.7210171,0.8471522,-0.9796781,-0.9875692,-0.17513426,0.5043664,0.81506044,0.17210157,0.9947323,0.5639557,0.41932526,-0.6004494,0.074926175,0.67851347,-0.3303982,0.28985652,-0.97335356,0.9700451,-0.95402217,-0.9178773,-0.32506183,-0.27010703,0.08835348,-0.33501598,-0.8452879,0.8802102,-0.98590285,0.98810726,-0.9325148,0.99388033,-0.85888314,0.77810323,0.9317247,0.7692648,0.21733356,-0.55602324,-0.87838733,-0.21433803,0.6623211,0.8849563,-0.6192485,-0.99611485,-0.022890588,0.9431123,-0.91291094,0.9357385,-0.999216,-0.85355204,-0.025267268,0.39310452,-0.6099218,-0.71132255,0.11160514,-0.9066824,0.51950806,0.49987152,-0.99635816,-0.7270539,0.2399528,-0.7673411,-0.857495,0.9983998,0.9998953,-0.9683016,0.75442404,0.78030306,-0.44352546,-0.99630487,0.19469517,-0.9993738,-0.68669295,0.638706,0.37762517,0.87745315,-0.9846602,0.9703506,0.19314167,0.9997405,0.39907917,-0.0757543,-0.8994938,0.9967185,-0.8269326,0.8582702,0.92411494,-0.25300115,-0.7319195,0.5359922,-0.9623312,0.5938136,-0.241718,-0.15187873,0.48578194,0.9030291,0.81297666,0.030087061,0.74819887,0.32760417,0.31716794,0.848784,-0.9314287,-0.575596,0.11741788,-0.48361468,-0.92569953,-0.6616845,0.9817865,-0.004456073,0.76249784,-0.99377286,-0.34704006,0.9968697,-0.5044483,-0.4248021,0.15971729,-0.66205317,-0.38156834,-0.89559615,0.9861493,0.998308,0.99655944,0.9742955,0.8498926,-0.14660497,-0.2577465,0.59544736,0.75934917,-0.43932024,-0.96272665,0.80257404],"im":[5736.338,8511.32,9199.727,5604.3066,8041.649,2643.2385,8275.49,5110.1763,2290.7166,2710.1648,1609.9724,9193.786,4815.0703,5925.137,8933.524,2275.6843,2498.9216,5033.727,9197.259,1213.9355,785.7039,8429.274,1824.703,8938.481,6544.9873,4942.4683,5745.4307,4.239873,3595.5032,9114.407,6205.802,5853.9917,829.05634,6605.6123,3232.204,2417.945,134.52174,2775.342,4376.2817,8312.885,5001.719,3772.9246,1350.342,830.1408,9620.833,7088.706,4114.966,9255.362,541.1395,9571.883,4892.5566,3515.8567,3515.9072,18.834982,1704.5803,9899.471,3942.366,2619.1646,5965.7183,4966.3257,3039.0623,8683.872,1406.4359,5370.567,6882.411,4734.335,6819.8647,8284.259,8079.121,1896.9817,32.249344,8253.858,3045.0266,497.89905,1029.302,9795.341,3224.2625,84.00968,8135.7935,9989.474,9937.23,859.66174,8068.219,1717.1718,4771.8403,1873.0028,9658.708,968.78326,2217.1897,1567.4341,7526.908,600.1948,1650.5135,2620.0642,4578.267,1375.022,1970.4318,7835.067,6717.4307,4528.346,1424.5658,9651.936,3157.9573,3245.1414,67.78923,8997.811,9133.933,4237.801,3850.3867,2794.675,7277.7812,7071.01,8085.3687,6458.5537,5024.246,5415.634,4178.6533,5364.3525,5410.6475,3446.7678,3070.5334,569.9511,8228.334,7740.223,3592.9817,6948.6943,5520.573,687.3967,5775.1123,5957.3535,4749.2866,237.5877,7367.9487,7013.92,3535.5146,3454.3057,633.9342,1792.806,6255.363,5025.6724,2383.2407,3024.9543,670.0744,5770.594,4358.4707,9217.926,6555.239,5249.9854,6690.187,8112.554,3502.2297,7815.9966,3479.8418,6143.0195,9971.177,1952.6632,1472.4512,8861.439,4468.042,1704.0543,8564.148,7044.893,1998.9237,9775.494,5591.189,432.92303,437.33047,1018.9437,1417.5369,7991.432,9244.987,2750.2979,1683.5242,345.54904,2583.9707,4038.0535,9532.95,3948.2861,9405.98,806.6834,9146.191,4929.28,7135.381,5307.1826,5006.5737,7843.2075,8524.789,536.43695,172.20763,481.07468,9415.541,5804.3506,7799.1772,8170.9272,3581.6257,3177.6448,3188.4365,8485.668,5800.6763,2230.39,5448.831,4968.2476,3215.6382,1610.4695,7871.7095,4105.374,3873.8516,6282.1577,2047.8285,5152.872,6519.3267,2492.261,263.48315,8505.047,6085.6025,6664.632,8214.843,2852.794,9579.498,3662.96,119.35712,329.29263,4092.0984,2012.3397,1346.43,283.76395,2146.607,3164.2996,8172.9717,4571.4814,7736.094,5394.341,823.1139,702.9986,1737.935,2825.9102,807.30945,4439.522,5280.865,4143.299,869.21246,464.42575,8016.1333,8056.35,8144.0234,7519.5503,3398.9465,180.82268,2994.8853,7060.9272,1620.1293,8129.4517,8412.3955,4688.6646,2134.5955,852.67847,1758.1752,4734.403,2537.0596,9208.865,1306.8798,4273.237,2031.1884,3423.3982,2930.3467,4122.4814,2610.3757,5017.8296,530.2324,9619.333,6113.03,4486.419,5421.0586,965.57336,986.2951,7082.866,4650.728,684.74725,932.5874,9214.447,4250.5596,7612.8057,8745.518,3096.2688,3097.3423,6053.115,6832.566,8715.431,1411.9425,7134.026,5146.3486,7066.92,7990.4326,6318.359,1458.2933,3610.237,4934.684,8885.305,4361.459,4597.803,9778.684,6940.7485,2061.1794,1728.07,3805.5867,2419.5278,7872.2417,314.52066,5276.7344,5180.3384,8238.369,99.28895,3921.5354,3735.133,6106.8325,3002.896,8436.081,8051.952,6781.5356,7793.5513,7356.409,2751.1816,3366.9934,6627.8213,8508.203,8923.329,977.41,798.47595,9901.626,4197.868,3036.576,2249.4255,8046.929,4542.2627,8417.937,695.25073,5627.6963,9274.69,8341.615,565.7095,7215.6006,5745.2285,7877.827,9910.692,8096.801,4279.8716,2266.7275,8258.808,8958.382,2159.9902,915.2219,9405.193,7854.5034,8290.007,552.8691,7479.27,1867.7107,7388.5347,4645.702,2756.8333,1459.3174,9600.573,8150.7783,877.4823,7126.615,6233.865,5506.073,4054.6165,5405.0264,86.853745,3582.1812,9174.011,1995.1133,4520.9097,8873.6045,6659.1343,3889.9097,3576.5303,4184.704,1747.6971,8123.0205,1126.905,4578.9463,520.6793,6953.5786,1502.958,9271.071,703.4714,700.8796,8228.239,8100.9277,4500.605,893.69464,437.91055,7480.696,93.75329,8215.097,7891.5264,7524.484,3669.2695,5206.1567,7074.1875,213.25664,7659.896,5282.807,3872.6025,6618.8374,7472.494,6271.466,659.25006,6134.6274,8366.149,3033.1848,3939.2183,9824.181,5372.484,9453.013,6995.779,1204.7755,4202.284,9024.881,4777.583,1299.1604,530.4937,8914.815,3180.339,587.39246,4628.3228,1245.3992,7121.2944,7537.221,7941.8896,169.63153,1328.6412,445.39014,7873.507,5185.658,8284.466,9935.091,4910.274,7265.69,5184.506,2143.7498,872.8625,9094.735,8601.925,9479.95,2469.269,2794.8572,8659.876,6556.956,6019.3726,7404.1367,5799.919,6541.188,6570.3853,4595.4004,1804.2793,8108.1753,6353.2354,1594.1141,1421.7231,4499.824,1527.258,9480.705,2260.406,6244.7607,9890.971,7063.5483,9474.486,2554.4873,2515.4583,8948.709,9778.712,6104.5024,7776.2896,44.173447,8587.539,8099.7295,6254.7993,4848.694,2167.778,2605.4224,4898.875,730.2599,1361.1569,7365.8555,3647.85,5554.5024,7602.7124,7565.038,4932.073,9758.342,5223.045,9451.742,3312.1716,1244.7792,663.992,6556.23,6873.1655]} diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/math/base/special/cexpf/test/fixtures/julia/runner.jl new file mode 100644 index 000000000000..2409d0ea1053 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/test/fixtures/julia/runner.jl @@ -0,0 +1,81 @@ +#!/usr/bin/env julia +# +# @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 JSON + +""" + gen( re, im, name ) + +Generate fixture data and write to file. + +# Arguments + +* `re`: real components +* `im`: imaginary components +* `name::AbstractString`: output filename + +# Examples + +``` julia +julia> re = rand( 1000 ); +julia> im = rand( 1000 ); +julia> gen( re, im, \"data.json\" ); +``` +""" +function gen( re, im, name ) + expre = Array{Float32}( undef, length(re) ); + expim = Array{Float32}( undef, length(re) ); + for i in eachindex( re ) + z = exp( Complex{Float32}( re[i], im[i] ) ); + expre[ i ] = real( z ); + expim[ i ] = imag( z ); + end + + # Store data to be written to file as a collection: + data = Dict([ + ("re", re), + ("im", im), + ("expre", expre), + ("expim", expim), + ]); + + # Based on the script directory, create an output filepath: + filepath = joinpath( dir, name ); + + # Write the data to the output filepath as JSON: + outfile = open( filepath, "w" ); + write( outfile, JSON.json(data) ); + write( outfile, "\n" ); + close( outfile ); +end + +# Get the filename: +file = @__FILE__; + +# Extract the directory in which this file resides: +dir = dirname( file ); + +# Pure imaginary: +re = zeros( Float32, 500 ); +im = Float32.( ( rand( 500 ) .* 10000.0 ) .- 5.0 ); +gen( re, im, "pure_imaginary.json" ); + +# General complex: +re = Float32.( ( rand( 500 ) .* 93.0 ) .- 5.0 ); +im = Float32.( ( rand( 500 ) .* 100.0 ) .- 5.0 ); +gen( re, im, "general_complex.json" ); diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/test/test.js b/lib/node_modules/@stdlib/math/base/special/cexpf/test/test.js new file mode 100644 index 000000000000..2a4bdb703006 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/test/test.js @@ -0,0 +1,287 @@ +/** +* @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 isAlmostSameValuef = require( '@stdlib/number/float32/base/assert/is-almost-same-value' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var isPositiveZerof = require( '@stdlib/math/base/assert/is-positive-zerof' ); +var isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var PINF = require( '@stdlib/constants/float32/pinf' ); +var NINF = require( '@stdlib/constants/float32/ninf' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); +var realf = require( '@stdlib/complex/float32/real' ); +var imagf = require( '@stdlib/complex/float32/imag' ); +var cexpf = require( './../lib' ); + + +// FIXTURES // + +var pureImaginary = require( './fixtures/julia/pure_imaginary.json' ); +var generalComplex = require( './fixtures/julia/general_complex.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof cexpf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns a single-precision complex floating-point number', function test( t ) { + var v; + + v = cexpf( new Complex64( 0.0, 0.0 ) ); + t.strictEqual( realf( v ), 1.0, 'returns expected value' ); + t.strictEqual( imagf( v ), 0.0, 'returns expected value' ); + t.end(); +}); + +tape( 'the function computes exp(z) for pure imaginary z', function test( t ) { + var expre; + var expim; + var re; + var im; + var i; + var q; + + re = pureImaginary.re; + im = pureImaginary.im; + expre = pureImaginary.expre; + expim = pureImaginary.expim; + + for ( i = 0; i < re.length; i++ ) { + q = cexpf( new Complex64( re[ i ], im[ i ] ) ); + t.strictEqual( realf( q ), f32( expre[ i ] ), 'returns expected value' ); + t.strictEqual( imagf( q ), f32( expim[ i ] ), 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function computes exp(z) for complex z', function test( t ) { + var expre; + var expim; + var re; + var im; + var i; + var q; + + re = generalComplex.re; + im = generalComplex.im; + expre = generalComplex.expre; + expim = generalComplex.expim; + + for ( i = 0; i < re.length; i++ ) { + q = cexpf( new Complex64( re[ i ], im[ i ] ) ); + t.strictEqual( isAlmostSameValuef( realf( q ), f32( expre[ i ] ), 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostSameValuef( imagf( q ), f32( expim[ i ] ), 2 ), true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'if imaginary component is `+Infinity`, the function returns a complex number having `NaN` components', function test( t ) { + var v; + + v = cexpf( new Complex64( 0.0, PINF ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isnanf( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if imaginary component is `-Infinity`, the function returns a complex number having `NaN` components', function test( t ) { + var v; + + v = cexpf( new Complex64( 0.0, NINF ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isnanf( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `-Infinity`, the function returns a complex number with both components equal to `0`', function test( t ) { + var v; + + v = cexpf( new Complex64( NINF, 1.0 ) ); + t.strictEqual( realf( v ), 0.0, 'returns expected value' ); + t.strictEqual( imagf( v ), 0.0, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `+Infinity` and imaginary component is `0.0`, the function returns a complex number with the real component equal to `+Infinity` and imaginary component equal to `0.0`', function test( t ) { + var v; + + v = cexpf( new Complex64( PINF, 0.0 ) ); + t.strictEqual( realf( v ), PINF, 'returns expected value' ); + t.strictEqual( imagf( v ), 0.0, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `NaN` and imaginary component is `0.0`, the function returns a complex number with the real component equal to `NaN` and imaginary component equal to `0.0`', function test( t ) { + var v; + + v = cexpf( new Complex64( NaN, 0.0 ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( imagf( v ), 0.0, 'returns expected value' ); + t.end(); +}); + +tape( 'if imaginary component is `NaN`, the function returns a complex number with both components equal to `NaN`', function test( t ) { + var v; + + v = cexpf( new Complex64( 5.0, NaN ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isnanf( imagf( v ) ), true, 'returns expected value' ); + + v = cexpf( new Complex64( 0.0, NaN ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isnanf( imagf( v ) ), true, 'returns expected value' ); + + v = cexpf( new Complex64( NaN, NaN ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isnanf( imagf( v ) ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if imaginary component is `+0.0`, the function returns a complex number with an imaginary component equal to `+0.0`', function test( t ) { + var v; + + v = cexpf( new Complex64( 3.0, 0.0 ) ); + t.strictEqual( isPositiveZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if imaginary component is `-0.0`, the function returns a complex number with an imaginary component equal to `-0.0`', function test( t ) { + var v; + + v = cexpf( new Complex64( 3.0, -0.0 ) ); + t.strictEqual( isNegativeZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `NaN` and imaginary component is nonzero, the function returns a complex number with both components equal to `NaN`', function test( t ) { + var v; + + v = cexpf( new Complex64( NaN, 3.0 ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isnanf( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `NaN` and imaginary component is `+0.0`, the function returns a complex number with an imaginary component equal to `+0.0`', function test( t ) { + var v; + + v = cexpf( new Complex64( NaN, 0.0 ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isPositiveZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `NaN` and imaginary component is `-0.0`, the function returns a complex number with an imaginary component equal to `-0.0`', function test( t ) { + var v; + + v = cexpf( new Complex64( NaN, -0.0 ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isNegativeZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `+Infinity` and imaginary component is `+Infinity`, the function returns a complex number with the real component equal to `-Infinity` and imaginary component equal to `NaN`', function test( t ) { + var v; + + v = cexpf( new Complex64( PINF, PINF ) ); + t.strictEqual( realf( v ), NINF, 'returns expected value' ); + t.strictEqual( isnanf( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `-Infinity` and imaginary component is `+Infinity`, the function returns a complex number with the real component equal to `-0.0` and imaginary component equal to `+0.0`', function test( t ) { + var v; + + v = cexpf( new Complex64( NINF, PINF ) ); + t.strictEqual( isNegativeZerof( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isPositiveZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `-Infinity` and imaginary component is `-Infinity`, the function returns a complex number with the real component equal to `-0.0` and imaginary component equal to `-0.0`', function test( t ) { + var v; + + v = cexpf( new Complex64( NINF, NINF ) ); + t.strictEqual( isNegativeZerof( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isNegativeZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function computes exp(z) for pure real z (positive)', function test( t ) { + var v; + + v = cexpf( new Complex64( 1.0, 0.0 ) ); + t.strictEqual( realf( v ), 2.7182817459106445, 'returns expected value' ); + t.strictEqual( isPositiveZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function computes exp(z) for pure real z (negative)', function test( t ) { + var v; + + v = cexpf( new Complex64( -1.0, 0.0 ) ); + t.strictEqual( realf( v ), 0.3678794503211975, 'returns expected value' ); + t.strictEqual( isPositiveZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is a large positive value and imaginary component is `0.0`, the function returns `+Infinity`', function test( t ) { + var v; + + v = cexpf( new Complex64( 89.0, 0.0 ) ); + t.strictEqual( realf( v ), PINF, 'returns expected value' ); + t.strictEqual( isPositiveZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `+Infinity` and imaginary component is finite and nonzero, the function returns infinite components', function test( t ) { + var v; + + v = cexpf( new Complex64( PINF, 1.0 ) ); + t.strictEqual( realf( v ), PINF, 'returns expected value' ); + t.strictEqual( imagf( v ), PINF, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `-Infinity` and imaginary component is `0.0`, the function returns a complex number with both components equal to `+0.0`', function test( t ) { + var v; + + v = cexpf( new Complex64( NINF, 0.0 ) ); + t.strictEqual( isPositiveZerof( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isPositiveZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `+Infinity` and imaginary component is `-Infinity`, the function returns a complex number with the real component equal to `-Infinity` and imaginary component equal to `NaN`', function test( t ) { + var v; + + v = cexpf( new Complex64( PINF, NINF ) ); + t.strictEqual( realf( v ), NINF, 'returns expected value' ); + t.strictEqual( isnanf( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/cexpf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/cexpf/test/test.native.js new file mode 100644 index 000000000000..e31d0316cbaa --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cexpf/test/test.native.js @@ -0,0 +1,296 @@ +/** +* @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 resolve = require( 'path' ).resolve; +var tape = require( 'tape' ); +var isAlmostSameValuef = require( '@stdlib/number/float32/base/assert/is-almost-same-value' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var isPositiveZerof = require( '@stdlib/math/base/assert/is-positive-zerof' ); +var isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var PINF = require( '@stdlib/constants/float32/pinf' ); +var NINF = require( '@stdlib/constants/float32/ninf' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); +var realf = require( '@stdlib/complex/float32/real' ); +var imagf = require( '@stdlib/complex/float32/imag' ); +var tryRequire = require( '@stdlib/utils/try-require' ); + + +// VARIABLES // + +var cexpf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( cexpf instanceof Error ) +}; + + +// FIXTURES // + +var pureImaginary = require( './fixtures/julia/pure_imaginary.json' ); +var generalComplex = require( './fixtures/julia/general_complex.json' ); + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof cexpf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns a single-precision complex floating-point number', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( 0.0, 0.0 ) ); + t.strictEqual( realf( v ), 1.0, 'returns expected value' ); + t.strictEqual( imagf( v ), 0.0, 'returns expected value' ); + t.end(); +}); + +tape( 'the function computes exp(z) for pure imaginary z', opts, function test( t ) { + var expre; + var expim; + var re; + var im; + var i; + var q; + + re = pureImaginary.re; + im = pureImaginary.im; + expre = pureImaginary.expre; + expim = pureImaginary.expim; + + for ( i = 0; i < re.length; i++ ) { + q = cexpf( new Complex64( re[ i ], im[ i ] ) ); + t.strictEqual( realf( q ), f32( expre[ i ] ), 'returns expected value' ); + t.strictEqual( imagf( q ), f32( expim[ i ] ), 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function computes exp(z) for complex z', opts, function test( t ) { + var expre; + var expim; + var re; + var im; + var i; + var q; + + re = generalComplex.re; + im = generalComplex.im; + expre = generalComplex.expre; + expim = generalComplex.expim; + + for ( i = 0; i < re.length; i++ ) { + q = cexpf( new Complex64( re[ i ], im[ i ] ) ); + t.strictEqual( isAlmostSameValuef( realf( q ), f32( expre[ i ] ), 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostSameValuef( imagf( q ), f32( expim[ i ] ), 2 ), true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'if imaginary component is `+Infinity`, the function returns a complex number having `NaN` components', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( 0.0, PINF ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isnanf( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if imaginary component is `-Infinity`, the function returns a complex number having `NaN` components', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( 0.0, NINF ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isnanf( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `-Infinity`, the function returns a complex number with both components equal to `0`', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( NINF, 1.0 ) ); + t.strictEqual( realf( v ), 0.0, 'returns expected value' ); + t.strictEqual( imagf( v ), 0.0, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `+Infinity` and imaginary component is `0.0`, the function returns a complex number with the real component equal to `+Infinity` and imaginary component equal to `0.0`', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( PINF, 0.0 ) ); + t.strictEqual( realf( v ), PINF, 'returns expected value' ); + t.strictEqual( imagf( v ), 0.0, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `NaN` and imaginary component is `0.0`, the function returns a complex number with the real component equal to `NaN` and imaginary component equal to `0.0`', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( NaN, 0.0 ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( imagf( v ), 0.0, 'returns expected value' ); + t.end(); +}); + +tape( 'if imaginary component is `NaN`, the function returns a complex number with both components equal to `NaN`', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( 5.0, NaN ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isnanf( imagf( v ) ), true, 'returns expected value' ); + + v = cexpf( new Complex64( 0.0, NaN ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isnanf( imagf( v ) ), true, 'returns expected value' ); + + v = cexpf( new Complex64( NaN, NaN ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isnanf( imagf( v ) ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if imaginary component is `+0.0`, the function returns a complex number with an imaginary component equal to `+0.0`', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( 3.0, 0.0 ) ); + t.strictEqual( isPositiveZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if imaginary component is `-0.0`, the function returns a complex number with an imaginary component equal to `-0.0`', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( 3.0, -0.0 ) ); + t.strictEqual( isNegativeZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `NaN` and imaginary component is nonzero, the function returns a complex number with both components equal to `NaN`', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( NaN, 3.0 ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isnanf( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `NaN` and imaginary component is `+0.0`, the function returns a complex number with an imaginary component equal to `+0.0`', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( NaN, 0.0 ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isPositiveZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `NaN` and imaginary component is `-0.0`, the function returns a complex number with an imaginary component equal to `-0.0`', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( NaN, -0.0 ) ); + t.strictEqual( isnanf( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isNegativeZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `+Infinity` and imaginary component is `+Infinity`, the function returns a complex number with the real component equal to `-Infinity` and imaginary component equal to `NaN`', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( PINF, PINF ) ); + t.strictEqual( realf( v ), NINF, 'returns expected value' ); + t.strictEqual( isnanf( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `-Infinity` and imaginary component is `+Infinity`, the function returns a complex number with the real component equal to `-0.0` and imaginary component equal to `+0.0`', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( NINF, PINF ) ); + t.strictEqual( isNegativeZerof( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isPositiveZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `-Infinity` and imaginary component is `-Infinity`, the function returns a complex number with the real component equal to `-0.0` and imaginary component equal to `-0.0`', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( NINF, NINF ) ); + t.strictEqual( isNegativeZerof( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isNegativeZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function computes exp(z) for pure real z (positive)', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( 1.0, 0.0 ) ); + t.strictEqual( realf( v ), 2.7182817459106445, 'returns expected value' ); + t.strictEqual( isPositiveZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function computes exp(z) for pure real z (negative)', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( -1.0, 0.0 ) ); + t.strictEqual( realf( v ), 0.3678794503211975, 'returns expected value' ); + t.strictEqual( isPositiveZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is a large positive value and imaginary component is `0.0`, the function returns `+Infinity`', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( 89.0, 0.0 ) ); + t.strictEqual( realf( v ), PINF, 'returns expected value' ); + t.strictEqual( isPositiveZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `+Infinity` and imaginary component is finite and nonzero, the function returns infinite components', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( PINF, 1.0 ) ); + t.strictEqual( realf( v ), PINF, 'returns expected value' ); + t.strictEqual( imagf( v ), PINF, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `-Infinity` and imaginary component is `0.0`, the function returns a complex number with both components equal to `+0.0`', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( NINF, 0.0 ) ); + t.strictEqual( isPositiveZerof( realf( v ) ), true, 'returns expected value' ); + t.strictEqual( isPositiveZerof( imagf( v ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if real component is `+Infinity` and imaginary component is `-Infinity`, the function returns a complex number with the real component equal to `-Infinity` and imaginary component equal to `NaN`', opts, function test( t ) { + var v; + + v = cexpf( new Complex64( PINF, NINF ) ); + t.strictEqual( realf( v ), NINF, 'returns expected value' ); + t.strictEqual( isnanf( imagf( v ) ), true, 'returns expected value' ); + t.end(); +});