SciEx (sci_ex v0.2.0)

Documentation for SciEx.

Summary

Functions

Operator *, which is equivalente to the SciEx.multiply/2 function.

Operator +, which is equivalente to the SciEx.add/2 function.

Operator -, which is equivalente to the SciEx.subtract/2 function.

Operator /, which is equivalente to the SciEx.divide/2 function.

Inverse cosine function.

Inverse hyperbolic cosine function.

Add two values (arrays or scalars). If both arguments are arrays, this function implements element-wise subtraction.

Inverse sine function.

Inverse hyperbolic sine function.

Inverse tangent function.

Inverse hyperbolic tangent function.

Returns the smallest integer greater than or equal to x.

Cosine function.

Hyperbolic cosine function.

Returns the cube root of a number.

Divide two values (arrays or scalars). If both arguments are arrays, this function implements element-wise division.

Error function.

Complementary error function.

Returns 2^x.

Returns e^x, (the exponential function).

Returns the largest integer less than or equal to x.

Returns the fractional part of x.

Gets the parallelization strategy from the currrent process.

Returns the natural logarithm of the number.

Returns the base 2 logarithm of the number.

Returns the base 10 logarithm of the number.

Returns the logarithm of the number (or array) with respect to an arbitrary base.

Elementwise maximum of array.

Elementwise minimum of array.

Multiply two values (arrays or scalars). If both arguments are arrays, this function implements element-wise multiplication.

Run a function with the given parallelization strategy.

Puts a parallelization strategy in the current process.

Returns the nearest integer to self. If a value is half-way between two integers, round away from 0.0.

Returns the nearest integer to a number. Rounds half-way cases to the number with an even least significant digit.

Sine function.

Hyperbolic sine function.

Subtract two values (arrays or scalars). If both arguments are arrays, this function implements element-wise subtraction.

Tangent function.

Hyperbolic tangent function.

Returns the integer part of x. This means that non-integer numbers are always truncated towards zero.

Types

options()

@type options() :: [{:parallel, parallelization_strategy()}]

parallelization_strategy()

@type parallelization_strategy() ::
  :always_parallel | :never_parallel | {:size_cutoff, integer()}

Functions

a * b

Operator *, which is equivalente to the SciEx.multiply/2 function.

a + b

Operator +, which is equivalente to the SciEx.add/2 function.

a - b

Operator -, which is equivalente to the SciEx.subtract/2 function.

a / b

Operator /, which is equivalente to the SciEx.divide/2 function.

abs(x, opts \\ [])

TODO

acos(x, opts \\ [])

Inverse cosine function.

Binds the f64::acos() (for 64-bit floating point numbers) and the f32::acos() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

acosh(x, opts \\ [])

Inverse hyperbolic cosine function.

Binds the f64::acosh() (for 64-bit floating point numbers) and the f32::acosh() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

add(a, b)

Add two values (arrays or scalars). If both arguments are arrays, this function implements element-wise subtraction.

asin(x, opts \\ [])

Inverse sine function.

Binds the f64::asin() (for 64-bit floating point numbers) and the f32::asin() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

asinh(x, opts \\ [])

Inverse hyperbolic sine function.

Binds the f64::sinh() (for 64-bit floating point numbers) and the f32::sinh() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

atan(x, opts \\ [])

Inverse tangent function.

Binds the f64::atan() (for 64-bit floating point numbers) and the f32::atan() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

atanh(x, opts \\ [])

Inverse hyperbolic tangent function.

Binds the f64::atanh() (for 64-bit floating point numbers) and the f32::atanh() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

ceil(x, opts \\ [])

Returns the smallest integer greater than or equal to x.

This function always returns the precise result.

cos(x, opts \\ [])

Cosine function.

Binds the f64::cos() (for 64-bit floating point numbers) and the f32::cos() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

cosh(x, opts \\ [])

Hyperbolic cosine function.

Binds the f64::cosh() (for 64-bit floating point numbers) and the f32::cosh() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

cube_root(x, opts \\ [])

Returns the cube root of a number.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

div_euclid(x, y, opts \\ [])

TODO

divide(a, b)

Divide two values (arrays or scalars). If both arguments are arrays, this function implements element-wise division.

Raises an error in case of division by zero.

erf(x, opts \\ [])

Error function.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

erfc(x, opts \\ [])

Complementary error function.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

exp2(x, opts \\ [])

Returns 2^x.

Binds the f64::exp2() (for 64-bit floating point numbers) and the f32::exp2() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

exp(x, opts \\ [])

Returns e^x, (the exponential function).

Binds the f64::exp() (for 64-bit floating point numbers) and the f32::exp() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

exp_m1(x, opts \\ [])

TODO

Binds the f64::exp_m1() (for 64-bit floating point numbers) and the f32::exp_m1() (for 32-bit floating point numbers). This function is vectorized.

