expm1

Syntax

expm1(X)

Details

Return exp(X)-1.

The expm1 function in DolphinDB and the expm1 function in NumPy are consistent in their core functionality. However, their design focuses differ:

  • DolphinDB expm1 emphasizes vectorization and distributed computing capabilities, making it suitable for large-scale data processing.
  • NumPy expm1, as part of a general-purpose numerical computing library, is also based on the ufunc mechanism, and provides the same set of low-level control parameters, including:
    • out: supports writing results into a specified array for in-place computation
    • where: supports conditional element-wise computation
    • dtype: controls the data type of computation and output
    • casting: controls type casting rules
    • order: specifies the memory layout of the output array
    • subok: controls whether to preserve subclass types

Similarly, these parameters are not unique to expm1, but are general features of NumPy ufuncs.

Parameters

X is a scalar/pair/vector/matrix/table.

Returns

DOUBLE type with the same data form as X.

Examples

expm1(5);
// output: 147.413159

expm1(1 2 3 NULL);
// output: [1.718282,6.389056,19.085537,]

expm1(1..4$2:2);
#0 #1
1.718282 19.085537
6.389056 53.59815