Comments (5)
Makes no sense at all. It could be [1+vecget(a,0), 2+vecget(a,1), 3+vecget(a,2)], or it could leave it unresolved. But this?
Not really. It's pretty standard behavior actually.
Maxima:
(%i1) a+[1,2,3];
(%o1) [a+1,a+2,a+3]
Wolfram Alpha:
https://www.wolframalpha.com/input?i=a%2B%7B1%2C2%2C3%7D
One possible solution might be to set a flag to change this behavior.
from nerdamer.
What you put into WolframAlpha there is a+ the set {1,2,3}. Adding "a" to a vector in the way you do makes no sense:
if a is a scalar, then the addition is undefined
if a is a vector, then it needs to be added component by component
What could a be that [a+1, a+2, a+3] would be the result? Nothing.
The issue is complicated here because you don't really distinguish between vectors and sets in Nerdamer. Your docs say "vector(1,2,3)" to specify a vector, the result is "[1,2,3]". But the solution to "x^2=1" is similarly written as "[-1,1]".
from nerdamer.
Feel free to insert a+[1,23]
or a+(1,2,3)
. The result will be the same. As I mentioned before, the main discussion should be on how to proceed from here.
from nerdamer.
Hmm. How to proceed should be to allow vectors in symbolic computation, no?
`nerdamer("solve([a+2,1=[4,1],a)").toString()`
should work as easily as
`nerdamer("solve(a+2=4,a)").toString()`
and (reaching here):
`nerdamer("solve(a+vector(1,2,3)=vector(2,3,4),a)")`
should figure out that a=[1,1,1]
But I also still think to put this on some solid foundation you need to answer the question from above:
What could a be that [a+1, a+2, a+3] would be the result?
- if a is a scalar, then the addition is undefined
- if a is a vector, then it needs to be added component by component
What do you think a is?
from nerdamer.
What could a be that [a+1, a+2, a+3] would be the result?
- if a is a scalar, then the addition is undefined
- if a is a vector, then it needs to be added component by component
What do you think a is?
@gunnarmein-ts, I get your point but unfortunately, that's the currently established behavior that others might currently be relying on. Additionally, I demonstrated that this behavior isn't uncommon, as both Maxima and Wolfram Alpha do the same. The way forward will probably have the be the use of some flag to disable this behavior using nerdamer.set
from nerdamer.
Related Issues (20)
- Limit of ((x^2)/(x+1))-((x^2+2)/(x+3)) in inifinity returns -infinity instead of 2
- How to clear defined functions ? HOT 2
- Add Types for nerdamer/all Algebra Extra Solve and Calculus HOT 2
- Error while parsing latex HOT 2
- Function returned from `buildFunction` returns `null` HOT 4
- dot() and cross() don't work with unknowns as parameters HOT 1
- Reference error in SolveFor
- Simplify
- Simplify Error HOT 1
- HUGE error on solveFor HOT 1
- Errors with solveEquations
- Override Physical Constants
- nerdamer.diff("x * sqrt(y)","x") function returning incorrect expression during partial differentiation if the constant term in the equation (in this case sqrt(y)) is under square root HOT 1
- nerdamer.variables error
- SolveEquations not solving correctly
- Invalid latex generated for natural log
- solveEquations not working with too complex equation
- integration result incorrect HOT 1
- Error in basic algebra result
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nerdamer.