# Accuracy

+ +

+TTCalc uses binary floating point numbers. It means that your input values are first +converted to a binary representation and then the calculations are performed. After +calculating the result is again converted from the binary to the decimal (you can +select the input and output format on the display tab). You must remember that not +all values can be converted from binary to decimal (and vice versa) without loosing +accuracy. For example decimal '5' can be converted to binary '101' and the '101' is +exactly equal decimal 5. But decimal '0.3' has not a good binary representation, it +is '0.010011001100110011.....'. And when you put decimal '0.3' the calculations are +performed on an approximate value and the result is only an approximation too. +

+ +

+For example try to calculate: 0.204 - 0.34*0.80 + 0.068, you would expect that the +result would be: 0 but TTCalc gives you: 3.15544362088404722164691426e-30 which is +a good approximation to the real zero (look at e-30 part which means 10^(-30)). +

+ + + diff --git a/help/arithmetic_functions.html b/help/arithmetic_functions.html index 78bd8dc..d0b2b8a 100644 --- a/help/arithmetic_functions.html +++ b/help/arithmetic_functions.html @@ -6,51 +6,7 @@ TTCalc - arithmetic functions @@ -60,149 +16,98 @@

Note: If a function takes more than one argument, the arguments are separated with semicolon ';'.

-
-
ln(x)
-
This function calculates the natural logarithm of x,
e.g. ln(123)=4.812...
+

## Logarithm and Exponential

-
log(x; base)
-
This function calculates the logarithm of x with a base equal 'base'
log(123; 4)=3.471...
+ -
exp(x)
-
This function calculates the exponent of x
exp(20)=e^20=485165195.409...
-
sin(x)
-
This function returns the sine of x.
For example sin(0.8)=0.717...
The argument x is in radians, if you want to calculate -with degrees use the degtorad(x) function first e.g. sin(degtorad(30))=0.5 calculates the sine of 30 degrees.
+

## Trigonometric functions

-
cos(x)
-
Cosine of x
cos(1.3)=0.267...
The argument x is in radians.
+

Note: On the display tab you can select between degrees, radians and gradians. This affects the input value.

-
tan(x) or tg(x)
-
Tangent of x
tan(3.6)=0.493...
The argument x is in radians.
+ -
cot(x) or ctg(x)
-
Cotangent of x
cot(2.3)=-0.893...
The argument x is in radians.
-
asin(x)
-
Inverse sine (arc sine) of x
e.g. asin(0.7)=0.775...
The result is in radians. If you want the result to be in degrees use -radtodeg function e.g. radtodeg(asin(0,5))=30
+

## Inverse trigonometric functions

-
acos(x)
-
Inverse cosine (arc cosine) of x
acos(0.9)=0.451...
The result is in radians.
+

Note: On the display tab you can select between degrees, radians and gradians. This affects the output (result) value.

-
atan(x) or atg(x)
-
Inverse tangent (arc tangent) of x
atan(3.3)=1.276...
The result is in radians.
+ -
acot(x) or actg(x)
-
Inverse cotangent (arc cotangent) of x
acot(10)=0.099...
The result is in radians.
-
sinh(x)
-
This function returns hyperbolic sine of x
sinh(12)=81377.395...
+

## Hyperbolic functions

-
cosh(x)
-
Hyperbolic cosine of x
cosh(8.5)=2457.384...
+ -
tanh(x) or tgh(x)
-
Hyperbolic tangent of x
tanh(0.67)=0.584...
-
coth(x) or ctgh(x)
-
Hyperbolic cotangent of x
coth(1.67)=1.073...
+

## Inverse hyperbolic functions

-
asinh(x)
-
This function returns inverse hyperbolic sine of x
asinh(3.6)=1.992...
+ -
acosh(x)
-
This function returns inverse hyperbolic cosine of x
acosh(2.23)=1.440...
-
atanh(x) or atgh(x)
-
This function returns inverse hyperbolic tangent of x
atanh(0.67)=0.810...
+

## Conversions between radians, degrees and gradians

-
acoth(x) or actgh(x)
-
This function returns inverse hyperbolic cotangent of x
acoth(1.23)=1.135...
+ -
DegToDeg(deg; min; sec)
-
This function converts degrees from the long format with degres, minutes and seconds into only degrees.
-For example degtodeg(12; 30; 0)=12.5
-
-
This function converts degrees into radians
+

## Rounding functions

-
-
This function converts degrees in the long format (degrees, minutes, seconds) to radians.
For example -degtorad(12; 30; 0)=0.218166...
+ -
-
This function converts radians into degrees
-
sqrt(x)
-
Sqrt returns the square root of x
sqrt(9)=3
+

