Both calculators and spreadsheets are great at getting a result but neither really makes it easy to document what the results really mean or how to use the results for a particular application. Calculators and spreadsheets were designed for an era of text files and discrete computing. The spreadsheet had its genesis in an age where users shared data by moving files on a floppy disk. The electronic calculator had its start as a stand-alone tool and was later used as a DOS (disk operating system) window in a windows world. This approach of an earlier digital era is no longer sufficient nor competitive in today's digital world of seamless integration and portability to mobile phones and PDA (personal digital assistant) devices.
Even when spreadsheets are able to handle some math functions of interest, users may have to embed the spreadsheet into a text file if they want to be able to explain what variables mean and/or how an equation was derived. Many times an equation lacking annotation or a number without units is insufficient to help someone else make meaningful changes to an equation or interpret the results thereof. Knowing what a variable means, how a result was calculated or where an equation came from can therefore be just as important, if not more so, than the result and the equation themselves. This is especially true in areas of finance and engineering etc., but may also be true for customers and clients who want to know how a vendor or a serviceman arrived at a charge on their bill.
There has therefore been a long felt need for a seamless and integrated calculator in a text file environment that allows a user to annotate and explain an equation and actually perform the math functions therein. This long felt need extends into all areas of business, engineering and personal finance including but not limited to itemized billing, small business management, cut and paste engineering applications, mortgage payment estimators and taxable income accounting.
A system, method and computer program product for interactive computing of equations in context includes finding a beginning and an end of a line of text comprising an equals sign and determining if the line is an equation based on any predefined mathematical notation existing in the line; and determining a string variable name comprising all characters and spaces between any two of the predefined mathematical notation, the equals sign and the beginning and the end of the equation wherein the string variable name comprises any Unicode character including a space, a non-breakable space and a plurality of any Unicode characters including numbers, special and non-printed characters.
A non-transitory computer readable medium having computer useable program code executable to perform operations for interactive computing as disclosed may include parsing a user's notes, on an electronic computing device, for at least one delimited contextual mathematic equation relating a string variable to at least one of another variable, a constant and a unit of measurement. The computer readable medium may also include program code executable to perform operations for assigning a numerical value to a variable, the numerical value determined by one of a computing, a user input and a context for the variable. The context may include a unit of measurement conversion which changes a number if a unit conversion is needed to be consistent with a result's unit of measurement. The computer readable medium may additionally include program code executable to perform operations for computing a numerically unassigned variable via the equation relating the variable(s), any constant(s) and any unit(s) of measurement. The computer readable medium may further include program code executable to perform operations for declaring in the user's notes, on the electronic computing device, any computed and numerically unassigned variable(s) in context with the equation and any related variable(s).
An interactive computing notepad as disclosed may include a parsing module configured to parse a user's notes for at least one delimited contextual mathematic equation relating a string variable to at least one of another variable, a constant and a unit of measurement. The interactive computing notepad may also include an assigning module configured to assign a numerical value to a variable, the numerical value determined by one of a computing, a user input and a context to for the variable. The interactive computing notepad may additionally include a computing module configured to compute a numerically unassigned variable via the equation relating the variable(s), any constant(s) and any units of measurement. The interactive computing notepad may further include a declaring module configured to declare by editing into the user's notes any computed and numerically unassigned variable(s) in context with the equation and any related variable(s).
Other aspects and advantages of embodiments of the disclosure will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, illustrated by way of example of the principles of the disclosure.
Throughout the description, similar or same reference numbers may to be used to identify similar or same elements depicted in multiple embodiments. Although specific embodiments of the invention have been described and illustrated, the invention is not to be limited to the specific forms or arrangements of parts so described and illustrated. The scope of the invention is to be defined by the claims appended hereto and their equivalents.
Reference will now be made to exemplary embodiments illustrated in the drawings and specific language will be used herein to describe the same. It will nevertheless be understood that no limitation of the scope of the disclosure is thereby intended. Alterations and further modifications of the inventive features illustrated herein and additional applications of the principles of the inventions as illustrated herein, which would occur to one skilled in the relevant art and having possession of this disclosure, are to be considered within the scope of the invention.
Welcome to the interactive notepad for computing equations in context that actually knows how to do the math, perform calculations, write notes and intermix the two. A note may contain written text before, after or even in the middle of calculations and equations. Even variables may be documented. The disclosure allows any math function and computation from basic calculations to advanced calculus. All that may be required of a user is to enter an expression, followed by a delimiter such as an equals sign “=” or even the language term “equals,” in one of many languages and hit a calculate button ‘calc’ to perform the calculation. An embodiment of the disclosure may include an electronic display or screen that may be modified to provide access to an alphanumeric keyboard and often used math functions for mobile applications. Alternatively, a user may hit a ‘function’ button on the screen to access over 200 more functions including everything from powers and logs, programmer math (Boolean algebra on binary, hexadecimal and other number bases), complex numbers and matrices and more.
The term ‘delimiter’ as used throughout the present disclosure may refer to a sequence of one or more Unicode characters, words, phrases or symbols or any combination thereof used to specify a boundary between separate, independent mathematical regions in plain text and other data streams. The term ‘contextual’ may simply mean ‘with text’ and may refer to part of a text or statement that surrounds a particular equation or formula that may be used to determine the meaning of a variable, a result and therefore an equation itself. The term ‘method’ as used in the present disclosure may be implemented in a non-transitory computer readable medium having computer useable program code executable to perform operations for interactive computing. Therefore, the terms ‘method’ and ‘computer program product’ and the like may refer to the same or similar elements of the disclosure as claimed herein. The term ‘variable’ in the present disclosure refers to both a variable name and a variable value or content within a mathematic equation which are variable during program execution. The term ‘string variable’ refers to a variable type comprising at least one text character such as an alpha character and/or other text in the variable name having a value type including numbers which may be mathematically manipulated and calculated.
Unicode is an international encoding standard for use with different languages and scripts, by which each letter, digit, or symbol may be assigned a unique numeric value that applies across different platforms and programs. Any Unicode character including but not limited to a space, a blank space, e.g. white space, may be included in a string variable of the present disclosure, but does not have to be included therein. The ASCII (American Standard Character) character set or the Unicode character set or any other set may be used therein. Unicode is a superset of the ASCII character set with provisions made for handling international symbols and characters from other languages and therefore facilitates the implementation of the disclosure in multiple languages. Unicode comprises sixteen bits and therefore takes up roughly twice the space as simple ASCII, but is correspondingly more flexible. This element of the present disclosure obviates the traditional programming requirement of ‘CamelCase’ (contiguous words having the first letter of each word capitalized) and underscore characters in a string variable.
In an embodiment of the present disclosure, equations may reside on their own text line. An equation or formula may automatically wrap to the next line but may not contain a return in the middle of the equation or formula (non-breakable line, NBL) unless an overriding “/# text #/ delimiter and the like is manually inserted by the note creator. The present disclosure may also include a non-breakable space (NBSP) in a string variable and/or in an equation. The NBSP also known as a non-breaking space or a no-brake space is a variant of the space character that prevents an automatic line break (line wrap) at its position. In certain formats (such as HTML), it may also prevent the “collapsing” of multiple consecutive whitespace characters into a single space. The non-breaking space is therefore also known as a hard space or fixed space. In Unicode, it is encoded at U+00A0. Text-processing software typically assumes that an automatic line break may be inserted anywhere a space character occurs; however, a non-breaking space prevents this from happening (provided the software recognizes the character). For example, if the text “100 miles” will not quite fit at the end of a line, some text editors may insert a line break between “100” and “miles”. To avoid this undesirable behavior, the present disclosure may choose to use a non-breaking space between “100” and “miles”. This guarantees that the text “100 miles” will not be broken.
Therefore in an embodiment of the present disclosure, the at least one delimited contextual mathematic equation may comprise one of a wrap-around line and a non-breakable line including any number of string variables and any number of non-breakable spaces and any combination thereof. In contrast to collapsible or breakable white space, non-breaking spaces may not merge with neighboring whitespace characters, and may therefore be used by a user to insert additional visible space in the formatted text.
Returning to
For instance, how many people have heard of the Pythagorean Theorem but yet have no clue how to apply it in a practical setting. Someone who has applied the Pythagorean Theorem in purchasing a ladder for a certain roof height may want to share his application insight with others (a ladder leans against a house and forms a hypotenuse with the height of the roof). It may not be enough simply to share the equation H2=a2+b2 to know what ladder height to buy but sharing how to apply the roof height and how far away from the house one leans a ladder, allows another to get a meaningful result and make an intelligent purchase. Sharing an application may allow others to avoid mistakes and rework and find the best known methods for any certain application of a formula or an equation. The ability to search on a tag or a key word in interactive contextual computing as disclosed, allows user's not only to better organize their own notes but also allows others to take advantage of practical applications discovered by others.
In an embodiment of the disclosure, users may share variables across notes, websites and applications with themselves and/or with other users. For instance, the variable ‘Sales 2012’ may be calculated from an equation adding Q1 to Sales with Q2 Sales, Q3 Sales and Q4 Sales and shared across a user's notes and shared across a website for use in other applications involving other users and software tools including spreadsheets, etc. Similarly, users may also share values and functions across notes, websites and applications with themselves and/or with others. For instance, a value for the variable name ‘Sales 2012’ may be shared or even simply a dollar amount with a tag or a pointer to ‘Sales 2012’ may also be shared across notes, websites and applications.
An interactive contextual note as disclosed may include trigonometric functions and another may include length conversions. Interactive contextual templates are easy to set up per the disclosure. Embodiments of the disclosed method and computer program product may be used to perform a trigonometric calculation, e.g. to compute the cosine of 35. A user may enter the text ‘cosine 35=” and hit the ‘calc’ key to get a result. Calculation is only the tip of the iceberg though in the possible applications for the disclosure. When user's start combining computation with data and information they have typed about their notes, the disclosure gets a lot more powerful. For instance, an independent contractor wanting to give a quote to a client for doing repairs may easily enter a note with all the information about their client, all searchable later, organized into categories or tags to help them find it later. The contractor may even do the math on the work he or she has done for a client and print it out as an itemized bill with no modification or extra work required for the arithmetic in context.
The user of the disclosure declared the variable names ‘Pears’ and ‘Price of Pears’ in the text 620 and assigned the variable values of 45 and 0.75 to them, respectively. The disclosure didn't find the variable name ‘Total Pears’ 630 to so declared it and because it was blank and all the other variables were known, it also calculated it or automatically assigned a variable value to a variable name, known herein as ‘automatic variable assignment.’ In other words, automatic variable assignment is for variables found in the equation that have no variable value defined, the assigning including automatically declaring the variable name and its value based on calculating its value relative to a plurality of any other known values in the equation. Alternatively, the user could have declared all the variables' names and values himself, including ‘Total Pears’ 630. However, when he calculates via the disclosure, he automatically gets the variable name and result for ‘Total Pears’ 630 including the variable value shown as $33.75. He may also include the purchase of other produce via similar formulae. In an embodiment of the disclosure, these variable names and variable values know how to work together in context in the disclosed interactive notepad.
For instance, pears aren't the only thing the produce manager is buying today. He is going to also buy some grapes and some oranges. Since he has already setup the basic formula is in advance, he may hit calculate and the disclosure will automatically set up his variables 650 for him. He may put in currency symbols if he would like ($) and the symbols may be treated as a string variable with the numbers he assigns to a variables by the disclosure. He is going to buy $45 dollars' worth of grapes and $75 dollars' worth of oranges. He may then want to know much produce he can afford so he hits the ‘calc’ button and the total produce price appears. On the other hand, if instead he has a budget on any certain day for his produce department he can calculate how many of each product he may purchase. Today, he has $200 for produce and may therefore buy more grapes. He needs to therefore know how many grapes can he purchase so he erases his prior grapes number and enters $200 in Total Produce variable and hits ‘calc.’ The total grapes number automatically reappears and he has not only an answer but a document detailing how he arrived at that particular number that he can save in his database and refer to at any later point in time.
Internally, the disclosure may sum ‘Pay’ first then use that to calculate FICA (social security and Medicare contributions). However, because the parentheses notation was used, those computed values are not displayed but the equation ‘Pay*11%’ may be retained. However, since no parentheses were used for the ‘Total Payroll,’ the correct result for Total Payroll, $24,810 may be displayed. Note that in this case % is a math symbol used in the equation. One additional note: As demonstrated above, a user may use a variable to calculate another variable when utilizing replacement notation. Alternatively, rather than the colon and greater than sign following ‘Total Payroll’ an equals sign may be used.
Again from
An embodiment of the disclosure may sum ‘Pay’ first then use that to calculate FICA (social security and Medicare contributions). Because the back slant notation was used, 21,000 may replace \10,000+6,000+5,000\ and 2,310 may replace \Pay* 11%\. Subsequently, the disclosure may calculate ‘Total Payroll.’ Note that in this case % is a math symbol used in the equation.
An embodiment of the present disclosure may include a standalone device comprising the computer program product and the methods discussed herein. Another embodiment of the disclosure may include a non-transitory application of the computer program product and the methods disclosed herein. Also, any combination of various standalone products and applications, either wireless or wired, may be included in embodiments of the present disclosure. Therefore, a keyboard and other input/output may be implemented in hardware and/or on an electronic display screen in multiple embodiments of the disclosure. Calculations and computations may also be performed directly in hardware and/or simulated in any application layer residing on the standalone device and/or the system as disclosed.
Therefore, per the present disclosure, variables within a mathematic equation having a value and a name including space(s) which are variable during program execution are claimed in the present application. Variables, as disclosed herein, are created for the semantic purpose of identifying a storage content or value and are variable during program execution and are therefore inherently different from tokenization and search engine indexing.
In an embodiment of the disclosure, a non-transitory computer readable medium having computer useable program code executable to perform operations for interactive computing is known herein as an Equals engine. When a document is submitted to the Equals engine, a scan begins at the top of the document for an equals sign. When an equals sign is discovered, the character before the equals sign is reviewed to determine whether it is an apostrophe (′). If it is, then this equals sign is ignored. The Equals engine continues scanning the document for the next equals sign.
If the previous character is not an apostrophe, then the Equals engine scans backwards and forwards to find the beginning and end of the line of text. Text can either be in HTML format or Unicode text-only format. If any HTML syntax is discovered then it is assumed that the beginning and end of each line is denoted by HTML tags such as <br>, <p></p>, and <div></div>. If no HTML syntax is discovered then the beginning and end of each line is denoted by newline and carriage return characters (represented by ‘\n’ and ‘\r’ in the C programming language respectively), combinations or equivalents. This text is known to be either an equation or a variable.
To differentiate between an equation and variable, the resulting text is reviewed for mathematical notation and functions. Mathematical notation can to include but is not limited to +, −, *, /, and {circle around ( )} (addition, subtraction, multiplication, division, and power, respectively). Mathematical functions are always in the form “xxx(” where “xxx” is the function name followed directly by a left parentheses (no spaces to separate them). Examples include “sqrt(” for square root and “tvmpmt(” for the payment calculation of time value of money. If the text string contains appropriate mathematical notation or functions then the text is considered to be an expression; otherwise it is considered a variable.
Equations may be parsed by taking each character, starting from the first character in the line, and adding it to previous characters until a definitive type is determined or an error occurs. The collection of these characters is a string. This type is initially in an unknown state. If the first character is a letter, then the Equals engine initially sets the type to a variable. It continues adding to that string until it is either determined to not be a variable, an alternative type is determined, until a mathematical notation or function is found, or an error occurs. As each character is added to the string, the state is re-determined. This type could be a number (whether integer, floating point number, complex number, etc.), a variable (whether a reserved name like “true” or pre-defined variable like “pi”), or another type.
For instance, regarding the equation:
Sales 2011=Sales Q1+Sales Q2
The parser looks at “S” and determines that this is the beginning of a variable. It continues on: “Sa”, “Sal”, “Sale”, “Sales”, etc, until it reaches “Sales 2011”. Throughout it still considers this number to be a variable. A break is determined when it reaches the equals sign. It continues with the next characters after the equals sign.
As an alternative example, assume the following equation:
2011 Sales=Q1 Sales+Q2 Sales
In this case it initially determines that “2” is a number. This continues through “20”, “201”, “2011” and “2011” (space at the end). At this to point, a few options are possible: 1) the next character is a math symbol and therefore “2011” will drop the space and become a number; 2) the next character is a letter or other variable-acceptable character and the parser will continue adding to the string and its type will change to variable; or 3) the next character is something like left parentheses that causes a parsing error. In this case the next character is an “S”, the type is changed to variable, and the string is changed to “2011 S”.
In some embodiments of the disclosure, there is some look-ahead happening when the engine thinks a variable is a number type. In this case it finds “2011” as a variable and then finds “Sales” as a variable. Since there is a space between the two, the disclosed Equals engine realizes that “2011” is actually the beginning of the variable instead, and stitches the two together as “2011 Sales” and sets its type to variable.
This process is repeated once for the entire equation and stored for the mathematical calculation portion of the process. Variables are also parsed by assuming a consistent format. The format for a variable is as follows where the items in brackets [ ] are optional. The value and optional unit along with the variable name are retained to be used when performing the appropriate calculations.
Variable Name=[currency symbol] value [unit] [additional descriptive text]
If all variables within the equation have corresponding values, except the one being calculated (the unknown), then Equals performs the mathematics for the unknown variable and inserts the calculated result in the appropriate location. If there is more than one unknown then the Equals engine just continues on to the next equation. In embodiments of the disclosure including automatic variable assignment, if variables are found to be in the equation but not defined then those variables are defined and assigned automatically in the “Variable Name=” format. They may also be calculated if that variable is determined to be the unknown (all other variables within the equation are known).
This entire process is repeated until the end of the document is found. When the end of document is found, it begins scanning at the top again until no additional calculations are performed for one full cycle through the document. All changes are then returned to the display.
For instance, take the following text line that is found as an equation because it comprises an equals sign not preceded by an apostrophe and is bound on either end by a carriage return or line feed.
2013, 2012, and 2011 Sales=2013 Sales+2012 Sales+2011 Sales
Accordingly, the first variable name of type string, determined in the above equation may be ‘2013, 2012, and 2011 Sales’ because it is between the beginning of the equation and the equals sign. The variable name therefore to includes 2 commas, 4 spaces and alphanumerics and the variable value may be numeric. The second variable name determined in the equation is ‘2013 Sales’ because it is between the equals sign and the predetermined mathematical notation ‘+’ and may be numeric in value. The third variable name ‘2012 Sales’ is defined between two ‘+’ in the equation and includes alphanumerics and a space and may be of the number value type. The fourth variable name determined in the equation is ‘2011 Sales’ because it is between the second ‘+’ and may be a number type value.
On the other hand, For instance, the following text line is also found as an equation because it comprises an equals sign not preceded by an apostrophe and is bound on either end by a carriage return or line feed.
2013 Sales+2012 Sales+2011 Sales=2013, 2012, and 2011 Sales
Similarly, according to the disclosure, the first variable name of type string, may be defined or determined in the above equation as ‘2013 Sales’ because it is between the beginning of the equation and the predetermined mathematical notation ‘+’ and may be numeric in value. The second variable name may be ‘2012 Sales’ defined between two ‘+’ in the equation and include alphanumerics and a space and may be of the number value type. The third variable name may be defined or determined as ‘2011 Sales’ because it is between the second ‘+’ and the equals sign and may be a number value type. The fourth variable name in the present equation is ‘2013, 2012, and 2011 Sales’ because it is between the equals sign and the end of the equation. The fourth variable name therefore includes 2 commas, 4 spaces and alphanumerics and the variable value may be numeric.
In an embodiment of the disclosure, if all the variables are known and declared in the user's text except the second variable ‘2013 Sales’ then the second variable is autodeclared on a separate line in the text of the users notes as ‘2013 Sales=$uvwx.yz’ having a value computed from the first, third and fourth variables. Also, the units of the second variable are assigned to be consistent with the other variables having a $ unit type. In the event that one of the variables is of the cents type rather than dollar type, the disclosure will convert the units to to dollars and change the respective number into dollars by moving the decimal point. In an embodiment of the disclosure, where a variable is in inches and the other variables are in feet, the disclosure will not only change the units to feet but will perform the calculation to change a number of inches into respective feet.
Although the operations of the method(s) herein are shown and described in a particular order, the order of the operations of each method may be altered so that certain operations may be performed in an inverse order or so that certain operations may be performed, at least in part, concurrently with other operations. In another embodiment, instructions or sub-operations of distinct operations may be implemented in an intermittent and/or alternating manner.
While the forgoing examples are illustrative of the principles of the present disclosure in one or more particular applications, it will be apparent to those of ordinary skill in the art that numerous modifications in form, usage and details of implementation can be made without the exercise of inventive faculty, and without departing from the principles and concepts of the invention. Accordingly, it is not intended that the disclosure be limited, except as by the specification and claims set forth herein.
This application is a continuation-in-part of and claims the benefit of the priority date of earlier filed U.S. Non-Provisional patent application Ser. No. 13/469,426 filed May 16, 2012 under the title ‘An Interactive Notepad for Computing Equations in Context’ for Elia Freedman and Rick Huebner incorporated herein by reference in its entirety.