Hello,
Le mar. 10 juin 2025 à 00:50, Waldek Hebisch <[email protected]> a écrit :
> There are some bugs that I looked up, but ATM do not know how to
> solve.
>
> 1)
>
> ((%i*t-1)*z*(z^2-3*t^2-3))/(sqrt(2)*sqrt(3)*(t^4+4*%i*t^3-6*t^2-4*%i*t+1))
>
> give type UnivariatePolynomial(t,Expression(Complex(Integer))). Result
> is biggish, so I do not put it here, but one can see that t-s from
> numerater are treated as variable in UnivariatePolynomial, while
> t-s in denominator are treated as belonging to
> Expression(Complex(Integer)).
>
That may be unsatisfactory but, comment out:
t1 = '(AlgebraicNumber) and t2 is ['Complex,.] =>
resolveTT1('(Expression (Integer)), t2)
in resolveTTSpecial (line 176 of src/interp/i-resolve.boot) and let the
user choose the type of arg(s) of sqrt and consort or coerce algebraic
numbers himself. And, eventually, implement some specific
coercion(s)/conversion(s) in Spad. Commenting this breaks for example
operation between Complex(*) * AlgebraicNumber (sqrt(2)*complex(1,2).
Or
--- /home/greg/Tmp/fricas/src/interp/i-resolv.boot 2025-06-08
17:07:09.731630604 +0200
+++ src/interp/i-resolv.boot 2025-06-10 11:34:56.189106604 +0200
@@ -190,12 +190,15 @@
t1 = '(AlgebraicNumber) and (t2 = ['Complex, $Float] or t2 = ['Complex,
$DoubleFloat]) =>
['Expression, CADR t2]
- t1 = '(AlgebraicNumber) and t2 is ['Complex,.] =>
- resolveTT1('(Expression (Integer)), t2)
-
t1 = ['AlgebraicNumber] and t2 is ['Polynomial, ['Fraction, ['Integer]]]
=>
['Polynomial, ['AlgebraicNumber]]
+ t1 = '(AlgebraicNumber) and t2 is ['Polynomial,.] =>
+ resolveTT1('(Expression (Integer)), t2)
+
+ t1 = '(AlgebraicNumber) and t2 is ['Complex,.] =>
+ resolveTT1('(Expression (Integer)), t2)
+
t1 = ['AlgebraicNumber] and
t2 is ['Fraction, ['Polynomial, ['Fraction, ['Integer]]]] =>
['Fraction, ['Polynomial, ['AlgebraicNumber]]]
?
- Greg
--
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 view this discussion visit
https://groups.google.com/d/msgid/fricas-devel/CAHnU2daRdbaFdiLvxOZrTY9VFBXideHThrC23Enqf9CvPKU%3DDQ%40mail.gmail.com.