## Other functions

-
root(x ; n)
-
The nth root of a 'x', 'n' must be integer and not negative, if 'n' is zero the result is one, -if 'x' is zero the result is zero and we assume that the root(0;0) is not defined, e.g.
-root(8;3)=2
-root(-8;3)=-2 -
- -
factorial(x)
-
The factorial function
factorial(6)=1*2*3*4*5*6=720
- -
abs(x)
-
The absolute value of x
abs(-10)=10
- -
sgn(x)
-
This function returns the sign of x that means when the x is positive the result is 1, when the x is negative -the result is -1 and when the x is zero the result is zero too
-sgn(-10)=-1
-sgn(0)=0
-sgn(5)=1
- -
mod(x,y)
-
Mod returns the remainder from the division x by y
mod(10; 2.2)=1.2 because 10=2.2*4 + 1.2
- -
int(x)
-
This method returns only the integer part of x.
int(2.7)=2
- -
round(x)
-
This method rounds the value of x to the nearest integer
-round(2.8)=3
-round(2.2)=2
-round(2)=2
-round(-4.8)=-5
-round(-4.1)=-4
- -
ceil(x)
-
This function returns a value representing the smallest integer that is greater than or equal to x
-ceil(2.8)=3
-ceil(2.2)=3
-ceil(2)=2
-ceil(-4.8)=-4
-ceil(-4.1)=-4
- -
floor(x)
-
This function returns a value representing the largest integer that is less than or equal to x
-floor(2.8)=2
-floor(2.2)=2
-floor(2)=2
-floor(-4.8)=-5
-floor(-4.1)=-5
- -
max(x1; x2; ...)
-
This functions takes any number of arguments. It returns the max value of them. If there aren't arguments -the function returns the max value which can be held in this precision.
- -
min(x1; x2; ...)
-
This functions takes any number of arguments. It returns the min value of them. If there aren't arguments -the function returns the min value which can be held in this precision.
- -
sum(x1; x2; ...)
-
This functions takes one or more arguments. It returns the sum of them.
- -
avg(x1; x2; ...)
-
This functions takes one or more arguments. It returns the arithmetic mean. (The sum divided by -the number of arguments)
- -
+ diff --git a/help/conversions_deg_rad_grad.html b/help/conversions_deg_rad_grad.html new file mode 100644 index 0000000..eb62630 --- /dev/null +++ b/help/conversions_deg_rad_grad.html @@ -0,0 +1,64 @@ + + + + + + TTCalc - Conversions between radians, degrees and gradians + + + + + + +

# Arithmetic functions

+ +

Note: If a function takes more than one argument, the arguments are separated with semicolon ';'.

+ + +

## Conversions between radians, degrees and gradians

+ +
+ +
degtodeg(deg; min; sec)
+
This function converts degrees from the long format with degrees, minutes and seconds to degrees.
+For example: degtodeg(12; 30; 0)=12.5
+ +
+
This function converts degrees in the long format (degrees, minutes, seconds) to radians.
+ +
+
This function converts degrees in the long format (degrees, minutes, seconds) to gradians
+ +
+
This function converts degrees to radians
+ +
+
This function converts degrees to gradians
+ + +
+
This function converts radians to degrees
+ +
+
+ +
+
+ +
+
This function converts gradians to degrees
+ +
+ + + + diff --git a/help/help.hhp b/help/help.hhp index a1876cf..7572476 100644 --- a/help/help.hhp +++ b/help/help.hhp @@ -13,12 +13,21 @@ Title=TTCalc [FILES] values_and_std_operators.html arithmetic_functions.html +bitwise_functions.html +conversions_deg_rad_grad.html +hyperbolic_functions.html +index.html +inverse_hyperbolic_functions.html +inverse_trigonometric_functions.html +logarithm_exponential.html logical_functions.html operators_priority.html -userfunctions.html -index.html +other_functions.html +rounding_functions.html tips.html -bitwise_functions.html +trigonometric_functions.html +userfunctions.html +accuracy.html [INFOTYPES] diff --git a/help/hyperbolic_functions.html b/help/hyperbolic_functions.html new file mode 100644 index 0000000..6658f00 --- /dev/null +++ b/help/hyperbolic_functions.html @@ -0,0 +1,46 @@ + + + + + + TTCalc - Hyperbolic functions + + + + + + +

# Arithmetic functions

+ +

Note: If a function takes more than one argument, the arguments are separated with semicolon ';'.

+ + +

## Hyperbolic functions

