On Wed, Dec 27, 2023 at 10:48:12PM +0100, Ralf Hemmecke wrote:
> 
> And we also have this...
> 
> %%% (14) -> operator first kernels (%e^n)
> 
>    (14)  exp
>                         Type: BasicOperator
> %%% (15) -> argument first kernels (%e^n)
> 
>    (15)  [n]
>                         Type: List(Expression(Integer))
> %%% (16) -> argument first kernels (exp n)
> 
>    (16)  [n]
>                         Type: List(Expression(Integer))
> %%% (17) -> operator first kernels (exp n)
> 
>    (17)  exp
>                         Type: BasicOperator
> %%% (20) -> kernels (exp(1)^n)
> 
>             n
>    (20)  [%e ]
>                         Type: List(Kernel(Expression(Integer)))
> %%% (21) -> kernels (exp(n))
> 
>             n
>    (21)  [%e ]
>                         Type: List(Kernel(Expression(Integer)))
> 
> 
> Do you see exp(1)^3 and exp(3) treated differently somewhere? Or even stored
> differently?

Well, there is subtlety.  One trap is:

(26) -> %e^3 - exp(3)                                         

             3     3
   (26)  - %e  + %e
                                                    Type: Expression(Integer)
(27) -> unparse(%::InputForm)

   (27)  "(-1)*exp(3)+exp(1)^3"
                                                                 Type: String

Note: there is difference between integer exponents and "symbolic"
exponents.  Preseving integer exponents is crucial to things like
'normalize' which are at core of many algorithms.  OTOH "symbolic"
exponents can be changed.  Compare:

(28) -> exp(n)^3             

            n 3
   (28)  (%e )
                                                    Type: Expression(Integer)
(29) -> exp(3)^n

           3 n
   (29)  %e
                                                    Type: Expression(Integer)

In the first case we need exponet 3 for correct computations.
In the second we can combine exponents in default transformation.

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

Reply via email to