isuruf on master
Adding a Correct Path to the St… Update CONTRIBUTING.md Co-auth… Merge pull request #1947 from D… (compare)
@isuruf Hi Isuru, long time no see! Was wondering if the following behavior is expected. Thanks!! (master
, ed7479baf59a36636061acc35b676bcf9073a932
)
int main() {
RCP<const Basic> a = symbol("a"), b = symbol("b"), c = symbol("c");
map_basic_basic d {{mul(a,b), c}};
RCP<const Basic> r1 = mul(SymEngine::integer(2), mul(a, b)),
r2 = add(SymEngine::integer(1), r1);
std::cout << *r1 << " -> " << *r1->subs(d) << std::endl;
std::cout << *r2 << " -> " << *r2->subs(d) << std::endl;
return 0;
}
produces
2*a*b -> 2*a*b
1 + 2*a*b -> 1 + 2*c
2*a*b*c -> 2*a*b*c
1 + 2*a*b*c -> 1+2*a*b*c
The new as_ctypes API enables some really nice solver accuracy improvements for us downstream
What's the difference between this and the cython one?
Hi,
I'm trying to build symengine and I am running into some errors when I set the -DCMAKE_BUILD_TYPE=Debug and -DWITH_BFD=yes.
/home/naveen/dev/symengine/symengine/utilities/teuchos/Teuchos_stacktrace.cpp: In function ‘void {anonymous}::process_section(bfd*, asection*, void*)’:
/home/naveen/dev/symengine/symengine/utilities/teuchos/Teuchos_stacktrace.cpp:193:8: error: ‘bfd_get_section_flags’ was not declared in this scope; did you mean ‘bfd_set_section_flags’?
193 | if ((bfd_get_section_flags(abfd, section) & SEC_ALLOC) == 0) {
| ^~~~~~~~~~~~~~~~~~~~~
| bfd_set_section_flags
/home/naveen/dev/symengine/symengine/utilities/teuchos/Teuchos_stacktrace.cpp:197:25: error: ‘bfd_get_section_vma’ was not declared in this scope; did you mean ‘bfd_set_section_vma’?
197 | bfd_vma section_vma = bfd_get_section_vma(abfd, section);
| ^~~~~~~~~~~~~~~~~~~
| bfd_set_section_vma
/home/naveen/dev/symengine/symengine/utilities/teuchos/Teuchos_stacktrace.cpp:203:49: error: cannot convert ‘bfd*’ to ‘const asection*’ {aka ‘const bfd_section*’}
203 | bfd_size_type section_size = bfd_section_size(abfd, section);
| ^~~~
| |
| bfd*
In file included from /home/naveen/dev/symengine/symengine/utilities/teuchos/Teuchos_stacktrace.cpp:73:
/usr/include/bfd.h:1206:35: note: initializing argument 1 of ‘bfd_size_type bfd_section_size(const asection*)’
1206 | bfd_section_size (const asection *sec)
| ~~~~~~~~~~~~~~~~^~~
make[2]: *** [symengine/utilities/teuchos/CMakeFiles/teuchos.dir/build.make:128: symengine/utilities/teuchos/CMakeFiles/teuchos.dir/Teuchos_stacktrace.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:784: symengine/utilities/teuchos/CMakeFiles/teuchos.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
I did search a little and found out that binutils-dev>2.34 has a change in its API. Can anyone help me out in fixing this?