Display a decimal in scientific notation
Data Structures & Algorithms practice on Codemia
Step through 300 algorithm problems with animated visualisers that show the data structure changing as the code runs.
In the realm of mathematics and engineering, displaying numbers in scientific notation is a fundamental skill for dealing with extremely large or small numbers. Scientific notation provides a streamlined means of conveying these types of numbers effectively.
What is Scientific Notation?
Scientific notation is a method of expressing numbers as a product of two factors. It is typically written in the form:
where: • is a number such that . • is an integer.
This representation makes it easier to read, compare, and compute with very large or very small numbers.
The Need for Scientific Notation
In many fields such as physics, astronomy, and engineering, scientists and practitioners often work with numbers that are either extraordinarily large, such as the speed of light (~299,792,458 m/s), or incredibly small, like the mass of an electron (~0.00000000000000000000000000000091093822 kg). Writing these numbers in standard decimal notation is not practical, as it often leads to errors or misinterpretations.
By using scientific notation, these numbers become more manageable: • The speed of light becomes m/s. • The mass of an electron becomes kg.
Converting a Decimal into Scientific Notation
To convert a decimal into scientific notation, follow these steps:
- Place the decimal point such that there is only one non-zero digit to its left.
- Count the number of places, , that the decimal point has moved.
- Multiply by . If the decimal point is moved to the left, . If moved to the right, .
Example
Convert 12345.678 into scientific notation:
- Move the decimal place: becomes .
- Count the places moved: 4 places to the left.
- The scientific notation is .
Convert 0.000987 into scientific notation:
- Move the decimal place: becomes .
- Count the places moved: 4 places to the right.
- The scientific notation is .
Operations with Scientific Notation
Addition and Subtraction
Before adding or subtracting numbers in scientific notation, make sure the exponents are the same. Adjust the decimal numbers (manitassas) accordingly. For example:
Multiplication
Multiply the decimal numbers and add the exponents:
Division
Divide the decimal numbers and subtract the exponents:
Advantages of Scientific Notation
• Simplicity: Condenses long numbers, making them easier to read. • Comparability: Allows simple comparison of magnitude. • Precision: Helps ensure careful calculations with significant digits. • Ease of Calculation: Facilitates multiplication and division with the laws of exponents.
Table of Key Points
| Concept | Description |
| Scientific Notation | Expressing numbers as a product of a coefficient and a power of ten. |
| Standard Form | where and is an integer. |
| Conversion Example (Large) | |
| Conversion Example (Small) | |
| Addition/Subtraction | Align exponents; sum/difference the coefficients. |
| Multiplication | Multiply coefficients; add exponents. |
| Division | Divide coefficients; subtract exponents. |
| Applications | Used in fields like physics, engineering, and computer science. |
Using scientific notation can greatly aid in understanding complex scientific and technical data by reducing the potential for error and enhancing the clarity of numerical information.
Related reading
- Distance between hyperplanes
- Distance from a point to a polygon
- Distinct digit count
- Distribute points on a circle as evenly as possible
- Dividing a list of numbers in two groups such that numbers in one group don't have any factor common with the numbers in the other group
- Dividing a number into random unequal parts
- Dividing a plane of points into two equal halves
- Division of a convex hull into two separate parts

DSA Fundamentals
Master algorithmic patterns and data structures through hands-on LeetCode-style problems - from arrays and hashing to dynamic programming and advanced graphs.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Data Structures & Algorithms practice on Codemia
Step through 300 algorithm problems with animated visualisers that show the data structure changing as the code runs.