This section describes the various types of numbers that Mathcad uses and how to enter them into equations.
Types of numbers
Mathcad interprets anything beginning with a digit as a number. A digit can be followed by:
• other digits
• a decimal point
• digits after the decimal point
• one of the letters h or 0, for hex and octal numbers, i or j for imaginary numbers, and M, L, T, Q, K, C, or S for numbers carrying units. These are discussed in more detail below. Note that Mathcad uses the period (.) to signify the decimal point. The comma (,) is used both to show iteration and to separate values in an input table. These topics are discussed in Chapter 11, “Range Variables.”
Imaginary numbers
To enter an imaginary number, follow it with i or j, for example, Ii or 2.5j. You cannot use ior j alone to represent the imaginary unit. You must always type 1 i or lj. If you don’t, Mathcad will think you are referring to a variable named either i or j. See the section “Complex numbers” on page 161.
Dimensional values
Dimensional values are numbers associated with one of the Mathcad dimensions: in the SI system, mass, length, time, current, temperature, luminous intensity, and ·substance. Mathcad uses these dimensions to keep track of units for dimensional analysis and unit conversions. See Chapter 9, “Units and Dimensions.” To enter a dimensional value, type a number followed by an upper or lowercase M for mass, L for length, T for time, I for current, K for temperature, C for luminous intensity, and S for substance. For example, 4. 5M represents 4.5 mass units. Because Mathcad by default treats most expressions involving a number followed immediately by a letter to mean implied multiplication of a number by a variable name, as described in Chapter 3, “Editing Equations,” you will need to backspace over the implied multiplication operator to create expressions like 4
• SM.
Octal integers
To enter a number in octal, follow it with the upper or lowercase letter O. For example, 256360 represents 11166 in decimal. Octal numbers must be integers less than 231.
Hexadecimal integers
To enter a number in hexadecimal, follow it with the upper or lowercase letter H. For example, 2bgeh represents 11166 in decimal. To represent digits above 9, use the upper or lowercase letters A through F. To enter a hexadecimal number that begins with a letter, you must begin it with a leading zero. If you don’t, Mathcad
will think it’s a variable name. For example, use Oa3h rather than a3h to represent the decimal number 163 in hexadecimal. Hexadecimal numbers must be integers less than 231
.Exponential notation
To enter very large or very small numbers in exponential notation, just multiply a number by a power of 10. For example, to represent the number 3 . 108 , type 3 *lOA 8.
Combining types of numbers
You can freely combine all types of numbers with various operators. Figure 8-1 shows
some examples.