-
-
Notifications
You must be signed in to change notification settings - Fork 0
Basic
Step into the vast cosmos of calculations with the basic arithmetic provider as your guiding star. This cornerstone provider doesn't just handle math equations; it elegantly weaves through them, respecting the sacred PEMDAS order. If this realm feels new, allow yourself to meander through the supported operations and cherished keywords. With an amalgamation of symbols and words at your disposal, crafting your equations becomes pure art.
Before we waltz into the ballroom of arithmetic operations, it's imperative we understand the dancers, or "primitives," that make the dance so mesmerizing:
- Positive Number: A quintessential number that stands tall without any sign, much like 123.
- Negative Number: A bit dramatic, always flaunting its minus sign, like -45.
- Math Constants: The VIPs of the math world, featuring stars like E (Euler's number) and Pi (Ο).
- Hex Numbers: A tad cryptic, always swaggering around with the 0x prefix followed by hexadecimal elegance, such as 0x2A.
- Number: The most versatile of the lot, comfortably embracing both whole and fractional numbers.
Description | Value |
---|---|
Pi (Ο) | 3.1415926536 |
E (Euler) | 2.7182818285 |
Dive into the arithmetic ocean using our enlightening table as your diving board. Not only does it showcase the illustrious operation symbols, but it also eloquently translates them into words, ensuring a smooth swim from shallow shores to deeper depths.
Operation | Symbol/Word |
---|---|
Left Shift | << |
Right Shift | >> |
Addition | +, plus, add, and |
Subtraction | -, minus, remove, subtract |
Multiplication | *, times by, times, multiply by, multiply |
Division | /, divide by, divide |
Modulo | %, modulo, mod |
Exponent | ^, to the power of, power of, exponent, prime |
Embark on a journey with the Left Shift, symbolized by <<
. This operation lets you nudge the bits of a number, making them take a step to the left.
// Example π
2 << 1
Decode this, and youβll realize that the binary of 2
is 10
. A simple leftward nudge by 1
transforms it to 100
, or 4
in our everyday decimal world.
The Right Shift, bearing the >>
insignia, is the counterpart to the Left Shift but prefers to slide to the right. It's your secret key to halving numbers by powers of two.
// Example π
16 >> 2
Here, the binary tale of 16
is told as 10000
. When the narrative shifts to the right by 2
, it morphs into 100
, or the decimal 4
.
Embrace the art of combining numbers with the Addition operation, which responds to +
, plus
, add
, or even and
.
// Example π
5 + 3
Combine, and you'll receive a shiny 8
.
Unravel the magic of taking away with the Subtraction operation, known by -
, minus
, remove
, or subtract
.
// Example π
10 - 7
In this arithmetic tale, 10 - 7
leaves behind a 3
.
Unfold the mysteries of growth with the Multiplication operation, which goes by *
, times by
, times
, multiply by
, or multiply
.
// Example π
4 * 6
Here, 4 * 6
blossoms into 24
.
Navigate the waters of partition with the Division operation, symbolized by /
, divide by
, or divide
.
// Example π
12 / 3
Set sail, and you'll discover that 12 / 3
docks at 4
.
Dive into the world of remainders with the Modulo operation, represented by %
, modulo
, or mod
.
// Example π
17 % 5
Plunge deeper, and you'll find that 17 % 5
bubbles up as 2
.
Elevate your numbers with the Exponent operation, signified by ^
, to the power of
, power of
, exponent
, or prime
.
// Example π
2 ^ 3
In this celestial ascent, 2 ^ 3
soars to reach the summit of 8
.