Comments (5)
Maybe, we could always enclose dot products in parentheses, even when not needed. This may be easier to implement than enclosing or not enclosing dot products in parentheses depending on context.
For reference, operator precedence in Mathematica:
https://reference.wolfram.com/language/tutorial/OperatorInputForms.html
The binary operator .
(Dot
) has a lower precedence than the binary operator ^
(Power
).
from form.
from form.
I guess Mathematica treats 3.2
as an "atom". So, 3.2^4
is fine.
Indeed,
3.2^a
gives
Power[3.2`, a]
and
p.q^a
gives
Dot[p, Power[q, a]]
from form.
from form.
The dot operator perfectly works with vectors/tensors in a reasonable way.
For example, the Mathematica code
{1, 2}.{3, 4}^2
gives
41
This is the same as other languages, like Python:
import numpy as np
a = np.array([1, 2])
b = np.array([3, 4])
a@b**2
which also gives 41
, not 121
.
I think an expression
from form.
Related Issues (20)
- Vacuum diagrams using diagrams_() HOT 3
- Empty set leads to segfault on codes
- doc: missing space after LaTeX commands HOT 1
- Resolve Helgrind/DRD errors (i.e., multithreading issues) HOT 2
- building current master failure with docs / maybe a new tag/release? HOT 7
- Outdated Developer's reference manual
- Freeze in parsing complex conjugate HOT 6
- Collect developer's tips HOT 1
- Valgrind reports memory leak due to FactArg HOT 4
- MakeInteger: No memory while allocating NumberMalloc HOT 7
- Bad error message for full SubSmallExtension HOT 1
- refactor: Warning function with format
- Tensors don't accept argument field wildcards anymore HOT 5
- ParFORM redefine bug with more than one expressions HOT 1
- Improved UTF-8 support HOT 11
- macOS-11 runner deprecation HOT 1
- Sorted function argument too long - Called from InFunction HOT 6
- Problem with Mac port HOT 2
- Zstd compression for sort files HOT 6
- Trying to open a nonexisting table doesn't generate an error HOT 14
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 form.