inteliCalc 1.5==============Author: Christoph FabianekContact: fabianek@atp5000.tuwien.ac.atPlatform: Newton OS 2.xPackage-Size: 42 KOverview--------inteliCalc is an easy to use scientific calculator using RPN and nowprovides about 50 standard mathematical functions. iCalc supports fullpen input and drag & drop of all your data. Trigonometric functions arein DEG, RAD or GRAD modes and all results can be displayed in standard,fixed, scientific or engineering mode. Values can be displayed inhexadecimal, octal or binary format. Additionally inteliCalc providessome common constants, system parameters and you can store your ownconstants. For a detailed discussion of all functions see the section"Using inteliCalc" below. inteliCalc is still Freeware.New Features in Version 1.5---------------------------* Functions - General: Abs, Floor, Ceiling, Erf, Erfc, Comb, Perm, Random - Trigonometric: Sinh, Asinh, Cosh, Acosh, Tanh, Atanh, Atan2, Hypot - Statistic: Total, Mean, Std. Deviation, Sum(x^2), Max, Min, Count - Financial: Annuity, Compound - View: ->Q, ->PiQ, Binary, Octal, Hexadecimal - Constants: Pi, e, c, C (=Euler-/Mascheroni- Constant) - System Parameters: CPU-Speed and some Battery-Info* Preferences to - set the number of visible stack-lines, - enable / disable error messages - name stored values* Localization - supports all kinds of number delimiters chosen in the Locale Panel - runs on German MP2100 - see section below for detailed information* enhanced Drag & Drop - supports formatted Numbers (12,000.234 or 2e-5)* enhanced Input - see the last section "Interesting behaviour of the new Input-Parser"System Requirements-------------------inteliCalc should run on any Newton with OS 2.1. Mail me if you are using inteliCalc 1.5 on OS 2.0, the MP130 or the eMate.Version 1.0 runs on MP130 as users reported back to me. Installation------------Installation is simple. Just download inteliCalc with the NewtonConnection Utility (for Mac or Windows), the Newton Package Downloader,or the Newton Backup Utility. See the documentation with each of thesefor more information on installing packages with them.IMPORTANT: inteliCalc has to be installed on the internal store! Using inteliCalc----------------Display: Enter numbers with the numeric keypad or use your pen. When you write a number on an empty line, it is inserted at this position in the stack. If there is already a value, the input will be ignored. When you drop values into the stack, it works the same way. You can scrub out items in the stack, and if you drag out numbers they are also removed (use double-tapping on the selected item to drag a copy of the number). Angle-Indicator: Tap on the angle indicator (Deg, Rad, Grad) to rotate through the angle modes, which determines how inteliCalc interprets angle arguments and how it returns angle results: Deg: Degrees - 1/360 of a circle Rad: Radians - 1/(2*Pi) of a circle Grad: Grads - 1/400 of a circleDisplay-Indicator: Tap on the display indicator (Std, Fix, Sci, Eng, EngT) to rotate through the display modes, which control the format inteliCalc uses to display numbers. Tap on the number next to it to choose the number of decimal digits. ATTENTION: Numbers are always stored with maximum precision, but operations and the results are only at the chosen precision level! Std: Standard mode displays numbers using full precision. Fix: Fix mode displays numbers rounded to a specified number of decimal digits. Sci: Scientific mode displays a number as a mantissa (with one digit to the left of the decimal point) and an exponent. Eng, EngT: Engineering mode displays a number as a mantissa followed by an exponent that is a multiple of 3. EngT is the Engineering mode as interpreted by Mr. Tiernan: - contrary to my HP48 - EngT uses a fixed number of decimal digits; try 15820 in Eng 4(15.820E+03) and EngT 4(15.8200E+3). Edit-Indicator: Is shown in the upper right corner of the display and is displayed when entering numbers or expressions. Trigonometric functions - Sin, Cos, Tan (Asin, Acos, Atan): The angle arguments and results are interpreted as degrees, radians, or grads, depending on the current angle mode (see Angle-Indicator). Arithmetic and general math functions - Sqr, y^x, 1/x, Log, +, -, *, / (XRoot, !, e^x, Ln, Mod): These functions take either on or two arguments from the stack and return the result in the first (bottom) line of the stack. Storing numbers - Sto (Rmv): Tapping this button removes the first (bottom line) item of the stack and stores it on your Newton. With the Constants-Menu you can recall stored values. To remove stored numbers you have to execute 2 steps: First recall the value and then tap Rmv (inteliCalc knows the last recalled number, and this number will be deleted from the list of stored numbers). Edit (last): To secondary edit entered numbers, tap this Button. The first (bottom line) value of the Stack will then be displayed left justified and the Edit-Indicator is shown. If you tap Edit, when the edit-Mode is already active, the value will be stored into the stack again. If the Input can't be interpreted, an error message is displayed and the whole line is removed. (Contrary to Enter: there an error message is also displayed, but the input stays in Edit-Mode.) Executing the Last-Command places the arguments of the most recently executed command on the stack so that you can use them again. Swp (Pick): Swap exchanges the contents of Line 1 and 2. Pick copies the value of the n'th line (first line not included) into the first line (the value of the n'th line is put into the first line).Enter: If the Edit-Mode is active the value being edited is copied into the Stack. If the input can't be interpreted, an error message is displayed, and the Edit-Mode stays active. If you are not in the Edit-Mode the value of the first line is duplicated. Shift: Toggle with this Button the Shift-Mode. If a command in Shift-Mode is executed, Shift-Mode is deactivated. E+ (E-): To key in a number as a mantissa and an exponent type in the mantissa, press E+ (or if is negative E-), type in the exponent. (To change the sign of the value type +/-.)Drop (CLR): Drop removes the value of the first (bottom) line in the stack. If the Edit-Mode is active, the last character is removed. CLR clears the entire stack. Keys 0 .. 9, Comma: If the Edit-Mode is active the character is added at the end. Otherwise, a new line is added, the Edit-Mode activated, and the character is displayed. Shift+0 turns off your Newton and Shift+"." adds Pi to the Stack. inteliCalc supports numbers with approximately 16 decimal digits of precision, ranging from +/-1.8E+308 to +/-2.2E-308. +/-: Changes the sign of the value in the first (bottom) line.Function-Button(fx): Choose the menu of the button beside: General-Menu: - Abs: Absolute value - Floor: Greatest integer less than or equal to the argument - Ceiling: Smallest integer greater than or equal to the argument - Erf: Error function of x - Erfc: Complementary error function of x - Comb: Number of combinations of y items taken x at a time - Perm: Number of permutations of y items taken x at a time - Random: Random integer between y (lower limit) and x (upper limit) - the range is inclusive of the numbers x and y Trigonometric-Menu: - Sinh: Hyperbolic sine: (e^x - e^-x)/2 - Cosh: Hyperbolic cosine: (e^x + e^-x)/2 - Tanh: Hyperbolic tangent: sinh x/cosh x - Asinh: Inverse hyperbolic sine: sinh^-1 x - Acosh: Inverse hyperbolic cosine: cosh^-1 x - Atanh: Inverse hyperbolic tangent: sinh^-1 (x/sqrt(1-x^2)) - Atan2: Inverse tangent of x/y - Hypot: Square root of the sum of the squares of x and y, avoiding the hazards of overflow and underflow when the arguments are large or tiny in magnitude but the result is within range. Statistic-Menu: - Total: Total of all stack-entries - Mean: Mean (average) of all stack-entries - Std. Deviation: Sample standard deviation of all stack-entries - Sum(x^2): Sum of the squares of all stack-entries - Max: Maximum of all stack-entries - Min: Minimum of all stack-entries - Count: Number of stack-entries Financial-Menu: - Annuity: Value of the financial formula (1-(1+y)^-x)/y; y is the periodic interest rate and x the number of periods - Compound: Value of the financial formula (1+y)^x; y is the periodic interest rate and x the number of periods Note: That are not many financial formulas, but there are no more built in. Mail me some financial formulas, if you think they are useful. View-Menu: - -> Q: Converts a decimal value to its best-guess fractional approximation - -> PiQ: Converts a decimal value to its best-guess fractional approximation * Pi - Binary: Show the argument in binary format - Octal: Show the argument in octal format - Hexadecimal: Show the argument in hexadecimal format Constants-Menu: - Values of 4 constants: Pi, e, C (=Euler-/Mascheroni- Constant) and c; - Your stored values - Clear All: removes all stored values System-Parameters-Menu: - free Heap memory (before showing it, a garbage collection is executed) - ambient Temperature - CPU-Speed - Battery Temperature (did you know, that your Newton has two built-in thermometers?) - Battery Capacity in %: The percentage of a full charge that the battery contains. - Battery Voltage: The current battery voltage. - AC Voltage: If AC power is supplied the AC voltage being supplied by an AC adapter.Error Messages: If inteliCalc can't interpret an input, or can't perform an command an error message is displayed for 3 seconds. The error message closes immediately if you tap on it. The message includes the command and an error text: - Bad Argument Value - The command can't be performed with these arguments - Invalid Syntax - Check your input - Overflow / Infinite Result - Division by 0; Number out of range - Too Few Arguments - Enter all arguments to perform the command - Undefined Result - The command can't be perform on the numberIf inteliCalc does not start (i.e. starts with an error message andquits): delete the 'iCalc Stack' in the Storage area of the Extras drawer.this procedure should clear the stack and inteliCalc should start again.Localization------------InteliCalc supports now all kinds of number delimiters chosen in theLocale Panel in the Extras drawer.Please make sure that your Stack is empty before you change thelocalization. You might also experience troubles with stored values,when you change the localization. It is advised to clear the storedvalues before changing, too.You can also delete the 'iCalc Stack' and 'iCalc Stored' in the Storage areaof the Extras drawer. They will be rebuild after inteliCalc starts.Note: InteliCalc was tested with the built in localizations of the MP2000 (OS 2.1), the German MP2100, austria.pkg (I can not remember where I got it from), and the packages from Compower AG (Swiss, German and Austrian). Please send me an email if you experience troubles with your localization (include the localisation package in the email, otherwise I am unable to check).Interesting Behaviour of the new Input-Parser--------------------------------------------If you have used version 1.0 of inteliCalc, you may have noticed thatinteliCalc (and many other calculators on the Newton) don't handleexponents correctly (e.g. 76E+3 becomes 76000.0000000001). This isdue to a problem converting your input-string into a number. Inversion 1.0 the conversion is done by the StringToNumber function, whichdoesn't support exponents. So I had to write some crude work-around, andyou got those rounding errors. After playing around some time with theproblem I replaced the StringToNumber with the Compile function. TheCompile function did a nice job to convert all my strings (includingexponents) to numbers. The thing got interesting when I dragged anexpression ("2+3") onto the Input-Line and it was also correctlyinterpreted. Wow! inteliCalc is the first calculator supporting both:RPN and AOS. To use this UNDOCUMENTED feature of inteliCalc write theexpression in Notepad and drag it onto an Input-Line of inteliCalc.You can also enter such expressions with the numeric Keyboard, directlyat the first Input-Line, but then it is recommended to put yourexpression into brackets: (2+(3*5))After that press Enter to evaluate it. You can use there all of thebuilt-in functions. Please refer to "The NewtonScript ProgrammingLanguage"-Manual, Chapter 6 for a detailed discussion.Here just a short table of useful functions: exp(x) exponential of x gamma(x) gamma function applied to x [=(x-1)!] log(x) natural logarithm of x log10(x) logarithm base 10 of x pow(x,y) returns x^y Sin, Asin, Sinh, Asinh - trigonometric functions (equivalent Cos and Tan); the calculation is always in RAD-Mode You can use the constant Pi by typing [Option]+p on the keyboard in expressionsNOTE: Some of the functions will only work with the U.S. number format(decimal separator: ".", groupSepStr:",") chosen in the Locale Panel of Preferences.And now something for the absolute Newton freaks:You can even drag whole functions onto Input-Lines like: local x; for i:=1 to 10000 do begin x:=x+1/i: end; return x;(I have this function as a separate Note in the Notepad and changed theformula in the loop (x:=x+1/i) to estimate the limes of recursiveseries. And even 100,000 iterations take just a few seconds - thanks tothe StrongARM.) You think just tiny programs - try this to reference to the stack: local theStore, theStackValue, myCursor, StackStr, arg1, arg2; theStore:=getStores()[0]; theStackValue:=theStore:GetSoup("StackSoup:Fabi"); myCursor:=theStackValue:Query({}); myCursor:ResetToEnd(); StackStr:=myCursor:Entry().StackValue; DefGlobalFn('var1, compile(StackStr)); arg1:=var1(); myCursor:Prev(); StackStr:=myCursor:Entry().StackValue; DefGlobalFn('var1, compile(StackStr)); arg2:=var1(); return arg1+arg2;Nice way to add the first 2 numbers in the stack - but please use thebutton of inteliCalc at the bottom right instead! OK, you can dovirtually anything, but it's of not much use to write functions with more than10 lines, because there is no syntax checking, nor any other response ifthe code doesn't work. So if someone is interested in a programmingenvironment, let me know, perhaps there will be a version 2.0 if thereis some response. As mentioned above, this is an UNDOCUMENTED feature.Make a backup before playing around, and remember that it is absolutelyyours, if you destroy your data because of erroneous code. Disclaimer----------Although I have attempted to ensure the accuracy of results produced bythe included software, I am not responsible for any erroneous results,caused by software defects known or unknown. If however, you do discoveran error, please request support using the contact information givenabove. This package is free but the Copyright remains with Christoph Fabianek.This Package can be freely redistributed to electronic sites as long asit is posted in its entirety, including this README. It can't be sold asa standalone package or as part of commercial package without my writtenpermission. Christoph Fabianek, February 1998