Computer, control method of computer, program and recording medium
By calculating and displaying approximate values adjusted to a predetermined scale, the system simplifies the understanding of overflow errors in computer calculations, enabling intuitive digit management and facilitating further operations.
Patent Information
- Application Number
- JP2023054433
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2043-03-30
AI Technical Summary
Existing computer systems require users to manually remember and interpret the number of digits indicated by the decimal point position for approximate values, making it difficult to easily grasp the number of digits of the calculation result when it exceeds the displayable digits.
The system calculates and displays an approximate value adjusted to a predetermined numerical scale, reducing the number of displayed digits and indicating the unit of the number, such as billions or thousands, to facilitate easier understanding.
Enables users to intuitively grasp the number of digits of the approximate value without manual calculation, allowing for easier handling of overflow errors and facilitating further calculations.
Smart Images

Figure 2024142335000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an electronic computer, a control method for an electronic computer, a program, and a recording medium. [Background technology]
[0002] Patent Document 1 discloses an error release method in which, when the value of a calculation result exceeds the number of digits that can be displayed in an electronic calculator, i.e., a so-called overflow occurs and key input is locked, pressing the clear key displays an approximate value of the calculation result and releases the key lock. In Patent Document 1, the number of overflowed digits can be indicated by the position of the decimal point in the approximate value. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Publication No. 61-075458 Summary of the Invention [Problem to be solved by the invention]
[0004] In the error reset method disclosed in Patent Document 1, the user himself had to memorize the unit of digits of the approximate value indicated by the decimal point position for each electronic computer according to the number of digits that the electronic computer can display. Therefore, when the approximate value of the calculation result is displayed when the calculation result exceeds the number of digits that can be displayed, it is difficult for the user to easily grasp the number of digits of the approximate value.
[0005] The object of the present disclosure is to provide an electronic computer, a program, and a recording medium that, when an approximate value of a calculation result is displayed when the value of the calculation result exceeds the number of digits that can be displayed, can easily grasp the number of digits of the approximate value. [Means for solving the problem]
[0006] An electronic calculator according to one embodiment of the present disclosure comprises a display unit, and a control unit which performs a calculation based on an input value and controls the display of a value indicating the result of the calculation on the display unit, and when the value exceeds the number of digits that can be displayed on the display unit, the control unit calculates an approximate value that matches a numeric unit indicating a predetermined decimal point so that the number of digits of the value displayed on the display unit is reduced, and displays the approximate value together with the numeric unit on the display unit.
[0007] Furthermore, a control method for an electronic computer according to one embodiment of the present disclosure includes a control step of performing a calculation based on an input value and controlling the display of a value indicating the result of the calculation on a display unit, and in the control step, if the value exceeds the number of digits that can be displayed on the display unit, an approximate value is calculated that matches a numeric unit indicating a predetermined decimal point so that the number of digits of the value displayed on the display unit is reduced, and the approximate value is displayed on the display unit together with the numeric unit.
[0008] Furthermore, a program according to one aspect of the present disclosure includes a control step of causing a computer to perform a calculation based on an input value and control the display of a value indicating the result of the calculation on a display unit, and in the control step, if the value exceeds the number of digits that can be displayed on the display unit, a control is executed to calculate an approximate value that matches a numeric unit indicating a predetermined decimal point so that the number of digits of the value displayed on the display unit is reduced, and to display the approximate value together with the numeric unit on the display unit.
[0009] Furthermore, a recording medium according to one aspect of the present disclosure is a computer-readable recording medium having recorded thereon a program for causing a computer to execute control that includes a control step of performing a calculation based on an input value and controlling the display of a value indicating the result of the calculation on a display unit, and in the control step, if the value exceeds the number of digits that can be displayed on the display unit, calculates an approximate value that matches a numeric unit indicating a predetermined decimal point so that the number of digits of the value displayed on the display unit is reduced, and displays the approximate value together with the numeric unit on the display unit. [Brief description of the drawings]
[0010] [Figure 1] 1 is a plan view showing an example of the external configuration of a computer according to a first embodiment of the present disclosure. [Diagram 2] 2 is a block diagram showing an example of a main configuration of the electronic calculator shown in FIG. 1. [Diagram 3] 2 is a diagram showing an example of a display on a display unit included in the electronic calculator shown in FIG. 1 during error control. [Figure 4] 2 is a flowchart showing an example of a calculation process in the electronic calculator shown in FIG. 1. [Diagram 5] 2 is a diagram showing an example of a display of an estimated value on a display unit included in the electronic calculator shown in FIG. 1. [Figure 6] 1. FIG. 4 is a diagram showing an example of a display on a display unit included in the electronic calculator shown in FIG. 1 when further calculation is performed on an estimated value. [Figure 7] 2 is a diagram showing an example of a transition of a display state of an approximate value on a display unit included in the electronic calculator shown in FIG. 1. [Figure 8] 2 is a diagram showing an example of a transition of a display state of an approximate value on a display unit included in the electronic calculator shown in FIG. 1. [Figure 9] FIG. 11 is a diagram showing an example of a home screen of a computer (smartphone) according to a second embodiment of the present disclosure. [Figure 10] 10 is a diagram showing an example of a display of a calculator application executed on the electronic calculator (smartphone) shown in FIG. [Figure 11] 10 is a diagram showing an example of transition of a display state of a value displayed by execution of a calculator application in the electronic calculator shown in FIG. 9. FIG. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, the embodiments and modifications of the present disclosure will be described with reference to the drawings. In the following, the same or corresponding components are denoted by the same reference numerals throughout all the drawings, and their repeated description will be omitted. In addition, the embodiments and modifications described below are merely examples of the present disclosure, and the present disclosure is not limited to the embodiments and modifications. Even if the embodiments and modifications are not limited to the embodiments and modifications, various modifications can be made according to the design, etc., as long as they do not deviate from the technical idea of the present disclosure.
[0012] An electronic calculator 100 according to a first embodiment of the present disclosure will be described with reference to Fig. 1 and Fig. 2. Fig. 1 is a plan view showing an example of the external configuration of the electronic calculator 100 according to the first embodiment of the present disclosure. Fig. 2 is a block diagram showing an example of the main configuration of the electronic calculator 100 shown in Fig. 1.
[0013] (Exterior configuration) 1, the electronic calculator 100 includes a key switch group 1 in which various key switches are arranged, a TAB switch 2, and a display unit 3. The key switch group 1 and the TAB switch 2 are capable of receiving input from a user, and the key switch group 1 and the TAB switch 2 implement the input unit 4 of the present disclosure.
[0014] The key switch group 1 is made up of a plurality of key buttons that accept input from a user. The key switch group 1 includes numeric keys 10, arithmetic operation keys 11, an equal key 12, a clear key 13, a percentage key 14, a memory key 15, and an estimate / conversion key 16.
[0015] The numeric keys 10 include a plurality of key buttons corresponding to the numbers "0 to 9" and "00", as well as a key button corresponding to a decimal point.
[0016] The four arithmetic operation keys 11 are key buttons for inputting commands for performing addition (+), subtraction (-), multiplication (x), and division (÷).
[0017] The equal key 12 is a key button for displaying various calculation results.
[0018] The clear key 13 is a key button for clearing only the value where a number is input incorrectly, or for clearing all values that indicate input values or calculation results. The clear key 13 includes an all clear key (CA), a clear key (C), and a clear entry key (CE). The all clear key (CA) is a key button for clearing all values including values stored in the numeric value storage unit 55 (see FIG. 2). The clear key (C) is a key button for clearing values other than those stored in the numeric value storage unit 55. The clear entry key (CE) is a key button for erasing only the last input value. That is, it is a key for erasing the value currently displayed on the display unit 3, and when the user makes a mistake in input during the process, the user can redo the input of the value by pressing this clear entry key (CE).
[0019] The percentage key 14 is a key button for performing percentage calculations.
[0020] The memory keys 15 are key buttons for storing input numbers or values indicating calculation results in the numeric value storage unit 55. The memory keys 15 include a memory clear key (CM), a memory recall key (RM), a memory minus key (M-), and a memory plus key (M+).
[0021] The memory clear key (CM) is a key button for clearing a value stored in the numeric value memory unit 55. The memory recall key (RM) is a key button for recalling a value stored in the numeric value memory unit 55. The memory minus key (M-) is a key button for subtracting the value displayed on the display unit 3 from the value stored in the numeric value memory unit 55. The memory plus key (M+) is a key button for adding the value displayed on the display unit 3 to the value stored in the numeric value memory unit 55.
[0022] The estimate / conversion key 16 is a key button for displaying an estimate of a value indicating a calculation result when an overflow occurs in the value indicating the calculation result, or for changing the unit of the value currently displayed on the display unit 3 to another unit. The estimate / conversion key 16 will be described in detail later.
[0023] The above-mentioned key buttons included in the key switch group 1 are merely examples and are not limited thereto. For example, the key switch group 1 may further include a sign conversion key button for changing the sign of the value displayed on the display unit 3 from positive to negative or from negative to positive. Alternatively, the key switch group 1 may further include a root key button for finding the square root of the value displayed on the display unit 3.
[0024] The TAB switch 2 is a slide switch that sets the value after the decimal point. The user can specify the desired number of decimal points by sliding the knob of the TAB switch 2. In the example shown in FIG. 1, the desired number of decimal points can be specified between 0 and 4. Also, when the user slides the knob to the F position, the number of decimal points is not fixed, and the so-called free state can be set.
[0025] The TAB switch 2 may be configured to allow the user to specify not only the desired number of decimal places as described above, but also to set how to round the decimal places. For example, the user may slide the knob to set it so that the digits below the specified decimal place are truncated, or the number is rounded up to the specified decimal place.
[0026] The display unit 3 displays values input by the user via the key switch group 1 and values indicating the results of calculations. In addition to the values, the display unit 3 can also display symbols indicating the state of the electronic calculator 100. Examples of symbols include "Over", "E", "M", and "-".
[0027] "Over" indicates that the value indicating the calculation result exceeds the number of digits that can be displayed on the display unit 3 and has overflowed.
[0028] "E" indicates an error state other than an overflow state. An example of an error state indicated by "E" is a division by zero error, in which a value is divided by zero.
[0029] “M” indicates that the value is already stored in the value storage unit 55 .
[0030] "-" indicates that the value displayed on display unit 3 is a negative number.
[0031] 2, the electronic calculator 100 further includes a control unit 5 and a storage device 6 in addition to the above-mentioned display unit 3 and input unit 4. As shown in FIG. 2, the control unit 5 is connected to the display unit 3, the input unit 4, and the storage device 6.
[0032] The control unit 5 performs calculations based on input values and controls the display of values indicating the results of the calculations on the display unit 3, and can be realized by, for example, a CPU. The control unit 5 includes, as functional blocks, a calculation unit 51, a display control unit 52, an overflow determination unit 53, and an error control unit 54. When the control unit 5 is realized by a CPU, these functional blocks can be realized by the CPU reading out a program stored in the storage device 6, which is, for example, a non-volatile memory such as a ROM, into a main memory (not shown), such as a RAM, and executing the program. The control unit 5 also includes a numerical value storage unit 55 as a register for storing values obtained as the results of the calculations.
[0033] The calculation unit 51 executes calculations on values inputted by the numeric keys 10, based on calculation instructions inputted by the arithmetic keys 11. The calculation unit 51 stores a value indicating the calculation result in the numeric value storage unit 55.
[0034] The display control unit 52 controls the display of the display unit 3. For example, the display control unit 52 controls the display unit 3 to display values input by the numeric keys 10, values indicating the results of calculations by the calculation unit 51, and the like.
[0035] The overflow determination unit 53 determines whether or not a value indicating the result of the calculation by the calculation unit 51 will overflow.
[0036] When the overflow determination unit 53 determines that a value indicating a calculation result will overflow, the error control unit 54 performs error control in the electronic calculator 100. That is, when the overflow determination unit 53 determines that an overflow will occur, the error control unit 54 controls the calculation unit 51 to stop executing the calculation and to disable number input even if any key of the numeric keys 10 is newly pressed.
[0037] Furthermore, when error control is being executed by the error control unit 54, the display control unit 52 controls the display unit 3 to display a symbol indicating the type of error, as shown in Fig. 3. Fig. 3 is a diagram showing an example of a display during error control on the display unit 3 included in the electronic calculator 100 shown in Fig. 1.
[0038] That is, the display control unit 52 displays the symbol "Over" indicating that an overflow error has occurred in the electronic calculator 100, places a decimal point in a position that indicates the number of overflowed digits in the value indicating the calculation result, and displays the value indicating the calculation result with the last digit discarded. Note that the display during this error control by the display control unit 52 may be referred to as an error display. Note that, although the display control unit 52 is configured to display a value with the last digit discarded here, it may also be configured to display a value with the last digit rounded off.
[0039] (Calculation processing) An example of the calculation process of the electronic calculator 100 when the value showing the calculation result exceeds the number of digits that can be displayed on the display unit 3 will be described below with reference to Fig. 4 and Fig. 5. Fig. 4 is a flow chart showing an example of the calculation process of the electronic calculator 100 shown in Fig. 1. Fig. 5 is a diagram showing an example of the display of an estimated value on the display unit 3 provided in the electronic calculator 100 shown in Fig. 1.
[0040] In addition, in the electronic calculator 100 according to the first embodiment of the present disclosure, a configuration capable of displaying numbers of up to 10 digits on the display unit 3 will be described as an example.
[0041] First, in the electronic calculator 100, the calculation unit 51 executes a calculation based on a calculation instruction inputted from the arithmetic operation keys 11 for a value inputted from the numeric keys 10 (step S11). For example, it is assumed that the electronic calculator 100 performs a calculation to add "9000500000" to "1230007000".
[0042] Next, overflow determination unit 53 determines whether or not the value indicating the calculation result by calculation unit 51 has overflowed (step S12). Here, the value indicating the calculation result obtained by the calculation in step S11 is "10230507000". This value indicating the calculation result is an 11-digit number, which exceeds the number of digits that can be displayed on display unit 3. In other words, the value indicating the calculation result has overflowed. Therefore, when overflow determination unit 53 determines that the value to be displayed on display unit 3 has overflowed ("Yes" in step S12), the process proceeds to step S13. In step S13, error control unit 54 performs error control.
[0043] If the answer is "No" in step S12, the display control unit 52 causes the display unit 3 to display a value indicating the calculation result, and ends the calculation process.
[0044] By the way, in the electronic calculator 100, the information of the value displayed on the display unit 3 is expressed as "mantissa x base (=10) 指数" format in numeric value storage unit 55. In other words, control unit 5 is configured to be able to manage the number of digits by the exponent. Then, overflow determination unit 53 can determine whether or not the value indicating the calculation result has overflowed from the information on the number of digits. Note that the calculation performed by overflow determination unit 53 to make the overflow determination can use a known calculation method, and therefore a detailed description thereof will be omitted here.
[0045] In step S13, when an error is displayed on the display unit 3, if the user presses the estimate / conversion key 16, the calculation unit 51 calculates an estimate of the calculation result, and the display control unit 52 controls the display unit 3 to display the estimate (step S14), as shown in FIG. 5.
[0046] That is, the calculation unit 51 calculates an approximate value that matches the unit of the number indicating a predetermined place value so that the number of digits of the value displayed on the display unit 3 is reduced. For example, in the example of Fig. 3 where an overflow has occurred, the decimal point is located at the 10 billion digit position, but in this case, the decimal point is shifted two digits to the right to calculate an approximate value in units of billions. Furthermore, in order to display the approximate value in an easy-to-read manner, the trailing zeros after the decimal point may be removed to display it in eight digits as shown in Fig. 5.
[0047] Furthermore, the display control unit 52 displays the estimated value together with the unit "billion" of the integer part of the value displayed on the display unit 3. Note that, in this case, the display control unit 52 also displays the symbol "Estimated" so that it is clear that the value displayed on the display unit 3 is an estimated value, and ends the calculation process.
[0048] In this way, the control unit 5 can reduce the number of digits of the value displayed on the display unit 3 and calculate an approximate value that matches the unit of the integer part of the displayed value to "billion," and display it on the display unit 3.
[0049] Therefore, when an approximate value of a calculation result is displayed when the value of the calculation result exceeds the number of digits that can be displayed (when the value overflows), the user can easily grasp the number of digits of the approximate value.
[0050] In the example shown in Fig. 5, the estimated value is an eight-digit number, so that a further value can be accepted via the numeric keys 10 to continue a new calculation. For example, when an instruction is given to add a new value while the estimated value shown in Fig. 5 is displayed on the display unit 3, the display control unit 52 controls the display on the display unit 3 as shown in Fig. 6. Fig. 6 is a diagram showing an example of a display on the display unit 3 included in the electronic calculator 100 shown in Fig. 1 when a further calculation is performed on the estimated value. Fig. 6 shows the transition of the display state on the display unit 3 when an additional 6 billion is added to the estimated value.
[0051] That is, since the digit at the decimal point indicates "oku", "oku" is displayed on the display unit 3. When the user inputs "+" on the arithmetic operation key 11 and then inputs the value "60" using the number keys 10, the display control unit 52 displays the number in units of "oku" on the display unit 3 in accordance with the display format of the approximate value (A). When the user further presses the equal key 12, the calculation unit 51 calculates the value obtained by adding "60." to the mantissa "102.305070" (B). The value thus obtained by the calculation unit 51 is displayed on the display unit 3 in units of "oku" by the display control unit 52 as shown in FIG. 6.
[0052] As described above, in the electronic calculator 100, if the overflow determination unit 53 determines in step S12 that the value indicating the calculation result by the calculation unit 51 has overflowed, the error control unit 54 performs error control in the following step S13. However, the error control by the error control unit 54 shown in step S13 may be omitted, and the calculation unit 51 may obtain an approximate value of the calculation result, and the display control unit 52 may display the approximate value on the display unit 3 as shown in FIG.
[0053] When configured in this manner, it is possible to omit the user's operation of pressing the estimate / conversion key 16 in order to cancel error control in the electronic calculator 100 and display an estimated value. Also, in the electronic calculator 100, the estimate / conversion key 16 can be omitted, and the control unit 5 can be configured not to include the error control unit 54.
[0054] 7, the display control unit 52 may be configured to change the display of the unit of the integer part represented by the position of the decimal point every time the user presses the estimate / conversion key 16 while the estimate value is displayed on the display unit 3. FIG. 7 is a diagram showing an example of the transition of the display state of the estimate value on the display unit 3 included in the electronic calculator 100 shown in FIG.
[0055] 7, each time the estimate / conversion key 16 is pressed by the user, the display control unit 52 changes the unit of the number indicating the digits of the integer part displayed on the display unit 3 from "billion" to "trillion," "trillion" to "thousand," "thousand" to "ten thousand," "ten thousand" to "million," and "million" to "billion." In addition, with this change in unit, the display control unit 52 controls to change the display position of the decimal point according to the unit being displayed.
[0056] That is, when changing the display (C) of the estimated value "102.30507 (billion)" to the display (D) of the unit "trillion", the display control unit 52 moves the position of the decimal point four places to the left. At this time, the display control unit 52 may be configured to store the initial estimated value and the decimal point position in the numerical value storage unit 55 so that the initial estimated value can be restored at any time. Then, when the user presses the estimate / conversion key 16, the initial estimated value and the decimal point position stored in the numerical value storage unit 55 are read out, and the decimal point position is moved according to the unit to be displayed and displayed. For example, when changing the unit from "billion" to "trillion", that is, when transitioning from the display state (C) shown in FIG. 7 to the display state (D), the decimal point position is moved four places to the left from the position before the change because "trillion" has four more digits than "billion". Also, for example, when changing the unit from "trillion" to "thousands," that is, when transitioning from the display state of (D) shown in Fig. 7 to the display state of (E), since "thousands" has nine fewer digits than "trillion," the position of the decimal point is moved nine places to the right from its position before the change. The same applies to the transition from the display state of (E) to the display state of (F), and from the display state of (F) to the display state of (G), and so a description thereof will be omitted.
[0057] In this way, by configuring the electronic calculator 100 to be able to change the unit of the numbers indicating the digit position, it is possible to display values in the display unit 3 in a unit desired by the user. When the electronic calculator 100 is configured to be able to change the unit of the numbers indicating the digit position of the integer part in this way, the estimate / conversion key 16 functions as the unit change instruction key of the present disclosure.
[0058] When the number of decimal places to be displayed on the display unit 3 is specified by the TAB switch 2, the display control unit 52 can display the value according to the change in the unit of the numerals indicating the above-mentioned decimal point as shown in Fig. 8. Fig. 8 is a diagram showing an example of the transition of the display state of the estimated value on the display unit 3 included in the electronic calculator 100 shown in Fig. 1.
[0059] For example, assume that the TAB switch 2 is set to display values to two decimal places. With this setting, an approximate value is displayed after a display (H) informing that an overflow has occurred in the value indicating the calculation result, as shown in Fig. 8. In this case, if the unit of the number indicating the digits indicating the integer part of the approximate value is set to "thousands," the approximate value is displayed on the display unit 3 as "10230507.00 (thousands)" (I). In the display state (I), the digits after the decimal point in the approximate value are to two decimal places, so no rounding is necessary.
[0060] 8, each time the estimate / conversion key 16 is pressed by the user, the display control unit 52 is configured to change the unit of the number indicating the digits of the integer part displayed on the display unit 3 from "thousand" to "ten thousand," "ten thousand" to "million," "million" to "billion," and "billion" to "trillion." In addition, with this change in unit, the display control unit 52 controls to change the display position of the decimal point according to the displayed unit.
[0061] That is, when changing the display of the estimated value "10230507.00 (thousands)" to the unit of "ten thousand", in other words, when transitioning from the display state of (I) to the display state of (J), the display control unit 52 moves the position of the decimal point one place to the left. At this time, the display control unit 52 may be configured to store the initial estimated value and the decimal point position in the numerical value storage unit 55 so that the initial estimated value can be restored at any time. Then, when the user presses the estimate / conversion key 16, the initial estimated value and the decimal point position stored in the numerical value storage unit 55 are read out, and the decimal point position is moved according to the unit to be displayed and displayed.
[0062] Furthermore, if the position of the decimal point is moved one place to the left, the approximate value will have three decimal places, making it necessary to round it off. Therefore, the calculation unit 51 rounds off the third decimal place ("0") in the approximate value "1,023,050.700 (million)" to obtain an approximate value with two decimal places, and the display control unit 52 displays the obtained approximate value on the display unit 3. As a result, the approximate value "1,023,050.70 (million)" is displayed on the display unit 3.
[0063] Furthermore, when the user presses the estimate / conversion key 16, the estimated value "1023050.70 (million)" is changed to a display in units of "millions." In other words, the display state transitions from (J) to (K).
[0064] In this case, the display control unit 52 moves the position of the decimal point two places to the left. Also, when the position of the decimal point is moved two places to the left, the approximate value will have four decimal places, and therefore rounding is necessary. Therefore, the calculation unit 51 obtains an approximate value by rounding off the third decimal place ("7") in the approximate value "10230.5070 (million)" to two decimal places, and the display control unit 52 displays the obtained approximate value on the display unit 3. As a result, the approximate value "10230.51 (million)" is displayed on the display unit 3.
[0065] Furthermore, when the user presses the estimate / conversion key 16, the estimated value "10230.51 (million)" is changed to a display in units of "billion." In other words, the display state transitions from (K) to (L).
[0066] In this case, the display control unit 52 moves the position of the decimal point two places to the left. Also, when the decimal point position is moved two places to the left, the approximate value will have four decimal places, and therefore rounding is necessary. Therefore, the calculation unit 51 obtains an approximate value by rounding off the third decimal place ("5") in the approximate value "102.3051 (billion)" to two decimal places, and the display control unit 52 displays the obtained approximate value on the display unit 3. As a result, the approximate value "102.31 (billion)" is displayed on the display unit 3.
[0067] Furthermore, when the user presses the estimate / conversion key 16, the estimated value "102.31 (billion)" is changed to a display in units of "trillion." In other words, the display state transitions from (L) to (M).
[0068] In this case, the display control unit 52 moves the position of the decimal point four places to the left. Also, when the position of the decimal point is moved four places to the left, the number of decimal places of the estimated value will be six, and therefore rounding is necessary. Therefore, the calculation unit 51 obtains an approximate value by rounding off the value to two decimal places in the approximate value "0.010231 (trillion)" to the nearest tenth ("0"), and the display control unit 52 displays the obtained approximate value on the display unit 3. As a result, the approximate value "0.01 (trillion)" is displayed on the display unit 3. Here, rounding is performed to round off the number, but the number of decimal places and below may be truncated.
[0069] Although the above description has been given with an example of an overflow of the calculation result in addition, the same applies to an overflow of the calculation result in multiplication.
[0070] Second embodiment In the first embodiment, the arithmetic processing performed by the electronic calculator 100 has been described. In contrast, in the second embodiment, a multifunction mobile terminal such as a smartphone 200 is used as the electronic calculator, and the arithmetic processing performed by the electronic calculator 100 is applied to arithmetic processing executed by a calculator application of the smartphone 200.
[0071] Hereinafter, a description will be given of a calculation process by a calculator application in the smartphone 200 according to the second embodiment of the present disclosure with reference to Fig. 9 and Fig. 10. Fig. 9 is a diagram showing an example of a home screen of the electronic calculator (smartphone 200) according to the second embodiment. Fig. 10 is a diagram showing a display example of the calculator application executed in the electronic calculator (smartphone 200) shown in Fig. 9.
[0072] As shown in FIG. 9, the smartphone 200 includes a device display unit 203 including a display panel including a liquid crystal panel or the like, and a touch panel of a capacitance type or the like that is arranged on top of the display panel and detects the position touched by a finger. When a user touches an icon 205 of a calculator application displayed on the device display unit 203, the calculator application is executed, and the calculator is displayed on the device display unit 203 as shown in FIG. 10. Note that the external configuration of the calculator displayed on the device display unit 203 and the essential configuration of the smartphone 200 related to the execution of the calculator application are similar to the external configuration of the electronic calculator 100 shown in FIG. 1 and the essential configuration of the electronic calculator 100 shown in FIG. 2. For this reason, similar members are given similar reference numerals and their description is omitted. However, the smartphone 200 differs from the electronic calculator 100 in that the input unit 4 in the smartphone 200 is a touch panel (not shown) included in the smartphone 200, and the key switch group 1 and the TAB switch 2 are key buttons displayed on the device display unit 203. The display unit 3 in the smartphone 200 also differs from the electronic calculator 100 in that the display unit 3 is the area of a display window displayed on the device display unit 203 .
[0073] In this way, when an overflow occurs in a value indicating a calculation result in the calculation process of the calculator application executed on the smartphone 200, the control unit 5 of the smartphone 200 calculates and displays an approximate value in the same manner as the electronic calculator 100. In other words, when an overflow occurs in a value indicating a calculation result, the control unit 5 provided in the smartphone 200 is configured to display the value indicating the calculation result obtained by executing the calculator application on the display unit 3 displayed on the device display unit 203 so that the number of digits is reduced, and to calculate an approximate value by adjusting the unit of the integer part of the displayed value to the unit of a number indicating a predetermined place value (for example, 100 million).
[0074] Therefore, when an approximate value of a calculation result is displayed when the value of the calculation result exceeds the number of digits that can be displayed (when the value overflows), the user can easily grasp the number of digits of the approximate value.
[0075] In addition, when an estimated value is displayed in the calculator app, when the user presses the estimate / conversion key 16, the display control unit 52 of the smartphone 200 is configured to change the display of the unit of the integer part represented by the position of the decimal point.
[0076] However, the unit of the approximate value displayed in the calculator application can be not only the unit of the number indicating the place value, but also monetary units such as yen and sen, or units indicating physical quantities such as m, mm, μm, nm, pico, and femto. In other words, the estimate / conversion key 16 of the calculator application not only functions as a key button for displaying an approximate value, but also as a key button for changing the unit of the number indicating the place value of the integer part of the value. It also functions as a key button for changing the physical unit of the value.
[0077] For example, if the approximate value of the calculation result is 0.09 yen, when the user presses the approximate conversion key 16, the currency unit is changed from yen to sen and the display is changed to 9 sen.
[0078] 11, the display control unit 52 may be configured to change the unit displayed on the display unit 3 from "mm" to "μm", "μm" to "nm", and "nm" to "mm" each time the user presses the estimate / conversion key 16. In addition, with this change in unit, the display control unit 52 controls to change the display position of the decimal point according to the displayed unit. FIG. 11 is a diagram showing an example of a transition in the display state of values displayed by execution of a calculator app in the electronic calculator (smartphone 200) shown in FIG. 9.
[0079] In other words, when changing the display state of "0.005333333 (mm)" to "nm" on smartphone 200, in other words, when transitioning from the display state of (N) to the display state of (O), display control unit 52 moves the decimal point three places to the right, and "5.333333 (μm)" is displayed.
[0080] Furthermore, when the user presses the estimate / conversion key 16, "5.333333 (μm)" is changed to the display of the unit of "nm." That is, when transitioning from the display state (O) to the display state (P), the display control unit 52 moves the position of the decimal point three places to the right, and "5333.333 (nm)" is displayed.
[0081] In this way, the control unit 5 can easily change the value displayed by executing the calculator application to a different unit, so that the value can be displayed in a unit that the user desires. [Explanation of symbols]
[0082] 1 Key switches 2 TAB switch 3 Display section 4 Input section 5. Control section 6 Storage device 10 Number Keys 11 Arithmetic operation keys 12 Equal Key 16 Estimate / Conversion Key 51 Arithmetic section 52 Display control unit 53 Overflow judgment unit 54 Error control section 55 Numerical memory section 100 electronic computer 200 Smartphones 203 Device display section 205 Icons
Claims
1. A display unit; a control unit that performs a calculation based on the input value and controls the display of a value indicating a result of the calculation on the display unit; The control unit is If the value exceeds the number of digits that can be displayed on the display unit, an approximate value is calculated that matches a unit of numerals indicating a predetermined decimal point so that the number of digits of the value displayed on the display unit is reduced, and the approximate value is displayed on the display unit together with the unit of numerals.
2. An input unit that accepts input from a user, 2. The electronic calculator according to claim 1, wherein the control unit performs error control to stop the calculation when the value exceeds the number of digits that can be displayed on the display unit, and when an instruction to calculate an estimate is input from the input unit after the error control, the control unit cancels the error control and causes the display unit to display the estimated value.
3. 3. The electronic computer according to claim 2, wherein the control unit controls the display unit to display a symbol indicating a type of error when the error control is executed.
4. the input unit includes a unit change instruction key for instructing a change of a unit of the value displayed on the display unit, The control unit is 4. The electronic calculator according to claim 2, wherein each time the unit change instruction key is pressed, the unit is changed and the value is displayed on the display unit.
5. 5. The electronic calculator according to claim 4, wherein the unit is a physical unit.
6. 5. The electronic calculator according to claim 4, wherein the unit is a unit of a number indicating the place value.
7. the input unit includes a digit number designation key for designating the number of decimal places of the value to be displayed on the display unit, The control unit is 4. The electronic calculator according to claim 2, wherein when the number of decimal places is specified by the number-of-digits specifying key, the estimated value is displayed on the display unit up to the number of decimal places specified by the number-of-digits specifying key in accordance with a unit of numerals indicating a predetermined decimal point.
8. A control step of performing a calculation based on the input value and controlling a display of a value indicating a result of the calculation on a display unit, In the control step, A method for controlling an electronic computer, when the value exceeds the number of digits that can be displayed on the display unit, calculating an approximate value that matches a unit of numerals indicating a predetermined decimal point so that the number of digits of the value displayed on the display unit is reduced, and displaying the approximate value together with the unit of numerals on the display unit.
9. To your computer A control step of performing a calculation based on the input value and controlling a display of a value indicating a result of the calculation on a display unit, In the control step, A program for executing control to, when the value exceeds the number of digits that can be displayed on the display unit, calculate an approximate value that matches a numerical unit indicating a specified decimal point so that the number of digits of the value displayed on the display unit is reduced, and to display the approximate value together with the numerical unit on the display unit.
10. On the computer, A control step of performing a calculation based on the input value and controlling a display of a value indicating a result of the calculation on a display unit, In the control step, A computer-readable recording medium having recorded thereon a program for executing control to, when the value exceeds the number of digits that can be displayed on the display unit, calculate an approximate value that matches a numerical unit indicating a specified decimal point so that the number of digits of the value displayed on the display unit is reduced, and display the approximate value together with the numerical unit on the display unit.
Citation Information
Patent Citations
Desk computer
JP1980146557A
JP1982161060U
Electronic appliance
JP1986065353A
Resetting system for error during overflow
JP1986075458A
JP1986168447U
