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.
TODO
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.
TODO
TODO
Returns the natural logarithm of the number.
TODO
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.
TODO
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.
TODO
TODO
Types
@type options() :: [{:parallel, parallelization_strategy()}]
@type parallelization_strategy() :: :always_parallel | :never_parallel | {:size_cutoff, integer()}
Functions
@spec SciEx.Types.numeric_value() * SciEx.Types.numeric_value() :: SciEx.Types.numeric_value()
@spec SciEx.Types.float_value() * SciEx.Types.float_value() :: SciEx.Types.float_value()
Operator *, which is equivalente to the SciEx.multiply/2 function.
@spec SciEx.Types.numeric_value() + SciEx.Types.numeric_value() :: SciEx.Types.numeric_value()
@spec SciEx.Types.float_value() + SciEx.Types.float_value() :: SciEx.Types.float_value()
Operator +, which is equivalente to the SciEx.add/2 function.
@spec SciEx.Types.numeric_value() - SciEx.Types.numeric_value() :: SciEx.Types.numeric_value()
@spec SciEx.Types.float_value() - SciEx.Types.float_value() :: SciEx.Types.float_value()
Operator -, which is equivalente to the SciEx.subtract/2 function.
@spec SciEx.Types.numeric_value() / SciEx.Types.numeric_value() :: SciEx.Types.numeric_value()
@spec SciEx.Types.float_value() / SciEx.Types.float_value() :: SciEx.Types.float_value()
Operator /, which is equivalente to the SciEx.divide/2 function.
@spec abs(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
TODO
@spec acos(SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
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.
@spec acosh(SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
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.
@spec add(SciEx.Types.float_value(), SciEx.Types.float_value()) :: SciEx.Types.float_value()
Add two values (arrays or scalars). If both arguments are arrays, this function implements element-wise subtraction.
@spec asin(SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
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.
@spec asinh(SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
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.
@spec atan(SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
@spec atan(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
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.
@spec atanh(SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
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.
@spec ceil(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
Returns the smallest integer greater than or equal to x.
This function always returns the precise result.
@spec cos(SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
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.
@spec cosh(SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
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.
@spec cube_root(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
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.
@spec div_euclid(SciEx.Types.float_value(), SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
TODO
@spec divide(SciEx.Types.float_value(), SciEx.Types.float_value()) :: SciEx.Types.float_value()
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.
@spec erf(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
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.
@spec erfc(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
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.
@spec exp2(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
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.
@spec exp(SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
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.
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.
@spec floor(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
Returns the largest integer less than or equal to x.
This function always returns the precise result.
@spec fract(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
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.
Gets the parallelization strategy from the currrent process.
@spec hypot(SciEx.Types.float_value(), SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
TODO
@spec j0(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
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.
@spec j1(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
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.
@spec lgamma(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
TODO
@spec ln(SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
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.
@spec ln_1p(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
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.
@spec log2(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
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.
@spec log10(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
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.
@spec log(SciEx.Types.numeric_value(), SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
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.
Elementwise maximum of array.
Elementwise minimum of array.
@spec multiply(SciEx.Types.float_value(), SciEx.Types.float_value()) :: SciEx.Types.float_value()
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.
The parallelization strategy is set for the current process for the duration of the function's execution and then reset to the previous value.
@spec powf(SciEx.Types.numeric_value(), SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
TODO
Puts a parallelization strategy in the current process.
@spec rem_euclid(SciEx.Types.float_value(), SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
TODO
@spec round(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
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.
@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.
@spec sin(SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
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.
@spec sinh(SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
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.
@spec sqrt(SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
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.
@spec subtract(SciEx.Types.float_value(), SciEx.Types.float_value()) :: SciEx.Types.float_value()
Subtract two values (arrays or scalars). If both arguments are arrays, this function implements element-wise subtraction.
@spec tan(SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
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.
@spec tanh(SciEx.Types.numeric_value(), options()) :: SciEx.Types.numeric_value()
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.
@spec trunc(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
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.
@spec y0(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
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.
@spec y1(SciEx.Types.float_value(), options()) :: SciEx.Types.float_value()
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.