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

Commit 5d4756ed authored by Hans Boehm's avatar Hans Boehm Committed by android-build-merger
Browse files

Handle ln(rational multiple of e) better

am: 551f8cb2

Change-Id: I91cafee1e8dc9ad76f6261ab95909b9aba4a82b6
parents 9223c18a 551f8cb2
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)");