You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`-x`| unary minus | maps values to their additive inverses |
16
+
|`x + y`| binary plus | performs addition |
17
+
|`x - y`| binary minus | performs subtraction |
18
+
|`x * y`| times | performs multiplication |
19
+
|`x / y`| divide | performs division |
20
+
|`x ÷ y`| integer divide | x / y, truncated to an integer |
21
+
|`x \ y`| inverse divide | equivalent to `y / x`|
22
+
|`x ^ y`| power | raises `x` to the `y`th power |
23
+
|`x % y`| remainder | equivalent to `rem(x,y)`|
24
24
25
25
A numeric literal placed directly before an identifier or parentheses, e.g. `2x` or `2(x+y)`, is treated as a multiplication, except with higher precedence than other binary operations. See [Numeric Literal Coefficients](@ref man-numeric-literal-coefficients) for details.
26
26
27
27
Julia's promotion system makes arithmetic operations on mixtures of argument types "just work"
28
28
naturally and automatically. See [Conversion and Promotion](@ref conversion-and-promotion) for details of the promotion
29
29
system.
30
30
31
-
The ÷ sign can be conveniently typed by writing `\div<tab>` to the REPL or Julia IDE. See the [manual section on Unicode input](@ref man-unicode-input) for more information.
32
-
33
31
Here are some simple examples using arithmetic operators:
0 commit comments