Hello Waldek, *

Le jeu. 15 mai 2025 à 22:53, Waldek Hebisch <de...@fricas.org> a écrit :

> On Thu, May 15, 2025 at 07:40:39PM +0200, Grégory Vanuxem wrote:
> > Hello here,
> >
> > Can you explain me this:
>
> I am not sure what you want explained?  Algorithms then Nemo uses
>
> to give possible symbolic values of floating pint results?  Or
>
> maybe why FriCAS outputs specific things?


The Calcium library, https://fredrikj.net/calcium/introduction.html, was
added to Nemo, and in fact displaying the floating point is an expensive
option. Normally this is not computed. This is the same for algebraic
number, computations are done on roots of polynomials but display also the
resulting floating point number:

(2) -> sqrt jnan(-2/3)

   (2)  Root 0.816497*im of 3x^2 + 2


>
>
> If you wander why FriCAS leaves asin(sin(x)) unsimplified, this
> is due to branches, sin(x) = sin(x + 2*%pi), applaying asin
> to both sides and using unsound transformation of asin(sin(x))
> to x would give false equality x = x + 2*%pi.  Similarly,
> pulling %i before square roots leads to nonsense like the last
> result in the following mail.
>

The second mail use behind the scene Mathematica (jWSExpression)

I can agree that, in general, branches can interfere but in this case,
applying the operations used here on -3/2 should return from my point of
view -3/2. That's just surprising for me. Other CAS returns in fact -3/2
and that's correct.

I find it's a pity for FriCAS.

Greg

PS / I am trying to rebuild SAGE to check their results also. I used to
build SAGE easily but from time to time I am unable to build it.


> > ==
> >
> > └─$ jlfricas
> > Checking for foreign routines
> > FRICAS="/usr/local/lib/fricas/target/x86_64-linux-gnu"
> > spad-lib="/usr/local/lib/fricas/target/x86_64-linux-gnu/lib/libspad.so"
> > foreign routines found
> > openServer result 0
> >                        FriCAS Computer Algebra System
> >           Version: jlFriCAS 1.3.12-dev built with SBCL 2.5.2.debian
> >                  Timestamp: Wed Apr 16 09:50:54 AM CEST 2025
> >
> -----------------------------------------------------------------------------
> >    Issue )copyright to view copyright notices.
> >    Issue )summary for a summary of useful system commands.
> >    Issue )quit to leave FriCAS and return to shell.
> >
> -----------------------------------------------------------------------------
> >
> >
> > (1) -> jnecf (-2/3)
> >
> >    (1)  -0.666667 {-2/3}
> >
> >          Type: NMExactCalciumField
> >
> > Time: 0.13 (EV) + 3.88 (OT) = 4.01 sec
> > (2) -> sqrt %
> >
> >    (2)  0.816497*I {(a)/3 where a = 2.44949*I [a^2+6=0]}
> >
> >          Type: NMExactCalciumField
> >
> >                     Time: 0.01 sec
> > (3) -> sin %
> >
> >    (3)
> >   0.910291*I {(-a^2*c+c)/(2*a) where a = 0.441977 [Exp(-0.816497
> > {(b*c)/3})], b = 2.44949*I [b^2+6=0], c = I [c^
> >   2+1=0]}
> >
> >          Type: NMExactCalciumField
> >
> >         Time: 0.02 (EV) = 0.02 sec
> >
> > (4) -> asin %
> >
> >    (4)  0.816497*I {(a)/3 where a = 2.44949*I [a^2+6=0]}
> >
> >          Type: NMExactCalciumField
> >
> >         Time: 0.02 (EV) = 0.02 sec
> > (5) -> %^2
> >
> >    (5)  -0.666667 {-2/3}
> >
> >          Type: NMExactCalciumField
> >
> >                     Time: 0.02 sec
> > (6) -> -2/3
> >
> >           2
> >    (6)  - -
> >           3
> >
> >            Type: Fraction(Integer)
> >
> >                        Time: 0 sec
> > (7) -> sqrt %
> >
> >          +---+
> >          |  2
> >    (7)   |- -
> >         \|  3
> >
> >              Type: AlgebraicNumber
> >
> >         Time: 0.03 (OT) = 0.03 sec
> > (8) -> sin %
> >
> >              +---+
> >              |  2
> >    (8)  sin( |- - )
> >             \|  3
> >
> >          Type: Expression(Integer)
> >
> >                        Time: 0 sec
> > (9) -> asin %
> >
> >                   +---+
> >                   |  2
> >    (9)  asin(sin( |- - ))
> >                  \|  3
> >
> >          Type: Expression(Integer)
> >
> >                        Time: 0 sec
> > (10) -> %^2
> >
> >                    +---+  2
> >                    |  2
> >    (10)  asin(sin( |- - ))
> >                   \|  3
> >
> >          Type: Expression(Integer)
> >
> >                        Time: 0 sec
> > (11) ->
> >
> > Is it related to complex number handling or the fact that EXPR(INT) is
> used
> > a lot (algebraic number for example). Or I am totally wrong.
> >
> > Greg
> >
> > --
> > 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 visit
> https://groups.google.com/d/msgid/fricas-devel/CAHnU2dYwrs775fFCMMh5%3D1WXb_M1EO_ghe3kkQmW1dzb%3DvpeXQ%40mail.gmail.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 fricas-devel+unsubscr...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/fricas-devel/aCZUMp2otEZOGgeH%40fricas.org
> .
>

-- 
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 visit 
https://groups.google.com/d/msgid/fricas-devel/CAHnU2dYf1wPa4c%3DrNAsYcf4%3DCEvHnPps%3D2Jr2nNUTNzUZ14_7w%40mail.gmail.com.

Reply via email to