floor(x, opts \\ [])

Returns the largest integer less than or equal to x.

This function always returns the precise result.

fract(x, opts \\ [])

Returns the fractional part of x.

This function always returns the precise result.

Binds the f64::fract() (for 64-bit floating point numbers) and the f32::fract() (for 32-bit floating point numbers). This function is vectorized.

get_parallelization_strategy()

Gets the parallelization strategy from the currrent process.

hypot(x, y, opts \\ [])

TODO

j0(x, opts \\ [])

TODO

Binds the f64::j0() (for 64-bit floating point numbers) and the f32::j0() (for 32-bit floating point numbers). This function is vectorized.

j1(x, opts \\ [])

TODO

Binds the f64::j1() (for 64-bit floating point numbers) and the f32::j1() (for 32-bit floating point numbers). This function is vectorized.

lgamma(x, opts \\ [])

TODO

ln(x, opts \\ [])

Returns the natural logarithm of the number.

This returns NaN when the number is negative, and negative infinity when number is zero.

Binds the f64::ln() (for 64-bit floating point numbers) and the f32::ln() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

ln_1p(x, opts \\ [])

TODO

Binds the f64::logp1() (for 64-bit floating point numbers) and the f32::logp1() (for 32-bit floating point numbers). This function is vectorized.

log2(x, opts \\ [])

Returns the base 2 logarithm of the number.

This returns NaN when the number is negative, and negative infinity when number is zero.

Binds the f64::log2() (for 64-bit floating point numbers) and the f32::log2() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

log10(x, opts \\ [])

Returns the base 10 logarithm of the number.

This returns NaN when the number is negative, and negative infinity when number is zero.

Binds the f64::log10() (for 64-bit floating point numbers) and the f32::log10() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

log(x, y, opts \\ [])

Returns the logarithm of the number (or array) with respect to an arbitrary base.

This returns NaN when the number is negative, and negative infinity when number is zero.

The result might not be correctly rounded owing to implementation details; SciEx.log2/1 can produce more accurate results for base 2, and SciEx.log10/1 can produce more accurate results for base 10.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

max(array)

Elementwise maximum of array.

min(array)

Elementwise minimum of array.

multiply(a, b)

Multiply two values (arrays or scalars). If both arguments are arrays, this function implements element-wise multiplication.

parallel(strategy, fun)

Run a function with the given parallelization strategy.

The parallelization strategy is set for the current process for the duration of the function's execution and then reset to the previous value.

powf(x, y, opts \\ [])

TODO

put_parallelization_strategy(strategy)

Puts a parallelization strategy in the current process.

rem_euclid(x, y, opts \\ [])

TODO

round(x, opts \\ [])

Returns the nearest integer to self. If a value is half-way between two integers, round away from 0.0.

This function always returns the precise result.

round_ties_even(x, opts \\ [])

@spec round_ties_even(SciEx.Types.float_value(), options()) ::
  SciEx.Types.float_value()

Returns the nearest integer to a number. Rounds half-way cases to the number with an even least significant digit.

This function always returns the precise result.

Binds the f64::round() (for 64-bit floating point numbers) and the f32::round() (for 32-bit floating point numbers). This function is vectorized.

sin(x, opts \\ [])

Sine function.

Binds the f64::sin() (for 64-bit floating point numbers) and the f32::sin() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

sinh(x, opts \\ [])

Hyperbolic sine function.

Binds the f64::sinh() (for 64-bit floating point numbers) and the f32::sinh() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

sqrt(x, opts \\ [])

TODO

Binds the f64::sqrt() (for 64-bit floating point numbers) and the f32::sqrt() (for 32-bit floating point numbers). This function is vectorized.

subtract(a, b)

Subtract two values (arrays or scalars). If both arguments are arrays, this function implements element-wise subtraction.

tan(x, opts \\ [])

Tangent function.

Binds the f64::tan() (for 64-bit floating point numbers) and the f32::tan() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

tanh(x, opts \\ [])

Hyperbolic tangent function.

Binds the f64::tanh() (for 64-bit floating point numbers) and the f32::tanh() (for 32-bit floating point numbers). This function is vectorized.

Unspecified precision

The precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next. This should not happen in practice, but those are the guarantees that Rust gives us.

trunc(x, opts \\ [])

Returns the integer part of x. This means that non-integer numbers are always truncated towards zero.

This function always returns the precise result.

Binds the f64::trunc() (for 64-bit floating point numbers) and the f32::trunc() (for 32-bit floating point numbers). This function is vectorized.

y0(x, opts \\ [])

TODO

Binds the f64::y0() (for 64-bit floating point numbers) and the f32::y0() (for 32-bit floating point numbers). This function is vectorized.

y1(x, opts \\ [])

TODO

Binds the f64::y1() (for 64-bit floating point numbers) and the f32::y1() (for 32-bit floating point numbers). This function is vectorized.