signal processing commands

Librairie C++ de calcul formel/ C++ symbolic computation library

Modérateur : xcasadmin

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: signal processing commands

Message par parisse » lun. sept. 02, 2019 5:53 am

Ok, I have modified the includes at the beginning of markup.h like this:

Code : Tout sélectionner

#include "first.h"
#include "giacPCH.h"
If I link to your code with latex, there is a difference: you are adding \[ \] delimiters, and this is not convenient if you do copy/paste with Ctrl-T inside Xcas. Could you return the latex translation without delimiters when called from has_optimized_latex_output?

lukamar
Messages : 331
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: signal processing commands

Message par lukamar » lun. sept. 02, 2019 9:50 am

I removed latex delimiters altogether. I also changed include paths, i.e. removed "giac/" prefix in markup.cc/h.

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: signal processing commands

Message par parisse » lun. sept. 02, 2019 4:02 pm

Thanks. I had to make a change in
markup.cc, line 1192 if (is_inf(g)) {...
otherwise I get a segfault, I don't understand why...

lukamar
Messages : 331
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: signal processing commands

Message par lukamar » lun. sept. 02, 2019 9:41 pm

I have mirrored your change. Strange, I didn't experience this segfault after building Giac on my computer five weeks ago... But I remember having similar problems when using plus_inf and minus_inf. When coding Fourier transformation recently, I had to use symbolic(at_plus,unsigned_inf) instead of plus_inf because the latter was giving me segfaults.

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: signal processing commands

Message par parisse » mar. sept. 03, 2019 7:23 am

giac_unstable.tgz updated, you can now run the latex command, it should call your code.

lukamar
Messages : 331
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: signal processing commands

Message par lukamar » mar. sept. 03, 2019 6:55 pm

Thank you. But when I try to compile, I get many errors like for example this one:

Code : Tout sélectionner

moyal.cc:2012:18: error: ambiguous overload for ‘operator*’ (operand types are ‘giac::gen’ and ‘double’)
     return lambda*std::pow(exp_rand(contextptr),1.0/k._DOUBLE_val);
            ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'm compiling in Ubuntu 18 with gcc 7.4.0. A fix is to change the order of factors, but I wonder why it bothers the compiler now, I had no problems like this before.

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: signal processing commands

Message par parisse » mer. sept. 04, 2019 5:47 am

Indeed. The fix is to remove #include "markup.h" from tex.h and insert after class gen; declaration
bool has_improved_latex_export(const gen &g,string &s,GIAC_CONTEXT);

Répondre