XIRR (Internal Rate of Return) implementation in Java