Jump to content
Nokioteca Forum

[freeware] Calc


Dextor
 Share

Recommended Posts

ragazzi... non ho parole...

per coloro che cercavano un programma per cellulare che fosse una vera e propria calcolatrice scientifica, beh, questa è meglio! ;)

Operations

The following operations are available through the menu system. Some of the operations are explained more thoroughly in the notes section.

Basic

* - : Subtract x from y

* * : Multiply x and y

* / : Divide y by x

* +/- : Change sign of x

* repeat : As a shortcut, this menu position repeats the last operation selected from one of the other menus. Some operations (e.g. "clear stack/mem/stat/finance") will not be repeated

Math

* Simple

o 1/x: Calculate the reciprocal of x

o x²: Calculate the square of x

o √x: Calculate the square root of x

o % : Calculate x percent of y. This operation leaves y standing, so you can add or subtract the result directly using + or -. To add 24% to 42, press "42", "ENTER", "24", "%", "+"

o %chg: Calculate percentage of change from y to x, i.e. 100·(x-y)/y

* Power

o ex: Calculate the natural exponential

o ln: Calculate the natural logarithm

o yx: Calculate y to the power of x

o x√y: Calculate the x'th root of y

o 10x: Calculate 10 to the power of x

o log10: Calculate base-10 logarithm of x

o 2x: Calculate 2 to the power of x

o log2: Calculate base-2 logarithm of x

* Probability

o P y,x: Calculate number of permutations (unordered subsets) when x elements is taken from a population of y

o C y,x: Calculate number of combinations (ordered subsets) when x elements is taken from a population of y

o x! : Calculate the factorial of x. For non-integer values, Γ(x+1) is calculated

o Γx : Calculate the gamma function

o erfc: Calculate the complementary error function, 1-erf(x), equal to the integral from x to infinity of 2/√π ·e-t² dt.

o erfc-1: Calculate the inverse erfc function

o phi: Calculate the normal distribution probability density function (equal to erfc(-x/√2)/2).

o phi-1: Calculate the inverse phi function

* Matrix (*)

o new: Create new matrix with y rows and x columns

o concat: Concatenate matrix in y and matrix in x. Plain numbers can be concatenated into row vectors

o stack: Stack matrix in y on top of matrix in x. Plain numbers can be stacked into column vectors

o split: Split matrix in y at row or column specified by x. If x is positive, matrix is split horizontally after x rows. If x is negative, matrix is split vertically after -x columns

o det: Calculate determinant of matrix in x. (This operation is just as slow as calculating the inverse by "1/x")

o Tr: Calculate the trace of matrix in x, i.e. the sum of all the elements along the diagonal

o AT: Transpose matrix in x

o AT: Transpose and conjungate matrix in x

o |A|F: Calculate the Frobenius norm of matrix in x, i.e. the square root of the sum of the squares of all the matrix elements. For row and column vectors this calculates the length of the vector

o size: Pushes the number of rows and columns of the lowest matrix on the stack

o aij: Pops the column (x) and the row (y) off the stack, then pushes the element identified by this row and column, taken from the lowest matrix on the stack

* Miscellaneous

o mod: Calculate y modulo x, i.e. subtract (or add) x from y until the remainder is between 0 and x. Works the same for negative x. Actually, y-x·floor(y/x).

o div: Complementary to mod it calculates how many times x must be subtracted from y to get a remainder between 0 and x. Actually, floor(y/x)

o random: Calculate a random number uniformly distributed in the range [0.0, 1.0)

o factorize: Find greatest prime factor (of integer input less than 2³¹). This factor and the original number divided by the factor is placed on the stack... repeat! If input is not integer, it is rounded. If input is too large, the result will be nan (*). Factorizing large random numbers is fun: Press "31", "2x", "random", "*", "factorize", "factorize", ...

o Integer operations

+ round: Round x to nearest integer

+ ceil: Round x towards positive infinity

+ floor: Round x towards negative infinity

+ trunc: Remove fractional part of x (round towards zero)

+ frac: Remove integer part of x, i.e. calculate x-trunc(x)

Trigonometric

* Normal

o sin: Calculate the sine of x

o cos: Calculate the cosine of x

o tan: Calculate the tangent of x

* Arc

o asin: Calculate the arc sine of x

o acos: Calculate the arc cosine of x

o atan: Calculate the arc tangent of x

* Hyperbolic

o sinh: Calculate the hyperbolic sine of x

o cosh: Calculate the hyperbolic cosine of x

o tanh: Calculate the hyperbolic tangent of x

* Arc hyperbolic

o asinh: Calculate the arc hyperbolic sine of x

o acosh: Calculate the arc hyperbolic cosine of x

o atanh: Calculate the arc hyperbolic tangent of x

* More

o RAD/DEG: Switch between radians and degrees as measure of angles

o →RAD: Convert from degrees to radians

o →DEG: Convert from radians to degrees

o π: Enter the number π

o Rectangular/polar coordinates

+ r→p: Convert rectangular coordinates (x,y) to polar (x=radius, y=angle)

+ p→r: Convert polar coordinates (x=radius, y=angle) to rectangular (x,y)

