Skip to content
Liam Riddell edited this page Sep 9, 2023 · 3 revisions

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.

Supported Primitives πŸ“š

Before we waltz into the ballroom of arithmetic operations, it's imperative we understand the dancers, or "primitives," that make the dance so mesmerizing:

  1. Positive Number: A quintessential number that stands tall without any sign, much like 123.
  2. Negative Number: A bit dramatic, always flaunting its minus sign, like -45.
  3. Math Constants: The VIPs of the math world, featuring stars like E (Euler's number) and Pi (Ο€).
  4. Hex Numbers: A tad cryptic, always swaggering around with the 0x prefix followed by hexadecimal elegance, such as 0x2A.
  5. Number: The most versatile of the lot, comfortably embracing both whole and fractional numbers.

Constants of Mathematics 🌌

Description Value
Pi (Ο€) 3.1415926536
E (Euler) 2.7182818285

Unveiling Operations 🎭

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

Left Shift Operation ➑

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.


Right Shift Operation β¬…

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.


Addition Operation βž•

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.


Subtraction Operation βž–

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.


Multiplication Operation βœ–

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.


Division Operation βž—

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.


Modulo Operation 0️⃣

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.


Exponent Operation ⭐

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.