algebra

What is the difference between SymPy and Sage?

蹲街弑〆低调 提交于 2019-12-03 03:41:40
问题 What is the difference between SymPy and Sage a.k.a. SageMath? 回答1: (Full disclosure: I am the lead developer of SymPy) The first thing you should understand is that SymPy and Sage are not quite the same thing. SymPy is a pure Python library, that does computer algebra. Sage is a collection of open source mathematical software. Sage tries to gather together all the major open source mathematics software, and glue it together into a useful system. In fact, Sage includes SymPy as one of its

Abstract algebra and Programming [closed]

為{幸葍}努か 提交于 2019-12-03 01:56:29
问题 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 last year . I am going to start learning Abstract Algebra- Groups, Rings,etc. I am interested to know any programming language, if at all which can help me learn/try the concepts I learn in theory. EDIT: I am not really looking at implementing what I learn. I am interested to know any language which already supports them. 回答1

Calculate the algebraic expression in C# [closed]

狂风中的少年 提交于 2019-12-02 23:54:47
问题 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 6 years ago . Calculate the algebraic expression Z, for which n is inputted by user. Use 2 for loops to solve the problem. My code so far: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; namespace ConsoleApplication1 { class Program { static void Main(string[]

All possible combinations of OPERATIONS from a given set of numbers that total to a given number

放肆的年华 提交于 2019-12-02 20:27:44
问题 I found a lot of post quite similar (referring to the Coin changing Problem) but only using the sum operator. Now imagine you can add, subtract, multiply and divide, is there a way to get all the calculation combinations to a given number? Ideally in Java Example: Given 1 5 2 4 9 try to get 16 Solutions: 9+1+4+2=16 2*9-(5-4+1)=16 5*(4+1)-9=16 and so on (I found 20 of those). Thanks. 回答1: Since you only have binary operations, you can model any of the calculations as a binary tree where the

What is the difference between SymPy and Sage?

孤者浪人 提交于 2019-12-02 17:07:40
What is the difference between SymPy and Sage a.k.a. SageMath? (Full disclosure: I am the lead developer of SymPy) The first thing you should understand is that SymPy and Sage are not quite the same thing. SymPy is a pure Python library, that does computer algebra. Sage is a collection of open source mathematical software. Sage tries to gather together all the major open source mathematics software, and glue it together into a useful system. In fact, Sage includes SymPy as one of its systems. Here is a short list of (biased) facts for each (I won't call them pros or cons, just facts): SymPy

Abstract algebra and Programming [closed]

為{幸葍}努か 提交于 2019-12-02 14:04:58
I am going to start learning Abstract Algebra- Groups, Rings,etc. I am interested to know any programming language, if at all which can help me learn/try the concepts I learn in theory. EDIT: I am not really looking at implementing what I learn. I am interested to know any language which already supports them. jason The text that you want here is Abstract Algebra, A Computational Approach by Chuck Sims. The author will recommend that you use the APL programming language. The book is out of print, but you can probably find it in your library. There is also the GAP Computer Algebra System which

How to fix 'Float' object has no attribute 'exp'?

a 夏天 提交于 2019-12-02 13:12:13
问题 I have the following Gaussian equation in Python: numpy.exp((-(x-m)**2)/(2*sigma)) Provided that x is an matrix. However, the equation won't run, and I get the following error: AttributeError: 'Float' object has no attribute 'exp' How can I solve this issue? EDIT-1 Making the following edit: map(float(),np.exp((-(x-m)**2)/(2*sigma))) Raised the error: TypeError: 'float' object is not callable EDIT-2 This is a sample of the value x : [[-0.20646505 0.07763347 -0.16161097 0.370439 ] [-0.91295327

How to draw a line using y = mx +b in java?

↘锁芯ラ 提交于 2019-12-02 11:41:47
So I have a program that solves a system of linear equations, but that is not relevant. So what happens is that my program pass two linear equations in the form of: y = mx +b. I do not know how I would graph this using Graphics2D, I am having some trouble figuring it out. Right now I have no idea so I have no code that I could show you, but I can tell you that: That my program correctly converts Ax + By = C into y = mx + B That it would be helpful to show an example in some code possibly using the drawLine() method When you draw a line in code, you need to draw from point A to point B . (a

All possible combinations of OPERATIONS from a given set of numbers that total to a given number

梦想的初衷 提交于 2019-12-02 11:30:43
I found a lot of post quite similar (referring to the Coin changing Problem) but only using the sum operator. Now imagine you can add, subtract, multiply and divide, is there a way to get all the calculation combinations to a given number? Ideally in Java Example: Given 1 5 2 4 9 try to get 16 Solutions: 9+1+4+2=16 2*9-(5-4+1)=16 5*(4+1)-9=16 and so on (I found 20 of those). Thanks. Since you only have binary operations, you can model any of the calculations as a binary tree where the leaves are numbers and all other nodes are representing operations, e.g. for your first two examples: + - / \

I'm making a PEMDAS solver and don't know what to write

本秂侑毒 提交于 2019-12-02 09:48:39
I am trying to make a PEMDAS solver where the user types in a PEMDAS problem. For example, they would type in 4(4 + 2) - 5 and the program would solve it for them. is there any code that would make python solve the input that the user enters. something like: problem = input() solve(problem) print(problem) I obviously know that "solve" is not a real command in python. 来源: https://stackoverflow.com/questions/13182459/im-making-a-pemdas-solver-and-dont-know-what-to-write