+ atan2: Calculate the arctangent of y/x, in the range -π to π (or -180 to 180 in DEG mode)

+ hypot: Calculate √x²+y²

+ r→cplx: Convert rectangular coordinates (x=re, y=im) to complex number

o Complex numbers (available instead of coordinate menu if x or y is complex) (*)

+ cplx→r: Convert complex number to rectangular coordinates (x=re, y=im)

+ abs: Calculate absolute value (complex modulus) of complex number

+ arg: Calculate angle (complex argument) of complex number in the range -π to π (or -180 to 180 in DEG mode)

+ conj: Calculate complex conjugate

Bitwise operations (available instead of math/trig in HEX/OCT/BIN mode)

* and: Calculate bitwise AND of x and y

* or: Calculate bitwise OR of x and y

* xor: Calculate bitwise XOR of x and y

* bic: Bit-clear, clear all bits from y that is set in x, i.e. calculate y AND NOT x

* y<<x: Shift up y by integer number of bits in x

* y>>x: Shift down y by integer number of bits in x

* not: Invert all bits in x. Fractional bits are ignored, i.e. the calculated value is x XOR -1

Special

* Stack

o LAST x: Recall value of x before last operation

o undo: Undo previous stack operation. Memory, statistical and financial operations, in addition to clear stack, cannot be undone. In operations involving both stack and one of the other modules, such as x↔mem, only the stack is restored

o x↔y: Exchange x and y elements of the stack

o rolldn: Roll stack down (rolling with as many elements as is currently in the stack)

o rollup: Roll stack up

o RCL st#: Copy any stack location into x

o x↔st#: Exchange x with any stack element (y is element 1)

o clear: Clear the stack

* Memory

o STO: Store x in memory location

o STO+: Add x to memory location. (Useful with memory monitoring for keeping score in a game ;-)

o RCL: Recall memory location

o x↔mem: Exchange x with any memory location

o clear: Clear memory

* Statistical

o Σ+ : Add x and y to statistics

o Σ- : Subtract x and y from statistics

o clear: Clear statistics

o Results

+ average

# x,y: Calculate mean x and mean y values, i.e. Σx/n

# xw: Calculate mean of x values weighted by the y values, i.e. Σxy/Σy

# sx,sy: Calculate sample standard deviation of x and y values, i.e. [Σ(x-x)²/(n-1)]½

# Sx,Sy: Calculate population standard deviation of x and y values, i.e. [Σ(x-x)²/n]½

# draw: Draw data points and plot average

+ Linear regression: y=ax+b

# a,b: Calculate coefficients, x=a, y=b

# y*: Calculate estimated y for current x

# x*: Calculate estimated x for current y

# r: Calculate correlation coefficient

# draw: Draw regression curve along with data points

+ Curve fitting: y=a·lnx+b

# a,b, y*, x*, r: (see linear regression)

+ Curve fitting: y=b·eax

# a,b, y*, x*, r: (see linear regression)

+ Curve fitting: y=b·xa

# a,b, y*, x*, r: (see linear regression)

o Sums

+ n: Recall number of statistics entered

+ Σx: Recall sum of x'es

+ Σx²: Recall sum of squared x'es

+ Σy: Recall sum of y's

+ Σy²: Recall sum of squared y's

+ Σxy: Recall sum of x·y product

+ Σlnx: Recall sum of lnx

+ Σln²x: Recall sum of ln²x

+ Σlny: Recall sum of lny

+ Σln²y: Recall sum of ln²y

+ Σxlny: Recall sum of x·lny

+ Σylnx: Recall sum of y·lnx

+ Σlnxlny: Recall sum of lnx·lny

* Financial (*)

o STO: Store x in financial register (pv, fv, np, pmt, ir%)

o RCL: Recall financial register (pv, fv, np, pmt, ir%)

o solve: Solve one financial value with respect to the others

+ pv: The present value in an account

+ fv: The future value after a certain number of payment periods

+ np: The number of payment periods

+ pmt: The amount of each periodic payment

+ ir%: The interest rate on the account per period (in percent)

o clear: Clear financial registers

o END/BGN: Switch between end of month payments and beginning of month payments

o y%*x: Interest multiply. Convert from nominal x-times-a-year (e.g. monthly) interest rate to effective annual rate

o y%/x: Interest divide. Convert from effective annual interest rate to nominal x-times-a-year rate

* Conversions and constants

o Time and date (*)

+ →H: Convert x, interpreted as date, hours, minutes and seconds (format yyyymmddHH.MMSS) to hours. If year (yyyy) is zero, the format is instead understood as ddddHH.MMSS, where dddd is number of days.

+ →DH.MS: Convert x from hours to date, hours, minutes and seconds. If x ≤ 8784 hours, it is instead converted to the format ddddHH.MMSS, where dddd is the number of days.

+ now: Get current date and time in DH.MS format. Useful to remind yourself how this format is

+ time: Get current time only in DH.MS format

+ date: Get current date only in DH.MS format

+ DH.MS+: Add x and y as date, hours, minutes and seconds

+ DH.MS→unix: Convert from yyyymmddHH.MMSS format to unix time

