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
In some circumstances, you end up with value being a Complex number. When you do .to_s on a Complex number, string representation of that looks like 3.81633493748609+8695.884928556025i — and when you make a BigDecimal out of that, it ignores everything starting with the first non-digit character (in this case, +), so the result is only the real part of complex number, which is completely incorrect:
This value matches what Excel 2013's XIRR function returns.
Now, if we change the date of $90 transaction just one day further...
Excel 2013's XIRR function returns correct result in this case:
0.085676876
.The text was updated successfully, but these errors were encountered: