The "constant" can cause the compiler to cache the result and return it directly next time, IIRC.
- Qian On Mon, Jan 22, 2024, 10:39 PM Prof. Dr. Johannes Grabmeier < [email protected]> wrote: > thanks, the rare instance of code for init() in the system, e.g. in > QuotienFieldCategory is as follows: > > if S has StepThrough then > init() == init()$S / 1$S > > my code says > > init(): % == > > changes to > > init: % == > > and > > init: == > > both compile, but both do not change the wrong behaviour > > Are there semantic differences between > > f: constant -> % > > versus > > f: () -> % > > > Am 22.01.24 um 15:25 schrieb Ralf Hemmecke: > > I am not quite sure what the "constant" in this line actually means > > (Is that documented somewhere?), but intuitively it might be the > > sources of your "problem". > > > > > https://github.com/fricas/fricas/blob/master/src/algebra/catdef.spad#L1498 > > > > > > Ralf > > > -- > Mit freundlichen Grüßen > > Johannes Grabmeier > > Prof. Dr. Johannes Grabmeier, > Köckstraße 1, D-94469 Deggendorf > Tel. +49-(0)-991-2979584, Tel. +49-(0)-151-681-70756 > Fax: +49-(0)-991-2979592 > > -- > 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/3cb26dbf-3d60-47f4-9490-7b0a2b530e69%40grabmeier.net > . > -- 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/CAGBJN916frH6W2u1JoS%3DBep-rA0woUpLTw3GQsx7LR9eUYiYaA%40mail.gmail.com.
