symbolic-computation

Overload ternary ?: operator, or change to if{}else{} in included files

梦想与她 提交于 2019-12-08 09:35:16
问题 Research project here. In my C++ library, I am including C files: #include "aprogram.c" which I execute symbolically by overloading (almost) all operators. I have to be able to detect (condition) ? this : that and extract condition , this and that for usage in my symbolic execution library. However, SO 1, SO 2 and SO 3 amongst others already helped me realise that ?: cannot be overloaded. Is there any way for me to forcibly overload ?: anyways? Can I change all ?: statements in my included C

Introduction to computer algebra systems? [closed]

浪子不回头ぞ 提交于 2019-12-03 01:43:24
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Does anybody know of any resources (books, classes, lecture notes, or anything) about the general theory of computer algebra systems (e.g. mathematica, sympy)? "Introductory" materials are preferred, but I realize that with such a specialized subject anything is bound to be fairly advanced. 回答1: "General Theory"

Introduction to computer algebra systems? [closed]

痴心易碎 提交于 2019-12-02 13:52:41
Does anybody know of any resources (books, classes, lecture notes, or anything) about the general theory of computer algebra systems (e.g. mathematica , sympy )? "Introductory" materials are preferred, but I realize that with such a specialized subject anything is bound to be fairly advanced. "General Theory" of CAS is a pretty huge scope for a question. That being said, I'll do my best to cover as much as I can in the hopes that something helps you find what you're looking for :) The proceedings of the ISSAC and SIGSAM groups would no doubt have some good stuff about techniques for building

Issue with Matlab solve function?

允我心安 提交于 2019-12-02 01:23:19
The following command syms x real; f = @(x) log(x^2)*exp(-1/(x^2)); fp(x) = diff(f(x),x); fpp(x) = diff(fp(x),x); and solve(fpp(x)>0,x,'Real',true) return the result solve([0.0 < (8.0*exp(-1.0/x^2))/x^4 - (2.0*exp(-1.0/x^2))/x^2 - (6.0*log(x^2)*exp(-1.0/x^2))/x^4 + (4.0*log(x^2)*exp(-1.0/x^2))/x^6], [x == RD_NINF..RD_INF]) which is not what I expect. The first question: Is it possible to force Matlab's solve to return the set of all solutions? (This is related to this question .) Moreover, when I try to solve the equation solve(fpp(x)==0,x,'Real',true) which returns ans = -1

Multivariate Taylor approximation in sympy

限于喜欢 提交于 2019-12-01 04:40:58
I aim to write a multidimensional Taylor approximation using sympy , which uses as many builtin code as possible, computes the truncated Taylor approximation of a given function of two variables returns the result without the Big-O-remainder term, as e.g. in sin(x)=x - x**3/6 + O(x**4) . Here is what I tryed so far: Approach 1 Naively, one could just combine the series command twice for each variable, which unfortunately does not work, as this example shows for the function sin(x*cos(y)) : sp.sin(x*sp.cos(y)).series(x,x0=0,n=3).series(y,x0=0,n=3) >>> NotImplementedError: not sure of order of O

Multivariate Taylor approximation in sympy

倖福魔咒の 提交于 2019-12-01 02:00:44
问题 I aim to write a multidimensional Taylor approximation using sympy , which uses as many builtin code as possible, computes the truncated Taylor approximation of a given function of two variables returns the result without the Big-O-remainder term, as e.g. in sin(x)=x - x**3/6 + O(x**4) . Here is what I tryed so far: Approach 1 Naively, one could just combine the series command twice for each variable, which unfortunately does not work, as this example shows for the function sin(x*cos(y)) : sp