Waldek, *, Thinking a little more about that, in _another context_, you explained to me, in response to a personal question, how the interpreter chooses which function to use. I guess now it may be the same "thing", isn't it? And if this is again the case I think it's a pity since end users can not modify this without modifying the interpreter which is not the aim of panAxiom (modifying the "kernel").
Le mer. 24 mai 2023 à 19:46, Grégory Vanuxem <[email protected]> a écrit : > Hello folks, > > I have a little problem with function selection coded in the same package. > > I have a temporary LinearAlgebra package which contains routines for say > vectors and matrices with Float64 and Complex(Float64) coefficients. See > link below if necessary. It's temporary because it will be splitted between > Float64 and Complex(Float64) but for now this is not the point. > > I need to easily/quickly create random arrays. The problem in my case is > that FriCAS always chooses Complex(Float64) instead of Float64 > coefficients. I began to code with Float64 so that borrows me a little. > > To illustrate: > Declarations: > urand01 : NNI -> JF64VEC > ++ urand01(n) returns a uniform(0..1) Julia vector of size n. > urand01: (NNI, NNI) -> JF64MAT > ++ urand01(m,n) returns a uniform(0..1) Julia matrix of size (m,n). > urand01: (NNI, NNI) -> JCF64MAT > ++ urand01(m,n) returns a uniform(0..1) Julia matrix of size (m,n). > urand01 : NNI -> JCF64VEC > ++ urand01(n) returns a uniform(0..1) Julia vector of size n. > > Where JF64VEC is a synonym of Float64 vectors whereas JCF64VEC > Complex(Float64) vectors. As for matrices. > > So my question is how do I force FriCAS to choose the JF64* versions first > instead of JCF64* ? I tried to modify function declarations order, > functions definitions order, src/algebra/exposed.lsp without success. Is it > possible? It's not a big problem, I use *@Domain to switch what I need but > this is annoying and I would be happy to know if/how it is possible. > Any hints? > > Regards, > __ > Greg > > PS: I don't know why my mail is formatted like that (the black banner). > Link: > https://github.com/gvanuxem/fricas/blob/jlfricas/src/algebra/jla.spad > > > > > > -- 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/CAHnU2dYwuX9TpPnAYUjFw0BYSsTnCrC-1L5j1MzHNGXuy-7%2B3Q%40mail.gmail.com.
