note02
◆ Code
 +x ...Positive value
 -x ...Negative value
◆ Four arithmetic operators, etc.
 x + y ...addition
 x - y ...subtraction
 x * y ...multiplication
 x / y ...division
 x ÷ y ...Division quotient(Double-byte character[÷])
 x \ y ...Reciprocal(y /Same as x)
 x ^ y ...Exponentiation
 x % y ...Division remainder(Remainder of division)
◆ Comparison operator
 x == y ...Equivalence operator
 x != y ...Inequivalence operator
 x ≠ y ...Inequivalence operator(Double-byte character[≠])
 x < y ...Lesser operator
 x <= y ...Less than equal operator
 x ≤ y ...Less than equal operator(Double-byte character[≤]* Environment-dependent characters)
 x > y ...Greater operator
 x >= y ...Greater equal operator
 x ≥ y ...Greater equal operator(Double-byte character[≥]* Environment-dependent characters)
◆ Assignment operator
 += ...Addition substitution
 -= ...Subtraction Substitution
 *= ...Multiplication assignment
 /= ...Division assignment
 ÷= ...Dividing quotient substitution(Division quotient)(Double-byte character[÷])
 %= ...Division remainder substitution(Remainder of division)
 ^= ...Exponentiation
◆ Logical operators
 !x ...denial
 ~x ...Bit not
 x & y ...Bit and
 x | y ...Bit or
 x >>> y ...Right logical shift
 x >> y ...Right arithmetic shift
 x << y ...Left logic/Arithmetic shift
The feature of operators is that special characters such as [÷] [≠] [≥] [≤] can also be used. Also, exponentiation uses [^], which is different from Python.
Julia Quick Look Note [01] How to use variables and constants Julia Quick Look Note [02] Arithmetic Expressions, Operators
(* We will continue to increase the content)
: paperclip: Julia --Official page https://julialang.org/
: paperclip: Julia --Japanese official document https://julia-doc-ja.readthedocs.io/ja/latest/index.html
: paperclip: First time Julia and installation (Windows & Linux) https://qiita.com/ttlabo/items/b05bb43d06239f968035
:paperclip: Julia - Mathematics https://docs.julialang.org/en/v1/base/math/
If you have any opinions or corrections, please let us know.
Recommended Posts