Another temporary fix is to add a rule in 'resolveTTSpecial'.
We resolve these 2 types manually, but the automatic
coercion will fail later, at least stack overflow is gone.
diff --git a/src/interp/i-resolv.boot b/src/interp/i-resolv.boot
index dbe3a228..fc150670 100644
--- a/src/interp/i-resolv.boot
+++ b/src/interp/i-resolv.boot
@@ -271,6 +271,9 @@ resolveTTSpecial(t1,t2) ==
t1 is ['Polynomial,R] and t2 is ['Complex,S] =>
containsPolynomial(S) => resolveTT1(['Polynomial,['Complex,R]],t2)
['Polynomial,['Complex,resolveTT1(R,S)]]
+ t1 is '(Expression (Complex (Integer))) and
+ t2 is '(Fraction (Polynomial (AlgebraicNumber))) =>
+ t1
t1 is ['Expression, R] and t2 is ['Complex,S] =>
dom' := resolveTT(R, t2)
null dom' => nil
On Mon, Feb 19, 2018 at 11:46 PM, Waldek Hebisch
<[email protected]> wrote:
> oldk1331 wrote:
>>
>> Still, this is a bug that should be fixed.
>>
>> A minimal example to reproduce this bug would be:
>>
>> 2^(1/2)/x/(%i)^(1/2)
>>
>> This bug happens during type resolution between
>> Fraction(Polynomial(AlgebraicNumber)) and
>> Expression(Complex(Integer))
>>
>> I'll try to fix this bug.
>
> We get infinite recursion where each step separately
> is resonable. AFAICS proper fix will require substantial
> effort (significant changes to typechecker) and it will
> take long time. For now we can try lessen the impact
> by limiting depth of recursion. I will try to find
> resonable limit.
>
> --
> Waldek Hebisch
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.