Wolfram Language
Paclet Repository
Community-contributed installable additions to the Wolfram Language
Primary Navigation
Categories
Cloud & Deployment
Core Language & Structure
Data Manipulation & Analysis
Engineering Data & Computation
External Interfaces & Connections
Financial Data & Computation
Geographic Data & Computation
Geometry
Graphs & Networks
Higher Mathematical Computation
Images
Knowledge Representation & Natural Language
Machine Learning
Notebook Documents & Presentation
Scientific and Medical Data & Computation
Social, Cultural & Linguistic Data
Strings & Text
Symbolic & Numeric Computation
System Operation & Setup
Time-Related Computation
User Interface Construction
Visualization & Graphics
Random Paclet
Alphabetical List
Using Paclets
Create a Paclet
Get Started
Download Definition Notebook
Learn More about
Wolfram Language
SamplePaclet
Guides
Sample Guide
Tech Notes
Arithmetic
Symbols
AddOne
AddTwo
Arithmetic
Arithmetic is hard. This tutorial does not address that in any way. If anything, this will make it harder. SamplePublisher/SamplePaclet gives you all the functions you need to do harder-than-necessary arithmetic.
A
d
d
O
n
e
a
d
d
o
n
e
t
o
s
o
m
e
t
h
i
n
g
A
d
d
T
w
o
a
d
d
t
w
o
t
o
s
o
m
e
t
h
i
n
g
Two uninteresting functions (one is less interesting than the other).
Natural numbers
Create a revolutionary function that gives you the
t
h
n
natural number:
I
n
[
1
]
:
=
n
a
t
u
r
a
l
N
u
m
b
e
r
[
n
_
]
:
=
N
e
s
t
A
d
d
O
n
e
,
0
,
n
;
Simply incredible:
I
n
[
2
]
:
=
n
a
t
u
r
a
l
N
u
m
b
e
r
[
5
]
O
u
t
[
2
]
=
5
The number 24 was previously believed to be the highest number:
I
n
[
3
]
:
=
n
a
t
u
r
a
l
N
u
m
b
e
r
[
2
4
]
O
u
t
[
3
]
=
2
4
Achieve a new record:
I
n
[
4
]
:
=
n
a
t
u
r
a
l
N
u
m
b
e
r
[
4
6
]
O
u
t
[
4
]
=
4
6
Addition
A
d
d
O
n
e
is all you need to add any numbers:
I
n
[
1
]
:
=
p
l
u
s
[
x
_
,
y
_
]
:
=
N
e
s
t
A
d
d
O
n
e
,
x
,
y
;
I
n
[
2
]
:
=
p
l
u
s
[
3
,
4
]
O
u
t
[
2
]
=
7
This is a really big number:
I
n
[
3
]
:
=
p
l
u
s
[
4
2
,
1
3
3
7
]
O
u
t
[
3
]
=
1
3
7
9
Assume that negative numbers do not exist:
I
n
[
4
]
:
=
p
l
u
s
[
5
,
-
3
]
N
e
s
t
:
N
o
n
-
n
e
g
a
t
i
v
e
m
a
c
h
i
n
e
-
s
i
z
e
d
i
n
t
e
g
e
r
e
x
p
e
c
t
e
d
a
t
p
o
s
i
t
i
o
n
3
i
n
N
e
s
t
[
A
d
d
O
n
e
,
5
,
-
3
]
.
O
u
t
[
4
]
=
N
e
s
t
[
A
d
d
O
n
e
,
5
,
-
3
]
Real numbers are too weird to be used in arithmetic anyway:
I
n
[
5
]
:
=
p
l
u
s
[
5
,
1
.
2
3
]
N
e
s
t
:
N
o
n
-
n
e
g
a
t
i
v
e
m
a
c
h
i
n
e
-
s
i
z
e
d
i
n
t
e
g
e
r
e
x
p
e
c
t
e
d
a
t
p
o
s
i
t
i
o
n
3
i
n
N
e
s
t
[
A
d
d
O
n
e
,
5
,
1
.
2
3
]
.
O
u
t
[
5
]
=
N
e
s
t
[
A
d
d
O
n
e
,
5
,
1
.
2
3
]
Multiplication
A
d
d
O
n
e
is all you need to multiply any numbers:
I
n
[
6
]
:
=
t
i
m
e
s
[
x
_
,
y
_
]
:
=
N
e
s
t
[
O
p
e
r
a
t
o
r
A
p
p
l
i
e
d
[
p
l
u
s
]
[
x
]
,
0
,
y
]
;
I
n
[
7
]
:
=
t
i
m
e
s
[
3
,
4
]
O
u
t
[
7
]
=
1
2
Just look at the absolute size of this number:
I
n
[
8
]
:
=
t
i
m
e
s
[
4
2
,
1
3
3
7
]
O
u
t
[
8
]
=
5
6
1
5
4
Advanced Mathematics
Subtraction and division are considered very difficult and should be left to professionals.
R
e
l
a
t
e
d
G
u
i
d
e
s
▪
S
a
m
p
l
e
G
u
i
d
e
"
"