Hello folks,

I have an exposed domain JuliaDoubleFloat (abbrev JDF), and an exposed
package JuliaSpecialFunctions (abbrev JSF) that implements the 'sin'
function. JDF does not include TrigonometricFunctionCategory as its
exports, contrary to DoubleFloat for example.

I'm wondering why if I issue a 'sin(2)'  in the interpreter it chooses
the  sin$JSF:

(1) -> )set mess bo on
(1) -> sin 1

 Function Selection for sin
      Arguments: PI
   -> no appropriate sin found in PositiveInteger
   -> no appropriate sin found in Integer
   -> no appropriate sin found in PositiveInteger
   -> no appropriate sin found in Integer

 Modemaps from Associated Packages
   no modemaps

 Remaining General Modemaps
   [1] D -> D from D if D has TRIGCAT
   [2] JuliaDoubleFloat -> JuliaDoubleFloat from JuliaSpecialFunctions


 [1]  signature:   JDF -> JDF
      implemented: slot (JuliaDoubleFloat)(JuliaDoubleFloat) from JSF
 [2]  signature:   EXPR(INT) -> EXPR(INT)
      implemented: slot $$ from EXPR(INT)


   (1)  0.8414709848078965
                                                       Type: JuliaDoubleFloat

If I unexpose JSF I obtain what is expected:
(2) -> )unexpose JSF
   JuliaSpecialFunctions is now explicitly hidden in frame initial
(2) -> sin 1

   (2)  sin(1)
                                                    Type: Expression(Integer)

Now, DoubleFloat also implements the  'sin' function, but directly in
the DoubleFloat domain. Not in a separate package.

If I do the same, move 'JSF$sin' to 'JDF$sin', the interpreter now
returns an EXPR INT as expected. Any idea why? And why, for example,
'sin(1)' does not return a DoubleFloat. Is this related to the
exposed.lsp file in src/algebra? If I want to continue to expose JSF
with 'sin' in it, how can I circumvent this choice and have an EXPR
INT returned?
__
Greg

Source, if this is necessary:
https://github.com/gvanuxem/fricas/blob/jlfricas/src/algebra/julia.spad line 281
https://github.com/gvanuxem/fricas/blob/jlfricas/src/algebra/jsf.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/CAHnU2dZijdoN7dYibMNeKk3YGNbXUd%2B%3D4cWzWJHNHiFkkDMnAA%40mail.gmail.com.

Reply via email to