On Sat, Jul 27, 2024 at 12:38:30AM +0200, Ralf Hemmecke wrote:
>
> Anyway, I suggest another implementation, that uses the inversion formula
> directly, and only keeps a list of the computed coefficients in reverse
> order for further computation.
>
> With that implementation, my lengthy computation finished successfully.
>
> The implementation can be found in my branch
> "wip/improve-stream-division".
>
> https://github.com/hemmecke/fricas/tree/wip/improve-stream-division
> (patch attached)
>
> I took care that the timings are basically the same.
> See attached testfile.
>
> Is there a chance that this could make it into FriCAS?
>
> Suggestions for further improvements are welcome.
With the patch applied the following gives wrong result (the
last thing should be stream of zero matrices, I get 5 zero
terms and then nonzero terms):
rI := SquareMatrix(2, FRAC(INT))
sT := Stream(rI)
sTO := StreamTaylorSeriesOperations(rI)
m1 := matrix([[0, 1],[0, 0]])$rI
m2 := matrix([[0, 0],[1, 0]])$rI
s1 := construct([3::rI, 0, m1, m2, 1])$sT
rs1 := recip(s1)$sTO;
s2 := construct([1::rI, 1::rI + m1, m2, m2])$sT
rs2 := recip(s2)$sTO;rI := SquareMatrix(2, FRAC(INT))
s3 := (*$sTO)(rs2, s1)
((/$sTO)(s3, s1) - rs2)$sTO
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/ZqmIt29wxnGtN8t4%40fricas.org.