On Sun, Jun 14, 2026 at 06:31:34PM +0800, Qian Yun wrote:
> Just thought of this shortcut optimization.
> 
> This is valid, right?  I can't think of any exception.
> 
> This saves 5% memory for mapleok.input.

Yes, looks good.
 
> diff --git a/src/algebra/expr.spad b/src/algebra/expr.spad
> index 768acf85..ed89a42f 100644
> --- a/src/algebra/expr.spad
> +++ b/src/algebra/expr.spad
> @@ -102,6 +102,7 @@
>              (x : % - y : %) : %    == algreduc(x -$Rep y, commonk(x, y))
>              x : % / y : %        == algreduc(x /$Rep y, commonk(x, y))
>              x : % = y : % ==
> +                denom(x) = denom(y) => numer(x) = numer(y)
>                  -- we only need to care about the numerator of (x - y)
>                  res := (numer(x)*denom(y) - numer(y)*denom(x))::Rep
>                  zero?(reduc(res, commonk(x, y)))$Rep
> 
> -- 
> 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/114b6d6f-9db3-4945-9371-2689c2c052f1%40gmail.com.

-- 
                              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 visit 
https://groups.google.com/d/msgid/fricas-devel/ai6ucadIe0YQrrGq%40fricas.org.

Reply via email to