On Monday, 7 April 2025 at 16:14:17 UTC+2 Waldek Hebisch wrote:

On Sun, Apr 06, 2025 at 11:54:52AM -0700, Kurt Pagani wrote: 
> 
> I can use factor from XPFACT in the meantime ... which seems to work for 
my 
> purpose. 
> (6) -> factor (3*x*y-3*x*z)$XPFACT(Symbol,EXPR INT) 
> 
> (6) [- 3 x, - y + z] 
> Type: 
> List(XDistributedPolynomial(Symbol,Expression(Integer))) 

'xpfact.spad' also contains 'ldivide': 

ldivide : (XDP, XDP) -> d_rec 
++ ldivide(a, b) returns [c, r] such that a = b*c + r, r is 
++ is of minimal possible degree and homogeneous part of 
++ of r of maximal degree contains no terms divisible from 
++ left by leading term of b. 


Ralf already suggested to me to use this and it works fine (I overlooked 
it, presumably because I didn't trust XPFACT either).
 


When a is divisible by b, then r is 0 and c gives left quotient. 
In general c is analogous to quotient from euclidean division. 

If quotient alone seems useful, we could export it. We could also 
add right versions of related operatons. 


Thanks, it's  reasonably defined, so adding a 'rdivide' would be desirable.

 


-- 
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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/712a3630-9955-41ae-b7da-bfd0a5bedba4n%40googlegroups.com.

Reply via email to