The present invention generally relates to computing devices and more specifically to an apparatus and method for simultaneously displaying a number along with its number of significant figures.
Calculators, as well as handheld computing devices, laptops, and desktop computers, typically display the results of a mathematical operation with as many digits as the device's display will allow. Hence, such devices assume that entered values for the mathematical operation are exact quantities having infinite precision. However, this assumption is incorrect if one or more of the values entered is based on a measurement, which has a finite precision.
For example, if the mathematical operation of 253.7÷7.64 is entered on a common calculator, the floating point answer displayed is 33.20680628. Even though the first operand (253.7) has only four significant digits or significant figures and the second operand (7.64) has only three significant figures, the floating point answer (33.20680628) is displayed with ten significant figures. If the first operand (253.7) and the second operand (7.64) are both measured quantities, then the proper number of significant figures for the answer to the mathematical operation is three—corresponding to the least number of significant figures for the operands in this example. In other words, the answer in this example should be rounded to 33.2 to reflect three significant figures. Thus, a person who does not understand the concept of significant figures may be misled to believe that the floating point answer reflects the actual level of precision of the answer.
As another example, if a first operand is a measured quantity of 23.625 and the second operand is a measured quantity of 3.0125 for a mathematical operation of 23.625+3.0125, a typical calculator will display a floating point result of 26.6375. Note that the floating point result has a precision to the {fraction (1/10,000)} place. However, the least precise operand of the mathematical operation is the first operand (23.625), which has a precision to the {fraction (1/1,000)} place. Hence, the properly rounded answer is 26.638—rounded to a precision of {fraction (1/1,000)}—corresponding to the least precise measured value. Thus, again, a person who does not understand the concept of rounding to the least precision for mathematical operations involving measured values may be mislead to believe that the floating point answer reflects the actual level of precision of the answer. Hence, there is a need for a tool that will automatically perform the proper rounding of an answer to a mathematical operation involving measured values, and that will inform or remind the user that the number has been rounded accordingly.
The concept of rounding a result of a mathematical operation to the proper precision or to the proper number of significant figures is a known concept. In applying the rules for rounding to the proper number of significant figures, the following rules are used to determine the correct number of significant figures for values in standard decimal notation (as opposed to scientific notation described further below):
The rule used to determine the correct number of significant figures for values in scientific notation is that only significant figures are included when writing a number in scientific notation. For example, 3×106 has one significant figure, and 3.00×106 has three significant figures.
For a mathematical operation not having an addition or subtraction operation involved, the answer to the mathematical operation is rounded to the least number of significant figures corresponding to the measured value in the mathematical operation having the least number of significant figures. Such mathematical operations include multiplication and division. Squaring (e.g., 52=25) operations, which are essentially multiplication, and other operations raising a value to a power, are also included. For example in the mathematical operation of 12.257×1.36 (assuming all operands are measured values), the floating point answer is 16.66952. The first operand (12.257) has five significant figures and the second operand (1.36) has three significant figures. Hence, the operand with the least number of significant figures is the second operand having three significant figures. Thus, the answer rounded to the least number of significant figures (i.e., rounded to three significant figures) is 16.7.
For a mathematical operation having an addition and/or subtraction operation involved, the answer to the mathematical operation is rounded to the precision of the least precise value of the measured operands. For example in the mathematical operation of 3.95+213.6+2.879 (assuming all operands are measured numbers), the floating point answer is 220.429. The first operand (3.95) is precise to hundredths ({fraction (1/100)}), the second operand (213.6) is precise to tenths ({fraction (1/10)}), and the third operand (2.879) is precise to thousandths ({fraction (1/1000)}). Hence, the least precise operand of the mathematical operation is the second operand, which is precise to the nearest tenth. Thus, the floating point answer (220.429) should be rounded to the nearest tenth, which yields a rounded answer of 220.4. As another example, 29000+6.0 (assuming each operand is a measured value) yields a floating point result of 29006. Because the first operand (29000) is precise to thousands (1000) and the second operand is precise to tenth ({fraction (1/10)}), the properly rounded answer will be 29000 (rounded to the nearest thousands—the least precise of the mathematical operation).
For mixed mathematical operation on one or more measured values involving addition and/or subtraction as well as multiplication, division, and/or raising a number to a power, the final result is rounded according to the addition and subtraction rules (least precision) described above. In such a mixed mathematical operation, there is a default order to performing the mathematical operations, unless another order is specified. First, the multiplication, division, and/or raising a number to a power operations are performed within each group separated by an addition or subtraction operation. Second, the results of each group are added and/or subtracted accordingly. The floating point (unrounded) result for each group is maintained for the calculations and only the final result is rounded.
For example in the mixed mathematical operation of 12÷4.103+2.31×94.8 (assuming each operand is a measured value), the floating point answer is 221.9126893. The first operand (12) is precise to ones and has two significant figures, the second operand (4.103) is precise to the thousandths ({fraction (1/1000)}) and has four significant figures, the third operand (2.31) is precise to hundredths ({fraction (1/100)}) and has three significant figures, and the fourth operand (94.8) is precise to the tenths ({fraction (1/10)}) and has three significant figures. Thus the properly rounded answer (according to the least precise operand—the first operand) is 222, which is precise to the nearest ones and happens to have three significant figures. Therefore, the answer is rounded to the nearest ones according to the addition and subtraction rules, and the answer has three significant figures, even though the least number of significant figures among the operands was two significant figures.
When an exact value is involved in a mathematical operation, its number of significant figures does not affect the proper rounding of the answer. For example, in taking the average of three measured values 3.473, 23.937, and 102.54, the sum of these values is divided by three because there are exactly three values being averaged. Hence, the operand 3 in the mathematical operation does not affect the resulting precision of the properly rounded answer because it is an exact number. Hence, the resulting answer should be rounded to the nearest hundredths ({fraction (1/100)}) because the least precise measured value (102.54) is precise to hundredths. Therefore, the properly rounded answer is 43.32. Note that these methods of rounding the result of a mathematical operation based on the significant figures and/or precision of the operands are merely conventions to express results with the appropriate precision based upon the precision of the measured values, rather than firm rules. Hence, these methods may vary slightly.
Because these rules for rounding an answer for a mathematical operation involving one or more measured values are more easily understood through examples, there is a need for an education tool that will display the number of significant figures for each operand entered. Such a display can illustrate to the user, or reassure the user, of the number of significant figures for each operand, which may aid in the education process. Also, there is a need for an education tool that will determine and display a properly rounded answer to a mathematical operation involving one or more measured values. Such a tool can illustrate or reassure the user of the properly rounded answer, which may also aid in the educational process.
The problems and needs outlined above are addressed by the present invention. In accordance with one aspect of the present invention, a computing device is provided. The computing device comprises an electrical circuit, a display screen, an input device, and a software application. The electrical circuit comprises a processor and a memory device electrically coupled to the processor. The display screen and the input device are electrically coupled to the electrical circuit. The software application is stored in the memory device. When executed by the processor, the software application is adapted to provide instructions to determine the number of significant figures for a number entered via the input device, and simultaneously display on the display screen the entered number along with the number of significant figures for the entered number.
The computing device may be a calculator. For a calculator, the display screen may comprise a liquid crystal display device, and the input device may comprise a keypad on the calculator. The computing device may be a handheld portable computing device. For a handheld portable computing device, the display screen may comprise a liquid crystal display device, an active matrix display device, or a touch sensitive screen. For a handheld portable computing device with a touch sensitive screen, the input device may comprise a simulated keypad displayed on the touch sensitive screen so that a user can input a number or mathematical operator by contacting the touch sensitive screen with a touch wand or a finger. The computing device may be a laptop computer or a desktop computer. For a desktop computer, the display screen may comprise a cathode ray tube device, and the input device may comprise a keyboard device. The display screen may comprise a television. The computing device may comprise a server and a terminal, and the computing device may be structured in an application service provider (ASP) model such that the terminal is remotely located from the server, the display screen and input device are parts of the terminal, the electrical circuitry is part of the server, and the display screen and input device are electrically coupled to the electrical circuit via a network connection. The network connection may comprise the Internet and/or a local area network (LAN). The memory device may comprise a flash memory device, a hard drive, and/or a synchronous dynamic access memory (SDRAM) device.
The software application may be further adapted to provide instructions to determine the number of significant figures for a second number entered via the input device, and simultaneously display on the display screen the second entered number along with the number of significant figures for the second entered number. Also, the software application may be adapted to provide instructions to calculate a floating point answer for a mathematical operation entered, wherein the entered numbers are the operands, determine the proper number of significant figures for the floating point answer based on the number of significant figures for each of the operands, round the floating point answer to the proper number of significant figures for the answer, and simultaneously display on the display screen the rounded answer along with the number of significant figures for the rounded answer. Furthermore, the software application may be further adapted to provide instructions to simultaneously display the floating point answer on the display screen along with the rounded answer and the number of significant figures for the rounded answer. Also, the software application may be adapted to provide instructions to calculate a floating point answer for a mathematical operation entered, wherein the entered numbers are the operands, determine which of the operands is least precise, round the floating point answer to least precision of the operands, determine the number of significant figures for the rounded answer, and simultaneously display on the display screen the rounded answer along with the number of significant figures for the rounded answer.
In accordance with another aspect of the present invention, a computer program adapted to be executed by a computing device is provided. The computer program comprises a method of displaying an answer for a mathematical operation on a display screen of a computing device. The method comprises the following steps, the order of which may vary: calculating a floating point answer for a mathematical operation entered for one or more numbers entered into the computing device, (i) if there is an addition and/or subtraction operation within the entered mathematical operation, determining the proper precision for the floating point answer based on the entered numbers, (a) rounding the floating point answer to the proper precision, (b) determining the number of significant figures for the rounded answer, and (c) simultaneously displaying on the display screen the rounded answer and the number of significant figures for the rounded answer, and (ii) if there are no addition or subtraction operations within the entered mathematical operation, (a) determining the proper number of significant figures for the floating point answer based on the entered numbers, (b) rounding the floating point answer to the proper number of significant figures, and (c) simultaneously displaying on the display screen the rounded answer and the number of significant figures for the rounded answer.
The method may further comprise the steps of: (iii) determining the number of significant figures for a first number entered into the computing device; (iv) simultaneously displaying on the display screen the first entered number along with the number of significant figures for the first entered number; (v) determining the number of significant figures for a second number entered into the computing device; and (vi) simultaneously displaying on the display screen the second entered number along with the number of significant figures for the second entered number. Also, the method may further comprise the step of simultaneously displaying on the display screen the floating point answer along with the rounded answer and the number of significant figures for the rounded answer.
In accordance with yet another aspect of the present invention, a computer program adapted to be executed by a computing device is provided, wherein the computer program comprises a method of displaying an entered number on a display screen of a computing device. The method comprises the following steps: (i) determining the number of significant figures for a number entered into the computing device; and (ii) simultaneously displaying on the display screen the entered number along with the number of significant figures for the entered number.
Other objects and advantages of the invention will become apparent upon reading the following detailed description and upon referencing the accompanying drawings, in which:
Referring now to the drawings, wherein like reference numbers are used herein to designate like elements throughout the various views, a preferred embodiment of the present invention is illustrated and described, and other possible embodiments of the present invention are described. The figures are not necessarily drawn to scale, and in some instances the drawings have been exaggerated and/or simplified in places for illustrative purposes only. One of ordinary skill in the art will appreciate the many possible applications and variations of the present invention based on the following examples of possible embodiments of the present invention.
The present invention provides a way to determine the number of significant figures for a number entered via the input device, and to simultaneously display on a display screen the entered number along with the number of significant figures for the entered number. In another aspect, the present invention provides a way to properly round an answer to a mathematical operation involving one or more measured values according to the precision or number of significant figures of operands that are measured, and to simultaneously display the rounded answer along with the number of significant figures for the rounded answer.
The following description and
Beginning in
The “compute significant figures of number” block 56 refers to the subroutine flowchart 44 of FIG. 3. At the start (block 58) of the
Next, the first character is evaluated to determine whether it is a decimal point (decision block 76). If the first character is a decimal point, the software notes or registers that a decimal point has been encountered (action block 78). Then, the next character of the entered number is retrieved for evaluation (action block 80). If the first character is not a decimal point (decision block 76), the SigFig count variable is incremented by one (action block 82), and then the next character is retrieved for evaluation (action block 80).
Referring back to the “Is character a “0”?” decision block 66, if the first character is a zero, then the SigFig count variable is evaluated to determine whether the SigFig count is greater than zero (decision block 84). If the SigFig count is greater than zero, then the potential SigFig count is incremented by one (action block 86), and then the next character is retrieved for evaluation (action block 80). If the SigFig count is not greater than zero (decision block 84), then the next character is retrieved for evaluation (action block 80).
Referring back to the “Is character an “E”?” decision block 64, if yes and the first character is an “E,” then the SigFig count is evaluated to determine whether it equals zero (decision block 88). If the SigFig count variable does not equal zero, then it is determined whether there was a decimal point already (decision block 90). If there was already a decimal point, the potential SigFig count is added to the SigFig count (action block 92), and then the subprogram is finished (block 94) and returns to the main process 42 (
Referring back to the “End of string?” decision block 68 in
This simultaneous display of the entered number along with its number of significant figures (block 102) provides information that may educate, reassure, or remind the user of the number of significant figures for the entered number. Such information may be a valuable in teach a student, for example, about significant figures by allowing the student to enter examples into the calculator 40. Also, such information may be valuable as a self-teaching aid or as a reminder for a person trying to learn about or refresh his/her memory regarding significant figures.
After displaying the number of significant figures for the entered number (block 102), or after it is determined in decision block 100 that the user did press the EXACT soft key, it is determined whether the operation was an ENTER operation (decision block 104) (i.e., the user pressed the ENTER key on the calculator (see
After the floating point answer is computed (action block 108), it is displayed on the screen (display action block 110). Next (or simultaneous to the computation of the floating point answer), the number of significant figures for the answer is determined (subroutine block 112).
The “compute significant figures for answer” block 112 refers to the subroutine flowchart 46 of FIG. 4. At the start (block 114) of the
When there is more than one “group” (decision block 118), the next step is to determine the precision of each “group” (action block 120). Next the least precise group is identified and noted (action block 122). Then, the addition and/or subtraction operations are performed on the groups resulting in a floating point answer (action block 124) (note: this step may occur while computing the floating point answer or it may be performed again for the purpose of obtaining the rounded answer). Next, the floating point answer is rounded to match the precision of the least precise group (action block 126). For example, if the least precise group is precise to the tenths ({fraction (1/10)}), then the floating point answer is rounded to the nearest tenths place.
Next, the number of significant figures for the rounded answer is determined (subroutine block 56), which may be performed using the process 44 of FIG. 3. At this point for this route through the
Referring back to the “Were there any *, /, or ^ operations” decision block 116 of
Note that there may be only one group. For example in the mathematical operation of 6.8342×3.14159, there is only one group because there are no addition or subtraction operations. After all the groups are processed, the next step is the “Is there more than one group” decision block 118, which was described above. At this point, if there is more than one group (i.e., it is a mix mathematical operation also having addition and/or subtraction operations), the mathematical operation is essentially the same as that described above for the case of addition and/or subtraction only. In other words, because all of the multiplication, division, and/or to the power of operations for each “group” have already been performed, the mathematical operation is reduced to addition and/or subtraction operations, which have been described above. If there is only one group, the floating point answer for that group is rounded to the smallest number of significant figures stored for that group in a prior step 130 (action block 136). At the end of the
Note that the “Compute Floating Point answer” block 108, the “Display Floating Point answer” block 110, and the “Compute Significant Figures for Answer” block 112 of
Referring to
As shown in
As another example, the computing device may be a desktop computer (not shown) with a cathode ray tube monitor (not shown) as the display screen and with a standard keyboard (not shown) as the input device. For the desktop computer, the processor 139 may be a Texas Instruments® DSP chip, an Intel® Pentium® microprocessor, or an AMD® Athion® microprocessor, for example. The memory device 141 may be a double data rate (DDR) synchronous dynamic random access memory (SDRAM) memory module (not shown) and/or a magnetic hard drive device (not shown), each electrically coupled to an electrical circuit, which in this case comprises a motherboard (not shown). The computing device may be adapted to connect to a television (not shown), so that the television provides a display screen.
Similarly, the computing device may be a laptop personal computer (not shown), a palm-size computing device (not shown), or in general, handheld portable computing device. The display screen may comprise a LCD device or an active matrix display device (not shown). The display screen and the input device may be integral with one another. For example, if the display screen comprises a touch sensitive screen (not shown) that allows inputs to be received by touching the screen with a finger or a touch wand (not shown), the input device may be a simulated keypad displayed on the touch sensitive screen. Such displays are often used in portable palm-sized computer devices for example.
The present invention may also be embodied in an computing device structured as an application service provider (ASP) model. For example, a server (not shown) may provide an electrical circuitry that comprises the processor, memory, and software application. A terminal (not shown), located remotely from the server and connected to the server via a network connection (not shown), may provide the display screen (e.g., monitor, television) and input device (e.g., mouse, keyboard, keypad device). Hence, the software application at the server may receive the number inputs from a user at the input device of the remote terminal via a network connection. Then, the server may send the results and display information to be displayed at the remote terminal via the network connection. The network connection may comprise a local area network (LAN), a wide area network (WAN), the Internet, and/or a dedicated phone line. The network connection may also be a secure connection using encryption technology to encrypt and decrypt the packets of data.
Comparing
The calculator 40 and software application forming the preferred embodiment provides the ability to enter values and display the results in decimal mode or scientific mode. Note in the screenshots that there are two soft keys indicated in the display, one labeled “DEC” for decimal mode and the other labeled “SCI” for scientific mode. Each of these modes can provide different perspectives on the entered numbers and thus provide additional educational benefits to a user.
In the preferred embodiment, entered numbers between −1 and 1 (except 0) are displayed in scientific notation, regardless of the display mode chosen. This is illustrated in
Similarly,
It will be appreciated by those skilled in the art having the benefit of this disclosure that this invention provides a way to determine and display the number of significant figures for an entered number and/or a properly rounded answer on a screen along with the entered number(s) and the rounded answer. It should be understood that the drawings and detailed description herein are to be regarded in an illustrative rather than a restrictive manner, and are not intended to limit the invention to the particular forms and examples disclosed. On the contrary, the invention includes any further modifications, changes, rearrangements, substitutions, alternatives, design choices, and embodiments apparent to those of ordinary skill in the art, without departing from the spirit and scope of this invention, as defined by the following claims. Thus, it is intended that the following claims be interpreted to embrace all such further modifications, changes, rearrangements, substitutions, alternatives, design choices, and embodiments.
Number | Name | Date | Kind |
---|---|---|---|
4225932 | Hirano et al. | Sep 1980 | A |
4279022 | Abe | Jul 1981 | A |
4847802 | Ashton | Jul 1989 | A |
5289394 | Lapeyre, deceased | Feb 1994 | A |
5377130 | Frank et al. | Dec 1994 | A |
5768164 | Hollon, Jr. | Jun 1998 | A |
6044392 | Anderson et al. | Mar 2000 | A |
Number | Date | Country | |
---|---|---|---|
20030115231 A1 | Jun 2003 | US |