Repository navigation
Solve an inequality with x on both sides of ln, exp or sqrt (#2660) - #2663
Open
Rafael-SOWNet wants to merge 1 commit into
Open
Rafael-SOWNet wants to merge 1 commit into
Rafael-SOWNet wants to merge 1 commit into
Conversation
Solve threw NotSufficientlySupportedException for an inequality with x on both sides of a logarithm, an exponential or a square root. MonotoneInverted (#2586) read such a function only against a constant. F(u) op F(v), for the same strictly increasing F on both sides, is u op v where both are defined: ln(u) < ln(v) is u > 0, v > 0 and u < v. A base below 1 reverses the comparison. A square root against an expression without one is squared where both sides are nonnegative. sqrt(u) < w is u >= 0, w > 0 and u < w^2. sqrt(u) > w holds where u >= 0 and w < 0, or w >= 0 and u > w^2. Each is then solved as those polynomial or monotone inequalities. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2663 +/- ##
=======================================
Coverage 86.70% 86.70%
=======================================
Files 346 346
Lines 75724 75761 +37
Branches 22145 22162 +17
=======================================
+ Hits 65654 65689 +35
Misses 5431 5431
- Partials 4639 4641 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SolvethrewNotSufficientlySupportedExceptionfor an inequality withxon both sides of a logarithm, an exponential or a square root.MonotoneInverted(#2586) read such a function only against a constant.Fix
F(u) op F(v)isu op vwherever both are defined. This covers a logarithm or an exponential to one constant base, and a square root on each side. A base below 1 reverses the comparison.sqrt(u) < wisu >= 0,w > 0andu < w^2.sqrt(u) > wholds whereu >= 0andw < 0, or wherew >= 0andu > w^2..Solve("x")sqrt(x + 5) <= x[(1 + sqrt(21))/2; +oo)sqrt(4 - x) <= x - 1[(1 + sqrt(13))/2; 4]sqrt(x + 3) > x[-3; 0) \/ [0; (sqrt(13) + 1)/2)exp(x) > exp(3x - 1)(-oo; 1/2)ln(x) < ln(4 - x)(0; 2)sqrt(x) < sqrt(2 - x)[0; 1)Checks
x = -1000.5only, forexp(x) > exp(3x - 1)and similar. There the evaluator answersexp(-1000.5) > exp(-3002.5)asFalse, because both sides underflow to 0. That is an evaluator defect that exists on master too, not a solver error.sqrt(x + 3) > xcomes back as two adjacent intervals that are not merged. That is a separate cosmetic issue in set union.Closes #2660.
🤖 Generated with Claude Code