+ +
+ +
sinh(x)
+
This function returns hyperbolic sine of x
sinh(12)=81377.395...
+ +
cosh(x)
+
Hyperbolic cosine of x
cosh(8.5)=2457.384...
+ +
tanh(x) or tgh(x)
+
Hyperbolic tangent of x
tanh(0.67)=0.584...
+ +
coth(x) or ctgh(x)
+
Hyperbolic cotangent of x
coth(1.67)=1.073...
+ +
+ + + + + diff --git a/help/index.html b/help/index.html index db87aa0..06aa579 100644 --- a/help/index.html +++ b/help/index.html @@ -10,6 +10,7 @@ + @@ -20,26 +21,31 @@

# TTCalc

-TTCalc is a mathematical calculator. It has a nice user interface, formulas for -calculating can be inserted by using a keyboard or a mouse. The result is automatically -shown in a second window without using any additional keys such as 'equal'. The -program possess trigonometric functions, inverse trigonometric functions, hyperbolic -functions, logical operators, logarithms, functions for converting between degrees and -radians and so on. Additionally the program allows the user to define his own -variables and functions. Calculations are performed by using floating point numbers -with three kind of precision, the biggest has 288 bits for its mantissa and 96 bits -for its exponent that is about 2.551...e+11925026709067095507636213441 with 85 valid -decimal digits. The program independently allows to insert and display values with -the base (radix) from two to sixteen. +TTCalc is an open source mathematical calculator. It features arithmetical +functions, trigonometric functions, inverse trigonometric functions, +hyperbolic functions, inverse hyperbolic functions, logical operators, +logarithms, functions for converting between degrees and radians and +so on. Additionally the program allows a user to define his own +variables and functions.

+

+The program possesses an easy to use interface. Calculations are performed +by using binary floating point numbers with three kinds of precision, +the biggest has 864 bits for its mantissa and 128 bits for its exponent +that is about 6.70897699... * 10^51217599719369681875006054625051616609 +with 258 valid decimal digits. TTCalc independently allows to insert and +display values with the base (radix) from two to sixteen. +

+ + - - - + + +
 Author: Tomasz Sowa Contact: t.sowa@slimaczek.pl Licence: BSD (open source) Operating systems: Microsoft Windows 9x/Me/NT/2000/XP (Vista was not tested) Interface: English, Polish Project page: http://sourceforge.net/projects/ttcalc Interface: English, Polish, Spanish Project page: http://ttcalc.sourceforge.net/ Operating systems: Microsoft Windows 9x/Me/NT/2000/XP/Vista
diff --git a/help/inverse_hyperbolic_functions.html b/help/inverse_hyperbolic_functions.html new file mode 100644 index 0000000..feaf316 --- /dev/null +++ b/help/inverse_hyperbolic_functions.html @@ -0,0 +1,47 @@ + + + + + + TTCalc - Inverse hyperbolic functions + + + + + + +

# Arithmetic functions

+ +

Note: If a function takes more than one argument, the arguments are separated with semicolon ';'.

+ + + +

## Inverse hyperbolic functions

+ +
+ +
asinh(x)
+
This function returns inverse hyperbolic sine of x
asinh(3.6)=1.992...
+ +
acosh(x)
+
This function returns inverse hyperbolic cosine of x
acosh(2.23)=1.440...
+ +
atanh(x) or atgh(x)
+
This function returns inverse hyperbolic tangent of x
atanh(0.67)=0.810...
+ +
acoth(x) or actgh(x)
+
This function returns inverse hyperbolic cotangent of x
acoth(1.23)=1.135...
+ +
+ + + + + diff --git a/help/inverse_trigonometric_functions.html b/help/inverse_trigonometric_functions.html new file mode 100644 index 0000000..0d29d0e --- /dev/null +++ b/help/inverse_trigonometric_functions.html @@ -0,0 +1,49 @@ + + + + + + TTCalc - Inverse trigonometric functions + + + + + + +

# Arithmetic functions

+ +

Note: If a function takes more than one argument, the arguments are separated with semicolon ';'.

+ + +

## Inverse trigonometric functions

+ +

Note: On the display tab you can select between degrees, radians and gradians. In these samples we assume that the 'rad' option is selected. +This affects the output (result) value.

