@@ -116,6 +116,17 @@ partial record Mulf
116116 && AsTheWholeLimit ( distributed , x , dist , side ) is { } termByTerm
117117 && termByTerm . Evaled != MathS . NaN )
118118 return termByTerm ;
119+ // So, with a power u^v for one factor whose exponent tends to a constant c other than 0, is the
120+ // product read as (other * u^c) * u^(v - c), where u^(v - c) has a finite limit other than 0. That
121+ // holds for the principal power, e^(v ln u) being e^(c ln u) e^((v - c) ln u). The exponent of
122+ // (tan(x) + 1)^(x^(x - 1)) at 0 from the right is (tan(x) + 1 - 1) * x^(x - 1), and l'Hopital's rule
123+ // differentiated x^(x - 1) for longer than any caller waits, where tan(x) / x tends to 1 and x^x to 1.
124+ if ( side is not ApproachFrom . BothSides && ! IsComparingSides
125+ && multiplierLimit is { } zeroOrInfinity7 && multiplicandLimit is { } zeroOrInfinity8
126+ && IsZeroTimesAnInfinity ( zeroOrInfinity7 , zeroOrInfinity8 )
127+ && ( ByTheExponentsLimit ( Multiplicand , Multiplier , x , dist , side ) ?? ByTheExponentsLimit ( Multiplier , Multiplicand , x , dist , side ) )
128+ is { } byTheExponentsLimit )
129+ return byTheExponentsLimit ;
119130 var ( mp , md ) =
120131 ( multiplierLimit , multiplicandLimit ) switch
121132 {
@@ -266,6 +277,21 @@ private static bool IsAnIndeterminateQuotient(Entity dividend, Entity divisor)
266277 _ => false ,
267278 } ;
268279
280+ /// <summary>
281+ /// The limit of <c>power * other</c> read as <c>(other * u^c) * u^(v - c)</c>, for a power <c>u^v</c> whose exponent
282+ /// tends to a constant <c>c</c> other than 0 and where <c>u^(v - c)</c> tends to a finite real other than 0.
283+ /// </summary>
284+ private static Entity ? ByTheExponentsLimit ( Entity power , Entity other , Variable x , Entity dist , ApproachFrom side )
285+ {
286+ if ( power is not Powf ( var @base , var exponent ) || ! exponent . ContainsNode ( x )
287+ || exponent . ComputeLimitDivideEtImpera ( x , dist , side ) ? . Evaled is not Real { IsFinite : true , IsZero : false , IsNaN : false } constant
288+ || MathS . Pow ( @base , ( exponent - constant ) . InnerSimplified ) . ComputeLimitDivideEtImpera ( x , dist , side ) ? . Evaled
289+ is not Real { IsFinite : true , IsZero : false , IsNaN : false } rest
290+ || AsTheWholeLimit ( other * MathS . Pow ( @base , constant ) , x , dist , side ) ? . Evaled is not Number { IsNaN : false } head )
291+ return null ;
292+ return ( head * rest ) . Evaled ;
293+ }
294+
269295 /// <summary>Whether two factors' limits make a product 0 * oo.</summary>
270296 private static bool IsZeroTimesAnInfinity ( Entity first , Entity second )
271297 => ( first . Evaled , second . Evaled ) switch
0 commit comments