problems using plus_inf
Publié : mer. nov. 01, 2017 8:59 am
Hi,
I have certain problems when trying to use some predefined gen such as plus_inf, zero, plus_one etc. Here's a minimal example (test.cc):This program segfaults after being compiled withBut when i replace "gen g(plus_inf)" withthe program works fine. As I see, unsigned_inf is defined using the identificateur constructor, while plus_inf is defined as symbolic(at_plus,unsigned_inf). I would like to understand what leads to crash. However, It's not a big deal if it remains unclear, as I can easily redefine infinities by copying the above mentioned definition from your code:It works as expected.
I have certain problems when trying to use some predefined gen such as plus_inf, zero, plus_one etc. Here's a minimal example (test.cc):
Code : Tout sélectionner
#include <giac/config.h>
#include <giac/gen.h>
#include <giac/unary.h>
#include <giac/giac.h>
#include <iostream>
using namespace giac;
using namespace std;
int main() {
gen g(plus_inf);
cout << g << endl;
return 0;
}
Code : Tout sélectionner
g++ -Wall -g test.cc -lgiac -lgmp
Code : Tout sélectionner
gen g(unsigned_inf)
Code : Tout sélectionner
gen g=symbolic(at_plus,unsigned_inf);