Nasser M. Abbasi wrote:
> 
> Any idea what causes this crash?
> 
> (1) -> 
> integrand:=1/2*2^(1/2)*1/(1+x)^2/(-%i+x^2)^(1/2)+1/2/(1+x)^2*2^(1/2)/(%i+x^2)^(1/2)
> 
> *** - Program stack overflow. RESET
> 
> [/build/buildd/clisp-2.49/src/eval.d:573] reset() found no driver frame 
> (sp=0x7fff69c09460-0x7fff69c03400)
> Exiting on signal 6

At first FriCAS tries to assign type to your expression and this
process fails.  Type assignment in FriCAS is based on heuristics
and your input is in unexpected style and triggers a bug.

The following works:

integrand:=(1/2*2^(1/2)*1/(1+x)^2/(-%i+x^2)^(1/2)+1/2/(1+x)^2*2^(1/2)/(%i+x^2)^(1/2))@Expression(Complex(Integer))

                +-------+        +-------+
            +-+ | 2          +-+ | 2
           \|2 \|x  + %i  + \|2 \|x  - %i
   (5)  ------------------------------------
                         +-------+ +-------+
            2            | 2       | 2
        (2 x  + 4 x + 2)\|x  - %i \|x  + %i
                                           Type: Expression(Complex(Integer))

(the @Expression(Complex(Integer)) part tells FriCAS what type to use.
Alternatively you can try to rearrage expression (but IIUC this is not
an option to you).  Also, using 'sqrt(-1)' instead of '%i' reduces
problem (no crash but FriCAS can not find reasonable type).

-- 
                              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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to