Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 030e3f9f authored by Hans Boehm's avatar Hans Boehm Committed by android-build-merger
Browse files

Handle ln(rational multiple of e) better am: 551f8cb2

am: 5d4756ed

Change-Id: Iec76bfee91a37830851d110da89abbaf3b767057
parents 531bf87d 5d4756ed
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1011,6 +1011,9 @@ public class UnifiedReal {
    }

    public UnifiedReal ln() {
        if (mCrFactor == CR_E) {
            return new UnifiedReal(mRatFactor, CR_ONE).ln().add(ONE);
        }
        if (isComparable(ZERO)) {
            if (signum() <= 0) {
                throw new ArithmeticException("log(non-positive)");