EXPM function returns totally wrong result for many negative values
## Bug Description EXPM function returns totally wrong result for negative numbers with large absolute values. Therefore, many computations relating to sampled-data control systems produce wrong results. ## Steps to reproduce ``` --> expm(-100) ans = 0.0352949 ``` Matrix case ``` --> expm(diag([-100 -200])) ans = 0.0352949 0. 0. 0.1867493 ``` ## What is the expected correct behavior? It is expected that for scalar values expm(x) == exp(x) ``` --> exp(-100) ans = 3.720D-44 -->diag(exp([-100 -200])) ans = 10^(-64) * 3.720D+20 0. 0. 1.384D-23 ``` ## Error log No errors reported. ## Version info This bug was created in version 6.0 and takes place in all versions up to 2024 inclusive. Version 5.5.2 is free of this bug.
issue