+ unix→DH.MS: Convert from unix time to yyyymmddHH.MMSS format

+ DH.MS→JD: Convert from yyyymmddHH.MMSS format to Julian Day

+ JD→DH.MS: Convert from Julian Day time to yyyymmddHH.MMSS format

+ DH.MS→MJD: Convert from yyyymmddHH.MMSS format to Modified Julian Day

+ MJD→DH.MS: Convert from Modified Julian Day time to yyyymmddHH.MMSS format

o Metric conversions (*)

+ Length

# in/cm: Enter the length of one inch in centimeters ≡ 2.54

# ft/m: Enter the length of one foot in meters ≡ 0.3048

# yd/m: Enter the length of one yard in meters ≡ 0.9144

# mi/km: Enter the length of one mile in kilometers ≡ 1.609344

# n.m./km: Enter the length of one nautical mile in kilometers ≡ 1.852

+ Weight

# oz/g: Enter the weight of one U.S. ounce in grams ≡ 28.349523125

# lb/kg: Enter the weight of one U.S. pound in kilos ≡ 0.45359237

# ton/kg: Enter the weight of one U.S. short ton in kilos ≡ 907.18474

# gr/mg: Enter the weight of one U.S. grain in milligrams ≡ 64.79891

+ Volume

# cup/l: Enter the volume of one U.S. cup in liters ≡ 0.2365882365

# gal/l: Enter the volume of one U.S. gallon in liters ≡ 3.785411784

# pt/l: Enter the volume of one U.S. pint in liters ≡ 0.473176473

# fl.oz/ml: Enter the volume of one U.S. fluid ounce in milliliters ≡ 29.5735295625

+ Energy

# cal/J: Enter the energy of one international calorie in Joules ≈ 4.1868

# Btu/J: Enter the energy of one British thermal unit in Joules ≈ 1055.06

# hp/W: Enter the value of one horsepower in Watts ≈ 745.7

+ Temperature

# °C→°F: Convert from degrees Celsius to degrees Fahrenheit, i.e. calculate x*1.8+32. This operation and the next are different from the others in the "metric conversions" module because they work as a function changing the x value instead of just entering a value on the stack.

# °F→°C: Convert from degrees Fahrenheit to degrees Celsius, i.e. calculate (x-32)/1.8

# °K-°C: Enter the difference between degrees Kelvin and degrees Celsius ≡ 273.15

o Scientific constants

+ Universal

# c: Enter the speed of light in a vacuum ≡ 299792458 m/s

# h: Enter the Planck constant ≈ 6.6260693·10-34 J s

# µ0: Enter the permeability of a vacuum, ≡ 1.256637061435917...·10-6 N/A²

# ε0: Enter the permittivity of a vacuum ≡ 8.854187817620390...·10-12 F/m

+ Chemical

# NA: Enter the Avogadro constant ≈ 6.0221415·1023 mol-1

# R: Enter the molar gas constant ≈ 8.314472 J/mol K

# k: Enter the Boltzmann constant ≈ 1.3806505·10-23 J/K

# F: Enter the Faraday constant ≈ 96485.3383 C/mol

+ Physical and electromagnetic

# α: Enter the fine-structure constant ≈ 0.007297352568

# R∞: Enter the Rydberg constant ≈ 10973731.568525 m-1

# a0: Enter the Bohr radius ≈ 5.291772108·10-11 m

# µB: Enter the Bohr magneton ≈ 9.27400949·10-24 J/T

+ Atomic

# e: Enter the elementary charge ≈ 1.60217653·10-19 C

# me: Enter the mass of an electron ≈ 9.1093826·10-31 kg

# mp: Enter the mass of a proton ≈ 1.67262171·10-27 kg

# mn: Enter the mass of a neutron ≈ 1.67492728·10-27 kg

# mu: Enter the unified atomic mass unit ≈ 1.66053886·10-27 kg

+ Astronomical

# G: Enter the Newtonian constant of gravitation ≈ 6.6742·10-11 N m²/kg²

# gn: Enter the standard acceleration of gravity ≡ 9.80665 m/s²

# A.U.: Enter the length of one astronomical unit ≡ 149597870691 m

# l.y.: Enter the length of one light year ≡ 9460730472580800 m

# pc: Enter the length of one parsec ≡ 3.085677581305729...·1016 m