+ +
+ +
asin(x)
+
Inverse sine (arc sine) of x
e.g. asin(0.7)=0.775...
+ +
acos(x)
+
Inverse cosine (arc cosine) of x
acos(0.9)=0.451...
+ +
atan(x) or atg(x)
+
Inverse tangent (arc tangent) of x
atan(3.3)=1.276...
+ +
acot(x) or actg(x)
+
Inverse cotangent (arc cotangent) of x
acot(10)=0.099...
+ +
+ + + + + diff --git a/help/logarithm_exponential.html b/help/logarithm_exponential.html new file mode 100644 index 0000000..93ce3ee --- /dev/null +++ b/help/logarithm_exponential.html @@ -0,0 +1,39 @@ + + + + + + TTCalc - Logarithm and Exponential + + + + + + +

# Arithmetic functions

+ +

Note: If a function takes more than one argument, the arguments are separated with semicolon ';'.

+ +

## Logarithm and Exponential

+ +
+
ln(x)
+
This function calculates the natural logarithm of x,
e.g. ln(123)=4.812...
+ +
log(x; base)
+
This function calculates the logarithm of x with a base equal 'base'
+It's using the formula: log(x; base) = ln(x) / ln(base)
+log(123; 4)=3.471...
+ +
exp(x)
+
This function calculates the exponential function of x
exp(20)=e^20=485165195.409...
+ +
+ + + + diff --git a/help/operators_priority.html b/help/operators_priority.html index f074353..041dc0c 100644 --- a/help/operators_priority.html +++ b/help/operators_priority.html @@ -16,15 +16,15 @@

Below is a list of operators priority. At the top are operators with higher precedence.

- +
- + diff --git a/help/other_functions.html b/help/other_functions.html new file mode 100644 index 0000000..9872ccd --- /dev/null +++ b/help/other_functions.html @@ -0,0 +1,87 @@ + + + + + + TTCalc - Other functions + + + + + + +

# Arithmetic functions

+ +

Note: If a function takes more than one argument, the arguments are separated with semicolon ';'.

+ + +

## Other functions

+ +
+ +
sqrt(x)
+
Sqrt returns the square root of x
sqrt(9)=3
+ +
root(x ; n)
+
The nth root of a 'x', 'n' must be integer and not negative, if 'n' is zero the result is one, +if 'x' is zero the result is zero and we assume that the root(0;0) is not defined, e.g.
+root(8;3)=2
+root(-8;3)=-2 +
+ +
factorial(x)
+
The factorial function
factorial(6)=1*2*3*4*5*6=720
+ +
abs(x)
+
The absolute value of x
abs(-10)=10
+ +
sgn(x)
+
This function returns the sign of x that means when the x is positive the result is 1, when the x is negative +the result is -1 and when the x is zero the result is zero too
+sgn(-10)=-1
+sgn(0)=0
+sgn(5)=1
+ +
mod(x,y)
+
Mod returns the remainder from the division x by y
mod(10; 2.2)=1.2 because 10=2.2*4 + 1.2
+ + +
max(x1; x2; ...)
+
This functions takes any number of arguments. It returns the max value of them. If there aren't arguments +the function returns the max value which can be held in this precision.
+max(2;5;8;3)=8
+max()=6.97846825730330952352039893e+646457021 (assuming the small precision is selected)
+ +
min(x1; x2; ...)
+
This functions takes any number of arguments. It returns the min value of them. If there aren't arguments +the function returns the min value which can be held in this precision.
+min(45;-23;18;19)=-23
+min()=-6.97846825730330952352039893e+646457021 (assuming the small precision is selected) +
+ +
sum(x1; x2; ...)
+
This functions takes one or more arguments. It returns the sum of them.
+sum(4;2;9;3)=18 +
+ +
avg(x1; x2; ...)
+
This functions takes one or more arguments. It returns the arithmetic mean. (The sum divided by +the number of arguments)
+avg(4;2;9;3)=4.5 +
+ +
+ + + diff --git a/help/rounding_functions.html b/help/rounding_functions.html new file mode 100644 index 0000000..3cdeb42 --- /dev/null +++ b/help/rounding_functions.html @@ -0,0 +1,67 @@ + + + + + + TTCalc - Rounding functions + + + + + + +

# Arithmetic functions

+ +

Note: If a function takes more than one argument, the arguments are separated with semicolon ';'.

+ + +

## Rounding functions

