You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`a`: Shall be a rank-2 `real` or `complex` array containing the data. It is an `intent(in)` argument.
1904
1904
1905
1905
`order` (optional): Shall be a non-negative `integer` value specifying the order of the Pade approximation. By default `order=10`. It is an `intent(in)` argument.
1906
1906
1907
+
### Return value
1908
+
1909
+
The returned array `E` contains the Pade approximation of \(\exp(A)\).
1910
+
1911
+
If `A` is non-square or `order` is negative, it raises a `LINALG_VALUE_ERROR`.
1912
+
1913
+
### Example
1914
+
1915
+
```fortran
1916
+
{!example/linalg/example_expm.f90!}
1917
+
```
1918
+
1919
+
## `matrix_exp` - Computes the matrix exponential {#matrix_exp}
1920
+
1921
+
### Status
1922
+
1923
+
Experimental
1924
+
1925
+
### Description
1926
+
1927
+
Given a matrix \(A\), this function computes its matrix exponential \(E = \exp(A)\) using a Pade approximation.
1928
+
1929
+
### Syntax
1930
+
1931
+
`call `[[stdlib_linalg(module):matrix_exp(interface)]]`(a [, e, order, err])`
1932
+
1933
+
### Arguments
1934
+
1935
+
`a`: Shall be a rank-2 `real` or `complex` array containing the data. If `e` is not passed, it is an `intent(inout)` argument and is overwritten on exit by the matrix exponential. If `e` is passed, it is an `intent(in)` argument and is left unchanged.
1936
+
1937
+
`e` (optional): Shall be a rank-2 `real` or `complex` array with the same dimensions as `a`. It is an `intent(out)` argument. On exit, it contains the matrix exponential of `a`.
1938
+
1939
+
`order` (optional): Shall be a non-negative `integer` value specifying the order of the Pade approximation. By default `order=10`. It is an `intent(in)` argument.
1940
+
1907
1941
`err` (optional): Shall be a `type(linalg_state_type)` value. This is an `intent(out)` argument.
1908
1942
1909
1943
### Return value
1910
1944
1911
-
The returned array `E` contains the Pade approximation of \(\exp(A)\).
1945
+
The returned array `A` (in-place) or `E` (out-of-place) contains the Pade approximation of \(\exp(A)\).
1912
1946
1913
1947
If `A` is non-square or `order` is negative, it raises a `LINALG_VALUE_ERROR`.
1914
1948
If `err` is not present, exceptions trigger an `error stop`.
0 commit comments