o guess: Guess and display the formula for the number in x. The calculated guess is pushed on the stack. This function can guess formulas of the following types: a/b, √a/b, (a/;)(1/3), aπ/b, aπ²/b, a/(bπ), a/(bπ²), e(a/B), 2(a/B), ln(a/:D and log2(a/:P, where a and b are integers less than 2³¹. The probability estimate is only correct given that no other type of formula fits even better, such as (a±√:(/c.

Mode

* Number

o normal: Set normal number mode, shows all digits but removes trailing zeros

o FIX: Set fixed-decimal number mode, shows a fixed number of digits after the decimal point

o SCI: Set scientific number mode, shows a fixed number of digits after the decimal point in scientific format

o ENG: Set engineering number mode, shows a fixed number of digits after the decimal point in engineering format, i.e. exponent is a multiple of 3

o Separators

+ point

# . : Display the decimal point as a period

# , : Display the decimal point as a comma

# keep: Keep the decimal point even if no fraction is shown

# remove: Remove the decimal point if no fraction is shown

+ thousand

# . or , : Display thousands separator as period or comma (depending on decimal point)

# space: Display thousands separator as space

# ' : Display thousands separator as '

# none: Display no thousands separator

* Programming (*)

o new: Start entering a new program

o append: Append commands to an existing program

o run: Run a program

o clear: Clear a program

o draw y=f(x): Draw program function y=f(x). Prior to using this operation, you should enter xmin, xmax, ymin and ymax on the stack, in that order. See note on graph drawing.

o draw r=f(θ): As above, but this time the program calculates a polar graph r=f(θ), where the input is the angle and the output is the radius. Input will be in range [0,20π], i.e. 10 "rounds".

o draw z=f(t): As above, but this time the program calculates a parametric curve z=f(t), where the input t is in the range [0,1] and the output is a point in the (complex) plane

o draw z=f(z): As above, but this time the program calculates a complex number zo=f(zi), where the input zi is a complex point in the plane delimited by xmin, xmax, ymin and ymax. For each point in the plane, the result is drawn so that the intensity varies according to the absolute of zo modulo 1, and the color varies according to the the angle (complex argument) of zo.

o integrate: Integrate program function f(x). Prior to using this operation, you should enter the integration limits a and b, and the desired accuracy on the stack, in that order. a and b may be complex

o diff.: Differentiate program function f(x). Prior to using this operation, enter the x you want to differentiate for, which may also be complex

o solve: Solve program function f(x), i.e. find a root where f(x)=0. Prior to using this operation, enter two limits x1 and x2 on the stack, so that f(x1)·f(x2)<0

o min/max: Find local minima or maxima in program function f(x). Prior to using this operation, enter two limits x1 and x2 on the stack, so that at the mid-point between x1 and x2, the function f((x1+x2)/2) is either greater or less than both f(x1) and f(x2).

* Programming 2 (available while entering a new program)

o finish: Finish entering current program

o reset: Reset the current program (purge and start from beginning)

o Conditionals for programming

+ x=y?: Enter 1 on stack if x exactly equals y, otherwise 0

+ x!=y?: Enter 1 on stack if x does not equal y, otherwise 0

+ x<y?: Enter 1 on stack if x is less than y, otherwise 0

+ x<=y?: Enter 1 on stack if x is less than or equal to y, otherwise 0

+ x>y?: Enter 1 on stack if x is greater than y, otherwise 0

o Utility operations for programming

+ abs: Calculate absolute value of x

+ max: Select maximum value of x and y

+ min: Select minimum value of x and y

+ select: Select y or z based on x, i.e. calculate x·y+(1-x)·z. With this you can e.g. simulate "max" by pressing "x>y?", "select". When selection criterion x exactly equals 1 or 0, y or z is copied directly instead of calculating it. This enables selecting away inf's and nan's. If x contains a square matrix, X·Y+(I-X)·Z is calculated.

+ sgn: Keep only the sign of x as ±1. With this you can e.g. simulate "abs" by pressing "ENTER", "sgn", "*". Also ±0 becomes ±1

o Indirect memory operations for programming

+ RCL[x]: Recall memory location indirectly, using x as index (must be between 0 and 15).

+ STO[x]: Store y in memory location indirectly, using x as index.

+ STO+[x]: Add y to memory location indirectly, using x as index.

* Base (*)

o DEC: Set decimal (base-10) number mode

o HEX: Set hexadecimal (base-16) number mode

o BIN: Set binary (base-2) number mode

o OCT: Set octal (base-8) number mode

* Monitoring (*)

o mem: Monitor first n memory locations in upper part of the display

o stat: Monitor first n statistical registers

o finance: Monitor financial registers

o matrix: Monitor n rows from the lowest matrix on the stack

o off: Turn monitoring off (equivalent to set a monitor to display n=0 lines).

When in program recording mode, this command is replaced by:

o prog: Activate the program editing monitor (monitor n consecutive lines of the program)

* System menu

o Fonts (this menu is available if you have a color screen, otherwise system font is used)

+ small: Set small font

+ medium: Set medium font

+ large: Set large font

+ xlarge: Set extra large font

+ system: Set system font (should be mono-spaced, but this is not the case on T610)

o exit: Exit the application. The the stack, memory, statistics, finance and programs will be saved until next time

o reset: Reset the application and exit. All setup information, all values saved in the stack, memory, statistics, finance and all programs will be erased. You will be asked for a confirmation. Use this operation if you have gone through the setup dialogs and picked the wrong settings

Notes

Abnormal results

The calculator implements infinities and nan following the IEEE754 logic. It is impossible to enter abnormal numbers through the keyboard, but they are easily obtained by calculation. If an operation produces a result larger than the largest representable number, an infinity value is generated, and "inf" or "-inf" is displayed. If an operation produces a result smaller than the smallest representable number, zero is generated. To be able to use this result properly in further calculations, the number "-0" may also be produced. If an operation is undefined, a nan value is produced and "nan" is displayed (not-a-number).

Abnormal numbers are often fine to use in further calculations. In most cases where the final result would be meaningful, abnormal numbers accomplish this. For instance, atan(inf)=pi/2, 1/inf=0, etc. In most cases where the final result is not meaningful, a nan will be produced. Additionally, nan is used to indicate "bad input parameters" or "failure to obtain a valid result" from an algorithm implemented in the calculator, e.g. factorizing.

Examples of operations with abnormal numbers are:

1/0 = inf

1+inf = inf

1*inf = inf

0/0 = nan

0*inf = nan

inf/inf = nan

inf-inf = nan

1/inf = 0

-1*0 = -0

Any operation involving nan produces nan, except nan to the power of 0:

nan^0 = 1

Complex arithmetic

The calculator creates complex numbers automatically when you try to use the "√x" operation on a negative number, or when another operation requires a complex result. Alternatively, a complex number can be created from x and y using the "r→cplx" operation.

Most operations that logically extends to complex arguments have been implemented for complex numbers, i.e. all basic operations, all simple operations except "%chg", all power operations and all trigonometric operations. For convenience, integer operations (rounding and truncation) work on the real and imaginary part of the complex number separately.

All stack and memory operations handle complex numbers transparently. Financial and statistical modules cannot store complex numbers, so with these modules only the real part of the numbers are stored/used. Any operations that are undefined for complex numbers or that have not been implemented yet, returns nan when used with complex input(s).

If either x or y contains a complex number, any operation in the "coord" sub-menu is undefined (the sub-menu dealing with rectangular/polar coordinates). In this case the "coord" sub-menu is exchanged with a sub-menu called "cplx" for dealing with complex numbers.

Complex operations work strictly in radians, so when the input is complex (i.e. it has a non-zero imaginary part), operations involving the angle of the complex number (i.e. most trigonometric and power functions) will automatically cause a switch from degrees (DEG) to radians (RAD).

Complex numbers are displayed on one line as e.g. 2+3i. Since two numbers are displayed simultaneously, the display may not be wide enough to display both numbers if you are using a large font and the numbers have large exponents. Instead "*****" will be displayed. Don't worry, the number is still there, but you have to switch to a smaller font or perform a "cplx→r" operation on the complex number to view it.

Matrix arithmetic

The calculator creates matrices using the "matrix/new" operation or when you stack or concat two normal numbers.

Most operations that logically extends to matrix arguments have been implemented for matrices, i.e. all basic operations, "1/x" and "x²", and yx for integer x.

All stack and memory operations handle matrices transparently. Financial and statistical modules cannot store matrices, so with these modules a matrix is treated as nan. Any operations that are undefined for matrices or that have not been implemented yet, returns nan when used with matrix input(s).

Matrices are displayed on one line as e.g. M:[3x4]. This indicates a matrix of 3 rows and 4 columns. A 1x1 matrix is automatically converted to a normal number.

There are two methods for filling a matrix with numbers. In the first method, you enter the two first numbers of the matrix and then either "matrix/concat" or "matrix/stack" the two numbers into a row or column vector. Continue concating or stacking more numbers until your first vector is complete. Then do the next vectors. Finally, you either stack together your row vectors or you concat together your column vectors until the matrix is complete. If you use the "repeat" operation on the basic menu this method requires the fewest button clicks.

Alternatively, you can create an empty matrix by "matrix/new", and then press "mode/monitor/matrix" to edit the matrix (see (*)). When monitoring is active you can go into the monitor area by pressing the middle button from the "basic" menu. If you enter a number on the stack before you go into the matrix, you can press the middle button again to move this number from the stack into the highlighted matrix element. This brings you out of matrix editing again and you can enter a new number. Repeat this (number, up-middle-middle) until the matrix is complete. This method requires a few more button clicks, but it is more visual.

Matrix limitations: There are a few limits to the size of the matrices that can be used in the calculator. You cannot create matrices with "new" with more than 65536 rows or columns. Even if you manage to create an even larger matrix than this by concatenating or stacking such matrices, the matrix would not be saved when the calculator exited. Due to a limitation when storing programs, matrix element editing (through the matrix monitor) of elements beyond column 64 or row 128 will not be stored in a program.

Apart from these limitations in the program itself, it is the limitations of the host (i.e. you phone) that may be the most severe. When creating especially large matrices you may experience "Out of memory error". If you get this, is advised to exit the program to avoid further errors which may be caused by this. There may also be a limit to how much matrix data the calculator can save when you exit. If the calculator was unable to save all the matrices, some of your matrices will be replaced by nan when you start up again.

Matrices are stored by reference, so copying a matrix many times on the stack or in memory does not consume memory, it only copies the reference. However, changing a matrix will create a new matrix, even for such a simple operation as "+/-". Since the old matrix is still backed up in "LAST x" you are temporarily using twice as much memory as with just the one matrix.

Financial calculation

Remember to use negative values for owed balances and money paid to the account, positive values for balances in your favor and money withdrawn from the account. Also enter the interest rate per period, not per year. If you are making monthly payments and have an annual interest rate, divide the annual rate by 12 (*). Thus, one period of an 8% annual rate is 8/12=0.6666%.

[* This business of dividing an interest rate by 12 is not mathematically correct, but since the banks use this procedure it is wise to do it also, otherwise your numbers will not agree with those of the bank. To calculate the nominal monthly interest rate from an effective annual interest rate, use the "y%/x" operation, which actually calculates 100·(x√1+y/100 - 1).]

If you solve repeatedly and successively for each of the financial registers, the values may start to drift away from the original values because of inaccuracies during the calculations.

Date calculation

The calendar implemented by the DH.MS operations is strictly Gregorian, which did not take effect until 1582 in Catholic states and not until 1752 in Britain and her colonies (including the United States). Dates before these years will be extrapolations of the Gregorian calendar and will not match the Julian calendar of the time.

When converted to hours, a date is represented by the number of hours since the imaginary date January 1st year 0 (in the extrapolated Gregorian calendar). Negative dates are not interpreted as years BC, but are instead represented as a negative amount of time equal in magnitude to the date interpreted as a positive number. In this way, you can subtract dates by entering a negative date and using "DH.MS+". However, it is impossible to extrapolate the Gregorian calendar to years BC.

When converting from date-time format (yyyymmddHH.MMSS) to hours, several checks are performed. If year (yyyy) is zero (i.e. input is less than 1000000), the date-time format is instead interpreted as the days-time format ddddHH.MMSS, where dddd is the number of days. When you convert from hours back to date-time format, it is enough that the number of hours is greater than 8784 (i.e. 24 hours times 366, number of days in year 0) for the converter to switch back to yyyymmddHH.MMSS format. This means that for dddd between 366 and 9999, converting from ddddHH.MMSS to hours and back again will not yield the original input.

Beware that you must specify the year with all four digits. If you specify a year with two digits only, you will be calculating dates in a Gregorian calendar extrapolated to the years AD 1-99 (*). As an intermediate result such dates are fine (e.g. a time interval, resulting from a DH.MS+ operation with one negative operand), but the result should be converted to hours or added to a proper date before it is meaningful. If an intermediate result like this represents a time interval less than one year, it will be converted to the form "ddddHH.MMSS", where "dddd" is the number of days. Do not worry, this form will interpreted unambiguously in further calculations with DH.MS+.

[* leap years in this period matches leap years in the period 1900-1999, so you may get away with it. On the other hand, the year 100 (in the extrapolated Gregorian calendar) was not a leap year while the year 2000 was.]

If year is nonzero, and month (mm) is zero, the month will be interpreted as 1 (January). If day (dd) is zero, it is interpreted as 1 (the 1st of the month). If seconds (SS) is greater than 59, the number is interpreted as that many seconds into the next minute. If minutes (MM) is greater than 59, the number is interpreted as that many minutes into the next hour. If hours (HH) is greater than 23, the number is interpreted as that many hours into the next day. If day (dd) is greater than the number of days in a month, the number is interpreted as that many days into the next month (or the months after). If month is greater than 12, the number is interpreted as that many months into the next year(s) (unspecified how many days there are in each of those months). E.g. the number 2003000000 is understood as January 1st, 2003, at 00:00.00. The number 1403.5901 is understood as 14 days, 3 hours, 59 minutes and 1 second. Unfortunately, the number 1.9999 is understood as 1 hour, 99 minutes and 99 seconds, actually 2.6775 hours, considerably more than 2 hours (if that was intended).

Because a date-time value is represented with many digits, inexact intermediate representation may cause inaccuracies to escalate. To alleviate this, some magic rounding has been implemented so that e.g. 99 minutes and 99.999 seconds is instead interpreted as 1 hour, 0 minutes and 0.000 seconds. This will catch a majority of the problems that may occur.

The calendar conversions routines were taken from http://www.fourmilab.ch/documents/calendar/

Relation to Unix time

Unix time measures seconds since midnight (00:00 UTC) on January 1st, 1970. Many operating systems and languages (including Java) use this time scale, although many use a local time zone instead of UTC. Use "DH.MS→unix" and "unix→DH.MS" to convert dates to/from this time scale.

Relation to Julian Days

Astronomers often use Julian Day or Modified Julian Day as a practical format for doing arithmetic with dates. The Julian Day is the number of days elapsed since noon on Monday, January 1st 4713 BC (in the Julian calendar). Use "DH.MS→JD" and "JD→DH.MS" to convert dates to/from this time scale.

The Modified Julian Day is the number of days elapsed since midnight (00:00 UTC) on November 17, 1858. Use "DH.MS→MJD" and "MJD→DH.MS" to convert dates to/from this time scale.

Beware that this calculator has no notion of time zones, it takes whatever value the Java environment returns (through System.currentTimeMillis()). If you are in a different time zone than UTC, you may have to add or subtract some hours to get a perfect unix, JD or MJD time value.

Constants

The constants were found at http://physics.nist.gov/cuu/Constants and the metric conversions at http://www.free-definition.com. Constants given using "≡" are as accurate as the internal precision of Calc. Constants given using "≈" are not precisely known by science, but are as up-to-date as the CODATA internationally recommended values of 2002.

Monitor editing mode

When monitoring is active, the usual repeat operation in the "basic" menu is exchanged with the symbol [→]. Selecting this operation lets you enter the monitor area in the upper part of the screen, where one monitor element will be highlighted. You can then move about in the monitor area using the arrow keys. The normal commands, "ENTER" and "+" will be replaced with "STO" and "RCL".

Pressing "STO" in this mode will copy x into the current monitor element. Pressing "RCL" in this mode extracts the current monitor element and pushes it on the stack. Pressing the middle joystick button pops one element off the stack, stores it in the current monitor element, and exits the editing mode so you can enter or calculate the next number. All these operations also have the side effect of advancing to the next monitor element below (or in the next column if you are at the bottom). Pressing "clear" will exit the editing mode.

Programming

(Programming is found on the "mode" menu because it was added last and I couldn't find a spot for it anywhere else. Despite this, not all operations reached from this menu are "mode-like".)

The programming mode in Calc is basically a keyboard/command logging facility with playback. In programming mode (i.e. after executing "prog/new" or "prog/append"), all activity is stored in the current program, but the calculator looks and behaves exactly as before except a "PRG" indicator to the upper right. There is no limit to the size of a program, but beware, do not leave Calc in programming mode (look for the "PRG" indicator), because Calc will eventually run out of memory, giving the "Out of memory error".

Using the "undo" operation does not remove any statements from the program, it only adds the "undo" operation to the program as well. So use the program editing mode described below to remove an operation. Advice: If your program is complex, plan the steps beforehand on a piece of paper.

Programs can be viewed or edited using the program editing monitor command: "monitor/prog":

The program editing monitor can be used to view or edit programs. Note that the program editing monitor can only be accessed in the programming mode and as usual the number of lines to display have to be chosen. As the other monitor modes, it has a display mode and an editing mode (accessed by the [→] command). In the display mode, the active line is marked by an ">" after the line number. In the display mode, all commands recorded will be inserted at this marked position. After activating the editing mode, the inseration mark is at the end of the program, so all new instructions will be appended to the program. When the editing mode is entered, the mark can be moved using the joystick (up/down, left=page up, right=page down). In the editing mode, the softkeys have the following meanings: DEL removes the marked current instruction and SST executes the marked current instruction and advances the mark. Note that the availability of commands you want to insert depends on the current state of the calculator, e.g. if you want to use complex number operations, there has to be a complex number on the stack at x. As usual the instructions recorded at the insert position are executed immediately, not necessarily in the order of the finished program. So if you want to insert an instruction and review an example calculation in parallel, it could be a good idea to run the program from the beginning using the SST up to the point where you want to extend your program -- then the calculator would be in the same state as when running the program offering all appropriate commands in the main menu. As all monitor modes, the monitor mode can be activated by setting it to display 0 lines. However, when the program editing is finished using the "prog/finish" command, the program monitor is deactivated and it is reactivated with the same number of lines next time the "new" or "append" commands are issued, even if a different monitor mode was active.

The programming mode offers no control flow (if-statements) or looping (repeat-statements). However, some conditional, utility and indirect memory operations have been added. These operations are not needed in normal, interactive mode since you can easily do them "manually", but in programming mode they can help accomplish complicated programs. For instance, programming Collatz Problem; {If x is even, the next number in the sequence is x/2, otherwise it is 3x+1}. This program needs an if-statement, but you can get around this by calculating both values and selecting afterwards: "STO 0", "2", "/", "RCL 0", "3", "*", "1", "+", "RCL 0", "2", "mod", "select".

A program is called a function if it uses the x on the stack as input, and produces a new number on the stack as output. The value left in the x register when the program finishes is used as the function value f(x). During graph drawing, integration, differentiation, solving, minimizing or maximizing, a program is called repeatedly with different x values placed on the stack. If the program does not clutter the stack (i.e. it does not leave more values on the stack than the result), the input parameters will remain on the stack when the operation is finished.

When drawing graphs, you must first enter the ranges along the x axis and y axis that you want to see during drawing. When drawing functions as y=f(x), if a program returns a complex value, the graph will split into two lines of different color. This is a neat way to display two (non-complex) graphs at once, placing both graph values in x and y and using "r→cplx". See note on graph drawing.

When integrating, you must enter the range over which you want to integrate, and the accuracy you desire from the result. When the operation is finished, the result is placed on the stack. If the program returns inf or nan values during the operation, the result will be nan. If the algorithm fails to produce the desired accuracy, the unfinished result is placed on the stack and a message is shown. The algorithm may handle integration through a singularity, but in this case the algorithm works better if the singularity is at x=0 and the first integration limit is also 0. The accuracy of the result will most often be of the same magnitude as the input accuracy, but depending on the difficulty of the function to be integrated, it may be much better or worse than this.

When differentiating, you must enter the x for which you want to differentiate. When the operation is finished, the result is placed on the stack. If the program returns inf or nan values during the operation, the result will be nan. The accuracy of the result is at most 13 digits.

When solving, you must enter two limits that "straddle" the solution, i.e. two x values for which the corresponding function values have opposite sign. When the operation is finished, the result is placed on the stack. If the program returns complex, inf or nan values during the operation, the result will be nan. The accuracy of the result is in most cases a full 19 digits, but this depends largely on the accuracy of the operations used in the program.

When minimizing or maximizing, you must enter two limits in such a way that the calculator can decide if it should do minimization or maximization. To decide, it inspects the function value midway between the limits. If this value is greater than the function value at both limits, the operation will be maximization. If the value is less than at both limits, the operation will be minimization. If the value lies in-between, the criterion is undecided and the result will be nan. When the operation is finished, the result placed on the stack. If the program returns complex, inf or nan values during the operation, the result will be nan. The accuracy of the result is much worse than for solving because of the flatness of a curve at a minima/maxima, in most cases only about 10 digits.

Caveat: Since the calculator can represent very small numbers (i.e. 2.383e-323228497), solving or min/max-ing trivial cases when the answer is exactly zero can take forever, since the result always approaches zero but never gets there. Examples are "solve" on the "sgn" function, and "min/max" on the "abs" function.

Graph drawing, integration, differentiation, solving, min/max-ing and calling other programs recursively cannot be programmed, as well as commands on the "System menu".

Here are some programming examples.

Graph drawing

While drawing a graph, as explained in the previous note, Calc will continue calculating new graph points and improving the graph indefinitely, until "Break", "clear", or "#" is pressed. Do not leave the program in this state, it will eat your battery.

To save battery, you can stop program drawing using the "*" key when you are satisfied with the look of the graph. If some parts of the axes are obscured by the graph, the axes can be refreshed using the "0" key. If drawing is stopped, another hit on the "0" key draws the numbers along the axes as well.

When drawing is stopped, the graph can be zoomed using direction keys (or the corresponding number keys). Zoom in using the middle button or "5". Zoom out using "1". To restart drawing, press "*" again. Zooming can also be used when drawing statistics. After the zoom function has been used, the values xmin, xmax, ymin and ymax on the stack are changed accordingly.

Binary representation

In binary modes (HEX, OCT and BIN), fractional numbers are not displayed as integers, but are instead displayed with the fraction visible in exactly the same manner as decimal numbers, depending on the number format (normal, FIX, SCI and ENG). If a number is displayed with an exponent, the exponent itself is still displayed in decimal form.

Negative numbers are displayed as a generalized form of "twos complement", with the following interpretation: Negating the number inverts all bits, including an infinite number of 1-bits before the radix point and an infinite number of 1-bits after the radix point. The infinite number of 1-bits before the radix is represented by an "f" prefix (or 7 or 1 in OCT and BIN modes). The infinite number of 1-bits after the radix is rounded upwards producing an infinite number of 0-bits, until the first 0-bit is encountered which will be switched to a 1 (rounded or not, these two forms are mathematically equivalent). For example, the number "1", inverted, will become (in binary mode) ...1111110.111111.... Rounding of the infinite number of 1's after the radix gives the number ...1111111.000000..., which is exactly the way we usually see "-1" as two's complement.

Bitwise operations with negative numbers (and, or, xor and bic) use the generalized "twos complement" representation of the number when interpreting the bits. However, beware that normal rounding that occurs when the display cannot display all the significant digits of a number may cause inexact values to appear different in the display than their internal representation.

(superfluo, ma compatibile con i s60!!! b) )

SITO DEL PRODUTTORE:

http://midp-calc.sourceforge.net/Calc.html

beh, che ne dite?

;)

Modificato da Dextor
Link to comment
Condividi su altri siti

guarda, io ho fatto una ricerca, ma non ho trovato niente in merito, e non mi ricordo niente di così vagamente completo di funzioni!!

Dextor, non ti ricordi questa discussione?

https://www.nokioteca.net/home/forum/index....ndpost&p=301445

che si parlava di questa?

https://www.nokioteca.net/home/forum/index....st=0&p=296915

Modificato da Oper
Link to comment
Condividi su altri siti

Dextor, non ti ricordi questa discussione?

https://www.nokioteca.net/home/forum/index....ndpost&p=301445

questa proprio non l'ho vista nemmeno facendo una ricerca... :blink:

questa me la ricordo, ma io non intendevo questa calc, ne conoscevo un'altra prima di questa! b)

scusate...

chiedo vinia, rimozione topic da parte dei moderatori b)

Link to comment
Condividi su altri siti

questa proprio non l'ho vista nemmeno facendo una ricerca... :blink:

questa me la ricordo, ma io non intendevo questa calc, ne conoscevo un'altra prima di questa! b)

scusate...

chiedo vinia, rimozione topic da parte dei moderatori b)

Dextor, niente di personale, è che se i topic abbondano su uno stesso argomento, non si capisce più niente nelle ricerche.

Ciao.

Link to comment
Condividi su altri siti

Please sign in to comment

You will be able to leave a comment after signing in



Accedi Ora
 Share

×
×
  • Crea Nuovo...

Informazione Importante

Questo sito utilizza i cookie per analisi, contenuti personalizzati e pubblicità. Continuando la navigazione, accetti l'utilizzo dei cookie da parte nostra | Privacy Policy