+ +
+ +
int(x)
+
This method returns only the integer part of x.
+int(2.8)=2
+int(2.2)=2
+int(2)=2
+int(-4.1)=-4
+int(-4.8)=-4
+
+ +
round(x)
+
This method rounds the value of x to the nearest integer
+round(2.8)=3
+round(2.2)=2
+round(2)=2
+round(-4.1)=-4
+round(-4.8)=-5
+ +
ceil(x)
+
This function returns a value representing the smallest integer that is greater than or equal to x
+ceil(2.8)=3
+ceil(2.2)=3
+ceil(2)=2
+ceil(-4.1)=-4
+ceil(-4.8)=-4
+ +
floor(x)
+
This function returns a value representing the largest integer that is less than or equal to x
+floor(2.8)=2
+floor(2.2)=2
+floor(2)=2
+floor(-4.1)=-5
+floor(-4.8)=-5
+ +
+ + + + + + + diff --git a/help/styles.css b/help/styles.css index 93a6dd1..a0fffa2 100644 --- a/help/styles.css +++ b/help/styles.css @@ -7,23 +7,33 @@ padding: 0; html, body { font-size: 14px; -font-family: Tahoma, Arial, Sans-serif; +font-family: Verdana, Tahoma, Arial, Sans-serif; } body { -margin: 0 0 20px 20px; +margin: 0 20px 20px 20px; } h1 { font-size: 2em; -font-family: Arial, Tahoma, Sans-serif; +font-family: Arial, Tahoma, Verdana, Sans-serif; margin: 1.4em 0 1em 0; } +h2 { +font-size: 1.5em; +font-family: Arial, Tahoma, Verdana, Sans-serif; +margin: 2em 0 1em 0; +} + p { margin: 1em 0 1em 0; } +dl { +margin: 3em 0 3em 0; +} + dt { font-size: 1.4em; margin-top: 1em; @@ -42,7 +52,27 @@ td { padding: 0 2em 0 0; } +table.operatorspriority { +border: 1px solid black; +border-collapse: collapse; +} +table.operatorspriority td { +border: 1px solid black; +padding: 0.5em 0.5em 0.5em 0.5em; +} + +ul { +list-style-type: none; +} +ul.tips { +list-style-type: disc; +margin-left: 3em; +} + +ul.tips li { +padding: 1em 0 1em 0; +} diff --git a/help/tips.html b/help/tips.html index e82efc0..5088ffb 100644 --- a/help/tips.html +++ b/help/tips.html @@ -20,33 +20,36 @@

# Tips

-

-If you want to clear the input edit or if you want to put something in and the focus is -somewhere on the tabs just type ESC, the entire edit will be selected and have a focus. -

+
+
• +If you want to clear the input edit or if you want to put something in and the focus is not on the first edit — just type ESC, +the entire edit will be selected and have a focus. +
• -

+

• If you want to insert a value with a base (radix) 2 or 16 use the unary operator & (for the base 2) or # (for the base 16). For example &10=2 (decimal), #10=16 (decimal). When you're using these operators then 'input' mode on the 'display' tab is ignored. -

+
• -

+

• You can calculate more than one formula at the same time. To achive this use a semicolon in the global space, for example type '2+4 ; 5*10' and the result will be '6   50'. -

+
• -

+

• You can use CTRL+C to copy the result from the output edit into the clipboard (if a control which has a focus is not an edit control, or if it is an edit but has no selection) -

+
• -

+

• Also you can use CTRL+V to paste a text from the clipboard into the input control -(if a focus is not on another edit control) -

+(if a control which has a focus is not an edit control) +
• + +
diff --git a/help/toc.hhc b/help/toc.hhc index d930afb..41f0bda 100644 --- a/help/toc.hhc +++ b/help/toc.hhc @@ -21,6 +21,40 @@ +
+
• +
• +
• +
• +
• +
• +
• +
• +
• +
• @@ -24,27 +27,37 @@

# Numbers

-You can type numbers directly using a keyboard or insert them by a mouse. This is a simple edit window, -you can use arrow keys etc. and copy&paste a text by using standard shortcuts such as CTRL+C and CTRL+V. -As the decimal point can be either a comma or a dot that means 1,234 is the same as 1.234. +

+You can type numbers directly using your keyboard or insert them by a mouse. This is a simple edit window, +you can use arrow keys etc. and copy&paste text by using standard shortcuts such as CTRL+C and CTRL+V. +Decimal point can be either a comma or a dot that means 1,234 is the same as 1.234. +

# Standard operators

^
-
Powering
+
Powering, e.g.: 2^3=8
*
-
Multiplication
+
Multiplication, e.g.: 2*3=6
/
-
Division
+
Division, e.g.: 2/3 = 0.6666...
+
-
+
+Unary plus, e.g.: +2
-
-
Subtraction
+
Subtraction, e.g.: 2-3=-1
+Unary minus, e.g.: -2
+ +
#
+
Operator for changing the base (radix) to 16 (hex), e.g.: #ff=255
+ +
&
+
Operator for changing the base (radix) to 2 (bin), e.g.: -&110=-6