updated: help

git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@118 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2009-04-02 10:26:55 +00:00
parent 6555140b9a
commit e960c2adea
25 changed files with 1045 additions and 538 deletions

228
CHANGELOG
View File

@ -1,114 +1,114 @@
Version 0.8.3 prerelease
* fixed: calculating the size of the main window
now it looks good on MS Vista and when a user changes size of some
widgets such as a border, font size, etc.
* changed: variables and functions are case-sensitive now, e.g.
'x' is not the same as 'X'
* changed: precision:
small - the same as previous
medium - 288 bits for the mantissa, 64 bits for the exponent
big - 864 bits for the mantissa, 128 bits for the exponent
previous were:
medium - 192 bits for the mantissa, 64 bits for the exponent
big - 288 bits for the mantissa, 96 bits for the exponent
* added: when a user presses CTRL+C then the result will be
copied into the clipboard (if the current control which
has a focus is not an edit control, or if it is an edit
but has no selection)
* added: when a user presses CTRL+V then the text from the clipboard
will be copied into the edit control
(the focus can be anywhere but it cannot be on another edit control)
* added: 'decimal point' option on the display tab
* added: variables and functions can have underline characters
in their names
* added: from TTMath 0.8.3: a short form of multiplication
(without the '*' character) e.g. '5y'
(it's used only if the second parameter is a variable
or function)
* added: 'remove trailing zeroes' option on 'display' tab
* added: new language: spanish
translation made by Alejandro S. Valdezate
alesanval at gmail dot com
* added: spanish language to the setup (installer)
* added: the setup will remove mingwm10.dll if it exists in the program
directory
* added: on display tab: we can select 'deg' 'rad' or 'grad' for calculating
in such functions: sin,cos,tan,cot,asin,acos,atan,acot
* removed: 'cut off last non valid digits' on 'rounding' option
on 'display' tab
Version 0.8.2 portable (2007.07.01):
* added: the portable version of the program TTCalc
it uses *.ini config file from the same folder where
is the executable file, and it's much smaller in size
(in the portable version there's only one kind
of precision and the program is packed with UPX -
the Ultimate Packer for eXecutables)
there are no other differences between version 0.8.1 and this one
Version 0.8.1 (2007.04.17):
* changed: on win9x the configuration file is in a folder like:
"c:\windows\data application\ttcalc\" now
* changed: the program uses the TTMath 0.8.1 now
* added: from TTMath 0.8.1:
root(x, index), bitand(x,y), bitor(x,y), bitxor(x,y)
/band(x,y), bor(x,y), bxor(x,y)/
asinh(x), acosh(x), atanh(x), acoth(x) /atgh(x), actgh(x)/
* changed: from TTMath 0.8.1: calculations are much faster now
especially the factorial() function
* changed: from TTMath 0.8.1: the way of parsing operators
Version 0.8.0 (2007.04.02):
* added: the del key deletes a variable or a function now
(if the focus is on the list)
* added: a user can change the names of variables or functions now
* changed: the program uses TTMath 0.8.0 now
* added: functions: from TTMath 0.8.0:
DegToDeg(deg, min, sec), DegToRad(deg), DegToRad(deg, min, sec),
RadToDeg(rad), Ceil(x), Floor(x), Sqrt(x), Sinh(x), Cosh(x),
Tanh(x) /Tgh(x)/, Coth(x) /Ctgh(x)/
* added: help
* changed: from TTMath 0.8.0:
renamed: CTan() into Cot() or Ctg()
renamed: ACTan() into ACot() or ACtg()
Factorial() has a history log now (it can remember last
10 calculated values)
* fixed: the vertical size of the main window when a user uses a different
size of the window caption (especially under the Windows XP Luna)
* fixed: on Windows 9x: the program hung when a user clicks on a control
on the first tab
* fixed: when a user started navigating from the keyboard the program showed
a wrong variable or a funtion in the edit dialog
Version 0.7.3 (2007.03.08):
* added: the program shows some kind of errors itself
* added: checking whether an user has inserted a correct value of a variable
or a function
* fixed: navigation from the keyboard
* changed: the esc key selects the entire input text now (in the input edit)
* added: a test when the program is being starded which checks if the
coordinates of the main window actually pointing at the valid area (for
example when someone took his configuration file into a new computer and
the new computer has a smaller screen)
Version 0.7.2 (2007.02.28):
* added: buttons Sgn and Mod
* changed: the button 'err' is active when there's actually an error now
* added: buttons: ASin, ACos, ATan, ACTan
* fixed: the program didn't save the current language into the configuration file
* fixed: the second thread didn't read the main window correctly and it caused
small problems when an user was typing into the first edit control
Version 0.7.1 (2007.02.08):
* added: button 'err' (error) on the first tab
* changed: the input edit can have 2048 characters now
* added: remembering the vertical size into the config file
* fixed: a problem with the 'tab' key
* added: a message 'Calculating...' when an user clicks on the 'err' button
during calculating something
Version 0.8.3 prerelease
* fixed: calculating the size of the main window
now it looks good on MS Vista and when a user changes size of some
widgets such as a border, font size, etc.
* changed: variables and functions are case-sensitive now, e.g.
'x' is not the same as 'X'
* changed: precision:
small - the same as previous
medium - 288 bits for the mantissa, 64 bits for the exponent
big - 864 bits for the mantissa, 128 bits for the exponent
previous were:
medium - 192 bits for the mantissa, 64 bits for the exponent
big - 288 bits for the mantissa, 96 bits for the exponent
* added: when a user presses CTRL+C then the result will be
copied into the clipboard (if the current control which
has a focus is not an edit control, or if it is an edit
but has no selection)
* added: when a user presses CTRL+V then the text from the clipboard
will be copied into the edit control
(the focus can be anywhere but it cannot be on another edit control)
* added: 'decimal point' option on the display tab
* added: variables and functions can have underline characters
in their names
* added: from TTMath 0.8.3: a short form of multiplication
(without the '*' character) e.g. '5y'
(it's used only if the second parameter is a variable
or function)
* added: 'remove trailing zeroes' option on 'display' tab
* added: new language: spanish
translation made by Alejandro S. Valdezate
alesanval at gmail dot com
* added: spanish language to the setup (installer)
* added: the setup will remove mingwm10.dll if it exists in the program
directory
* added: on display tab: we can select 'deg' 'rad' or 'grad' for calculating
in such functions: sin,cos,tan,cot,asin,acos,atan,acot
* removed: 'cut off last non valid digits' on 'rounding' option
on 'display' tab
Version 0.8.2 portable (2007.07.01):
* added: the portable version of the program TTCalc
it uses *.ini config file from the same folder where
is the executable file, and it's much smaller in size
(in the portable version there's only one kind
of precision and the program is packed with UPX -
the Ultimate Packer for eXecutables)
there are no other differences between version 0.8.1 and this one
Version 0.8.1 (2007.04.17):
* changed: on win9x the configuration file is in a folder like:
"c:\windows\data application\ttcalc\" now
* changed: the program uses the TTMath 0.8.1 now
* added: from TTMath 0.8.1:
root(x, index), bitand(x,y), bitor(x,y), bitxor(x,y)
/band(x,y), bor(x,y), bxor(x,y)/
asinh(x), acosh(x), atanh(x), acoth(x) /atgh(x), actgh(x)/
* changed: from TTMath 0.8.1: calculations are much faster now
especially the factorial() function
* changed: from TTMath 0.8.1: the way of parsing operators
Version 0.8.0 (2007.04.02):
* added: the del key deletes a variable or a function now
(if the focus is on the list)
* added: a user can change the names of variables or functions now
* changed: the program uses TTMath 0.8.0 now
* added: functions: from TTMath 0.8.0:
DegToDeg(deg, min, sec), DegToRad(deg), DegToRad(deg, min, sec),
RadToDeg(rad), Ceil(x), Floor(x), Sqrt(x), Sinh(x), Cosh(x),
Tanh(x) /Tgh(x)/, Coth(x) /Ctgh(x)/
* added: help
* changed: from TTMath 0.8.0:
renamed: CTan() into Cot() or Ctg()
renamed: ACTan() into ACot() or ACtg()
Factorial() has a history log now (it can remember last
10 calculated values)
* fixed: the vertical size of the main window when a user uses a different
size of the window caption (especially under the Windows XP Luna)
* fixed: on Windows 9x: the program hung when a user clicks on a control
on the first tab
* fixed: when a user started navigating from the keyboard the program showed
a wrong variable or a funtion in the edit dialog
Version 0.7.3 (2007.03.08):
* added: the program shows some kind of errors itself
* added: checking whether an user has inserted a correct value of a variable
or a function
* fixed: navigation from the keyboard
* changed: the esc key selects the entire input text now (in the input edit)
* added: a test when the program is being starded which checks if the
coordinates of the main window actually pointing at the valid area (for
example when someone took his configuration file into a new computer and
the new computer has a smaller screen)
Version 0.7.2 (2007.02.28):
* added: buttons Sgn and Mod
* changed: the button 'err' is active when there's actually an error now
* added: buttons: ASin, ACos, ATan, ACTan
* fixed: the program didn't save the current language into the configuration file
* fixed: the second thread didn't read the main window correctly and it caused
small problems when an user was typing into the first edit control
Version 0.7.1 (2007.02.08):
* added: button 'err' (error) on the first tab
* changed: the input edit can have 2048 characters now
* added: remembering the vertical size into the config file
* fixed: a problem with the 'tab' key
* added: a message 'Calculating...' when an user clicks on the 'err' button
during calculating something

View File

@ -1,28 +1,28 @@
Copyright (c) 2006-2009, Tomasz Sowa
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name Tomasz Sowa nor the names of contributors to this
project may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
Copyright (c) 2006-2009, Tomasz Sowa
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name Tomasz Sowa nor the names of contributors to this
project may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.

41
README
View File

@ -1,19 +1,22 @@
TTCalc
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 possess an easy to use interface. Calculations are performed
by using floating point numbers with three kind of precision, the biggest
has 864 bits for its mantissa and 128 bits for its exponent that is about
6.7....e+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 <t.sowa AnTispam slimaczek.pl>
Project page: http://ttcalc.sourceforge.net/
Licence: BSD (open source)
TTCalc
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)
Interface: English, Polish, Spanish
Project page: http://ttcalc.sourceforge.net/
Operating systems: Microsoft Windows 9x/Me/NT/2000/XP/Vista

36
help/accuracy.html Normal file
View File

@ -0,0 +1,36 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>TTCalc - accuracy</title>
<link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="accuracy">
</object>
</head>
<body>
<h1>Accuracy</h1>
<p>
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.
</p>
<p>
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)).
</p>
</body>
</html>

View File

@ -6,51 +6,7 @@
<title>TTCalc - arithmetic functions</title>
<link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="ln">
<param name="Keyword" value="log">
<param name="Keyword" value="exp">
<param name="Keyword" value="sin">
<param name="Keyword" value="cos">
<param name="Keyword" value="tan">
<param name="Keyword" value="tg">
<param name="Keyword" value="cot">
<param name="Keyword" value="ctg">
<param name="Keyword" value="asin">
<param name="Keyword" value="acos">
<param name="Keyword" value="atan">
<param name="Keyword" value="atg">
<param name="Keyword" value="acot">
<param name="Keyword" value="actg">
<param name="Keyword" value="sinh">
<param name="Keyword" value="cosh">
<param name="Keyword" value="tanh">
<param name="Keyword" value="tgh">
<param name="Keyword" value="coth">
<param name="Keyword" value="ctgh">
<param name="Keyword" value="asinh">
<param name="Keyword" value="acosh">
<param name="Keyword" value="atanh">
<param name="Keyword" value="atgh">
<param name="Keyword" value="acoth">
<param name="Keyword" value="actgh">
<param name="Keyword" value="degtodeg">
<param name="Keyword" value="degtorad">
<param name="Keyword" value="radtodeg">
<param name="Keyword" value="sqrt">
<param name="Keyword" value="root">
<param name="Keyword" value="factorial">
<param name="Keyword" value="abs">
<param name="Keyword" value="sgn">
<param name="Keyword" value="mod">
<param name="Keyword" value="int">
<param name="Keyword" value="round">
<param name="Keyword" value="ceil">
<param name="Keyword" value="floar">
<param name="Keyword" value="max">
<param name="Keyword" value="min">
<param name="Keyword" value="builtin functions">
<param name="Keyword" value="sum">
<param name="Keyword" value="avg">
</object>
</head>
@ -60,149 +16,98 @@
<p><strong>Note:</strong> If a function takes more than one argument, the arguments are separated with semicolon ';'.</p>
<dl>
<dt>ln(x)</dt>
<dd>This function calculates the natural logarithm of x,<br>e.g. ln(123)=4.812...</dd>
<h2>Logarithm and Exponential</h2>
<dt>log(x; base)</dt>
<dd>This function calculates the logarithm of x with a base equal 'base'<br>log(123; 4)=3.471...</dd>
<ul>
<li><a href="logarithm_exponential.html">ln(x)</a></li>
<li><a href="logarithm_exponential.html">log(x; base)</a></li>
<li><a href="logarithm_exponential.html">exp(x)</a></li>
</ul>
<dt>exp(x)</dt>
<dd>This function calculates the exponent of x<br>exp(20)=e^20=485165195.409...</dd>
<dt>sin(x)</dt>
<dd>This function returns the sine of x.<br>For example sin(0.8)=0.717...<br>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.</dd>
<h2>Trigonometric functions</h2>
<dt>cos(x)</dt>
<dd>Cosine of x<br>cos(1.3)=0.267...<br>The argument x is in radians.</dd>
<p><strong>Note:</strong> On the display tab you can select between degrees, radians and gradians. This affects the input value.</p>
<dt>tan(x) or tg(x)</dt>
<dd>Tangent of x<br>tan(3.6)=0.493...<br>The argument x is in radians.</dd>
<ul>
<li><a href="trigonometric_functions.html">sin(x)</a></li>
<li><a href="trigonometric_functions.html">cos(x)</a></li>
<li><a href="trigonometric_functions.html">tan(x) or tg(x)</a></li>
<li><a href="trigonometric_functions.html">cot(x) or ctg(x)</a></li>
</ul>
<dt>cot(x) or ctg(x)</dt>
<dd>Cotangent of x<br>cot(2.3)=-0.893...<br>The argument x is in radians.</dd>
<dt>asin(x)</dt>
<dd>Inverse sine (arc sine) of x<br>e.g. asin(0.7)=0.775...<br>The result is in radians. If you want the result to be in degrees use
radtodeg function e.g. radtodeg(asin(0,5))=30</dd>
<h2>Inverse trigonometric functions</h2>
<dt>acos(x)</dt>
<dd>Inverse cosine (arc cosine) of x<br>acos(0.9)=0.451...<br>The result is in radians.</dd>
<p><strong>Note:</strong> On the display tab you can select between degrees, radians and gradians. This affects the output (result) value.</p>
<dt>atan(x) or atg(x)</dt>
<dd>Inverse tangent (arc tangent) of x<br>atan(3.3)=1.276...<br>The result is in radians.</dd>
<ul>
<li><a href="inverse_trigonometric_functions.html">asin(x)</a></li>
<li><a href="inverse_trigonometric_functions.html">acos(x)</a></li>
<li><a href="inverse_trigonometric_functions.html">atan(x) or atg(x)</a></li>
<li><a href="inverse_trigonometric_functions.html">acot(x) or actg(x)</a></li>
</ul>
<dt>acot(x) or actg(x)</dt>
<dd>Inverse cotangent (arc cotangent) of x<br>acot(10)=0.099...<br>The result is in radians.</dd>
<dt>sinh(x)</dt>
<dd>This function returns hyperbolic sine of x<br>sinh(12)=81377.395...</dd>
<h2>Hyperbolic functions</h2>
<dt>cosh(x)</dt>
<dd>Hyperbolic cosine of x<br>cosh(8.5)=2457.384...</dd>
<ul>
<li><a href="hyperbolic_functions.html">sinh(x)</a></li>
<li><a href="hyperbolic_functions.html">cosh(x)</a></li>
<li><a href="hyperbolic_functions.html">tanh(x) or tgh(x)</a></li>
<li><a href="hyperbolic_functions.html">coth(x) or ctgh(x)</a></li>
</ul>
<dt>tanh(x) or tgh(x)</dt>
<dd>Hyperbolic tangent of x<br>tanh(0.67)=0.584...</dd>
<dt>coth(x) or ctgh(x)</dt>
<dd>Hyperbolic cotangent of x<br>coth(1.67)=1.073...</dd>
<h2>Inverse hyperbolic functions</h2>
<dt>asinh(x)</dt>
<dd>This function returns inverse hyperbolic sine of x<br>asinh(3.6)=1.992...</dd>
<ul>
<li><a href="inverse_hyperbolic_functions.html">asinh(x)</a></li>
<li><a href="inverse_hyperbolic_functions.html">acosh(x)</a></li>
<li><a href="inverse_hyperbolic_functions.html">atanh(x) or atgh(x)</a></li>
<li><a href="inverse_hyperbolic_functions.html">acoth(x) or actgh(x)</a></li>
</ul>
<dt>acosh(x)</dt>
<dd>This function returns inverse hyperbolic cosine of x<br>acosh(2.23)=1.440...</dd>
<dt>atanh(x) or atgh(x)</dt>
<dd>This function returns inverse hyperbolic tangent of x<br>atanh(0.67)=0.810...</dd>
<h2>Conversions between radians, degrees and gradians</h2>
<dt>acoth(x) or actgh(x)</dt>
<dd>This function returns inverse hyperbolic cotangent of x<br>acoth(1.23)=1.135...</dd>
<ul>
<li><a href="conversions_deg_rad_grad.html">degtodeg(deg; min; sec)</a></li>
<li><a href="conversions_deg_rad_grad.html">degtorad(deg; min; sec)</a></li>
<li><a href="conversions_deg_rad_grad.html">degtograd(deg; min; sec)</a></li>
<li><a href="conversions_deg_rad_grad.html">degtorad(deg)</a></li>
<li><a href="conversions_deg_rad_grad.html">degtograd(deg)</a></li>
<li><a href="conversions_deg_rad_grad.html">radtodeg(rad)</a></li>
<li><a href="conversions_deg_rad_grad.html">radtograd(rad)</a></li>
<li><a href="conversions_deg_rad_grad.html">gradtorad(grad)</a></li>
<li><a href="conversions_deg_rad_grad.html">gradtodeg(grad)</a></li>
</ul>
<dt>DegToDeg(deg; min; sec)</dt>
<dd>This function converts degrees from the long format with degres, minutes and seconds into only degrees.<br>
For example degtodeg(12; 30; 0)=12.5</dd>
<dt>DegToRad(deg)</dt>
<dd>This function converts degrees into radians<br>degtorad(12.5)=0.218166...</dd>
<h2>Rounding functions</h2>
<dt>DegToRad(deg; min; sec)</dt>
<dd>This function converts degrees in the long format (degrees, minutes, seconds) to radians.<br>For example
degtorad(12; 30; 0)=0.218166...</dd>
<ul>
<li><a href="rounding_functions.html">int(x)</a></li>
<li><a href="rounding_functions.html">round(x)</a></li>
<li><a href="rounding_functions.html">ceil(x)</a></li>
<li><a href="rounding_functions.html">floor(x)</a></li>
</ul>
<dt>RadToDeg(rad)</dt>
<dd>This function converts radians into degrees<br>radtodeg(pi)=180</dd>
<dt>sqrt(x)</dt>
<dd>Sqrt returns the square root of x<br>sqrt(9)=3</dd>
<h2>Other functions</h2>
<dt>root(x ; n)</dt>
<dd>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.<br>
root(8;3)=2<br>
root(-8;3)=-2
</dd>
<dt>factorial(x)</dt>
<dd>The factorial function<br>factorial(6)=1*2*3*4*5*6=720</dd>
<dt>abs(x)</dt>
<dd>The absolute value of x<br>abs(-10)=10</dd>
<dt>sgn(x)</dt>
<dd>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<br>
sgn(-10)=-1<br>
sgn(0)=0<br>
sgn(5)=1</dd>
<dt>mod(x,y)</dt>
<dd>Mod returns the remainder from the division x by y<br>mod(10; 2.2)=1.2 because 10=2.2*4 + 1.2</dd>
<dt>int(x)</dt>
<dd>This method returns only the integer part of x.<br>int(2.7)=2</dd>
<dt>round(x)</dt>
<dd>This method rounds the value of x to the nearest integer<br>
round(2.8)=3<br>
round(2.2)=2<br>
round(2)=2<br>
round(-4.8)=-5<br>
round(-4.1)=-4</dd>
<dt>ceil(x)</dt>
<dd>This function returns a value representing the smallest integer that is greater than or equal to x<br>
ceil(2.8)=3<br>
ceil(2.2)=3<br>
ceil(2)=2<br>
ceil(-4.8)=-4<br>
ceil(-4.1)=-4</dd>
<dt>floor(x)</dt>
<dd>This function returns a value representing the largest integer that is less than or equal to x<br>
floor(2.8)=2<br>
floor(2.2)=2<br>
floor(2)=2<br>
floor(-4.8)=-5<br>
floor(-4.1)=-5</dd>
<dt>max(x1; x2; ...)</dt>
<dd>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.</dd>
<dt>min(x1; x2; ...)</dt>
<dd>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.</dd>
<dt>sum(x1; x2; ...)</dt>
<dd>This functions takes one or more arguments. It returns the sum of them.</dd>
<dt>avg(x1; x2; ...)</dt>
<dd>This functions takes one or more arguments. It returns the arithmetic mean. (The sum divided by
the number of arguments)</dd>
</dl>
<ul>
<li><a href="other_functions.html">sqrt(x)</a></li>
<li><a href="other_functions.html">root(x ; n)</a></li>
<li><a href="other_functions.html">factorial(x)</a></li>
<li><a href="other_functions.html">abs(x)</a></li>
<li><a href="other_functions.html">sgn(x)</a></li>
<li><a href="other_functions.html">mod(x,y)</a></li>
<li><a href="other_functions.html">max(x1; x2; ...)</a></li>
<li><a href="other_functions.html">min(x1; x2; ...)</a></li>
<li><a href="other_functions.html">sum(x1; x2; ...)</a></li>
<li><a href="other_functions.html">avg(x1; x2; ...)</a></li>
</ul>
</body>
</html>

View File

@ -0,0 +1,64 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>TTCalc - Conversions between radians, degrees and gradians</title>
<link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="degtodeg">
<param name="Keyword" value="degtorad">
<param name="Keyword" value="degtograd">
<param name="Keyword" value="radtodeg">
<param name="Keyword" value="radtograd">
<param name="Keyword" value="gradtorad">
<param name="Keyword" value="gradtodeg">
</object>
</head>
<body>
<h1>Arithmetic functions</h1>
<p><strong>Note:</strong> If a function takes more than one argument, the arguments are separated with semicolon ';'.</p>
<h2>Conversions between radians, degrees and gradians</h2>
<dl>
<dt>degtodeg(deg; min; sec)</dt>
<dd>This function converts degrees from the long format with degrees, minutes and seconds to degrees.<br>
For example: degtodeg(12; 30; 0)=12.5</dd>
<dt>degtorad(deg; min; sec)</dt>
<dd>This function converts degrees in the long format (degrees, minutes, seconds) to radians.<br>
degtorad(12; 30; 0)=0.218166...</dd>
<dt>degtograd(deg; min; sec)</dt>
<dd>This function converts degrees in the long format (degrees, minutes, seconds) to gradians<br>degtograd(12; 30; 0)=13.888...</dd>
<dt>degtorad(deg)</dt>
<dd>This function converts degrees to radians<br>degtorad(12.5)=0.218166...</dd>
<dt>degtograd(deg)</dt>
<dd>This function converts degrees to gradians<br>degtograd(12.5)=13.8888...</dd>
<dt>radtodeg(rad)</dt>
<dd>This function converts radians to degrees<br>radtodeg(pi)=180</dd>
<dt>radtograd(rad)</dt>
<dd>This function converts radians to gradians<br>radtograd(pi)=200</dd>
<dt>gradtorad(grad)</dt>
<dd>This function converts gradians to radians<br>gradtorad(400)=6.2831....=2*pi</dd>
<dt>gradtodeg(grad)</dt>
<dd>This function converts gradians to degrees<br>gradtodeg(100)=90</dd>
</dl>
</body>
</html>

View File

@ -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]

View File

@ -0,0 +1,46 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>TTCalc - Hyperbolic functions</title>
<link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="sinh">
<param name="Keyword" value="cosh">
<param name="Keyword" value="tanh">
<param name="Keyword" value="tgh">
<param name="Keyword" value="coth">
<param name="Keyword" value="ctgh">
</object>
</head>
<body>
<h1>Arithmetic functions</h1>
<p><strong>Note:</strong> If a function takes more than one argument, the arguments are separated with semicolon ';'.</p>
<h2>Hyperbolic functions</h2>
<dl>
<dt>sinh(x)</dt>
<dd>This function returns hyperbolic sine of x<br>sinh(12)=81377.395...</dd>
<dt>cosh(x)</dt>
<dd>Hyperbolic cosine of x<br>cosh(8.5)=2457.384...</dd>
<dt>tanh(x) or tgh(x)</dt>
<dd>Hyperbolic tangent of x<br>tanh(0.67)=0.584...</dd>
<dt>coth(x) or ctgh(x)</dt>
<dd>Hyperbolic cotangent of x<br>coth(1.67)=1.073...</dd>
</dl>
</body>
</html>

View File

@ -10,6 +10,7 @@
<param name="Keyword" value="author">
<param name="Keyword" value="contact">
<param name="Keyword" value="licence">
<param name="Keyword" value="interface language">
<param name="Keyword" value="operating systems">
<param name="Keyword" value="project page">
</object>
@ -20,26 +21,31 @@
<h1>TTCalc</h1>
<p>
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.
</p>
<p>
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.
</p>
<table>
<tr><td>Author:</td><td>Tomasz Sowa</td></tr>
<tr><td>Contact:</td><td>t.sowa@slimaczek.pl</td></tr>
<tr><td>Licence:</td><td>BSD (open source)</td></tr>
<tr><td>Operating systems:</td><td>Microsoft Windows 9x/Me/NT/2000/XP (Vista was not tested)</td></tr>
<tr><td>Interface:</td><td>English, Polish</td></tr>
<tr><td>Project page:</td><td><a href="http://sourceforge.net/projects/ttcalc">http://sourceforge.net/projects/ttcalc</a></td></tr>
<tr><td>Interface:</td><td>English, Polish, Spanish</td></tr>
<tr><td>Project page:</td><td><a href="http://ttcalc.sourceforge.net/">http://ttcalc.sourceforge.net/</a></td></tr>
<tr><td>Operating systems:</td><td>Microsoft Windows 9x/Me/NT/2000/XP/Vista</td></tr>
</table>
</body>

View File

@ -0,0 +1,47 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>TTCalc - Inverse hyperbolic functions</title>
<link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="asinh">
<param name="Keyword" value="acosh">
<param name="Keyword" value="atanh">
<param name="Keyword" value="atgh">
<param name="Keyword" value="acoth">
<param name="Keyword" value="actgh">
</object>
</head>
<body>
<h1>Arithmetic functions</h1>
<p><strong>Note:</strong> If a function takes more than one argument, the arguments are separated with semicolon ';'.</p>
<h2>Inverse hyperbolic functions</h2>
<dl>
<dt>asinh(x)</dt>
<dd>This function returns inverse hyperbolic sine of x<br>asinh(3.6)=1.992...</dd>
<dt>acosh(x)</dt>
<dd>This function returns inverse hyperbolic cosine of x<br>acosh(2.23)=1.440...</dd>
<dt>atanh(x) or atgh(x)</dt>
<dd>This function returns inverse hyperbolic tangent of x<br>atanh(0.67)=0.810...</dd>
<dt>acoth(x) or actgh(x)</dt>
<dd>This function returns inverse hyperbolic cotangent of x<br>acoth(1.23)=1.135...</dd>
</dl>
</body>
</html>

View File

@ -0,0 +1,49 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>TTCalc - Inverse trigonometric functions</title>
<link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="asin">
<param name="Keyword" value="acos">
<param name="Keyword" value="atan">
<param name="Keyword" value="atg">
<param name="Keyword" value="acot">
<param name="Keyword" value="actg">
</object>
</head>
<body>
<h1>Arithmetic functions</h1>
<p><strong>Note:</strong> If a function takes more than one argument, the arguments are separated with semicolon ';'.</p>
<h2>Inverse trigonometric functions</h2>
<p><strong>Note:</strong> 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.</p>
<dl>
<dt>asin(x)</dt>
<dd>Inverse sine (arc sine) of x<br>e.g. asin(0.7)=0.775...</dd>
<dt>acos(x)</dt>
<dd>Inverse cosine (arc cosine) of x<br>acos(0.9)=0.451...</dd>
<dt>atan(x) or atg(x)</dt>
<dd>Inverse tangent (arc tangent) of x<br>atan(3.3)=1.276...</dd>
<dt>acot(x) or actg(x)</dt>
<dd>Inverse cotangent (arc cotangent) of x<br>acot(10)=0.099...</dd>
</dl>
</body>
</html>

View File

@ -0,0 +1,39 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>TTCalc - Logarithm and Exponential</title>
<link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="ln">
<param name="Keyword" value="log">
<param name="Keyword" value="exp">
</object>
</head>
<body>
<h1>Arithmetic functions</h1>
<p><strong>Note:</strong> If a function takes more than one argument, the arguments are separated with semicolon ';'.</p>
<h2>Logarithm and Exponential</h2>
<dl>
<dt>ln(x)</dt>
<dd>This function calculates the natural logarithm of x,<br>e.g. ln(123)=4.812...</dd>
<dt>log(x; base)</dt>
<dd>This function calculates the logarithm of x with a base equal 'base'<br>
It's using the formula: log(x; base) = ln(x) / ln(base)<br>
log(123; 4)=3.471...</dd>
<dt>exp(x)</dt>
<dd>This function calculates the exponential function of x<br>exp(20)=e^20=485165195.409...</dd>
</dl>
</body>
</html>

View File

@ -16,15 +16,15 @@
<p>Below is a list of operators priority. At the top are operators with higher precedence.</p>
<table>
<table class="operatorspriority">
<thead>
<tr><td>Operator</td><td>Description</td><td>Sample</td></tr>
</thead>
<tr><td>( )</td><td>parentheses for grouping an expression</td><td>(1+3)*4</td></tr>
<tr><td>- + # &amp;</td><td>unary minus and plus, and operators for changing the base (radix)</td><td>-10</td></tr>
<tr><td>without an operator</td><td>short form of multiplicating (only if the second argument is a variable or function)</td><td>3y</td></tr>
<tr><td>^</td><td>powering</td><td>3^2</td></tr>
<tr><td>* /</td><td>multiplication and division</td><td>10*20</td></tr>
<tr><td>without an operator</td><td>short form of multiplication<br>(only if the second argument is a variable or function,<br>the same priority as a normal multiplication)</td><td>3y</td></tr>
<tr><td>+ -</td><td>addition and subtraction</td><td>10-30</td></tr>
<tr><td>== != &lt; &gt; &lt;= &gt;=</td><td>comparative operators</td><td>4&lt;5</td></tr>
<tr><td>&amp;&amp;</td><td>logical and</td><td>3&gt;2 &amp;&amp; 3&lt;10</td></tr>

87
help/other_functions.html Normal file
View File

@ -0,0 +1,87 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>TTCalc - Other functions</title>
<link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="sqrt">
<param name="Keyword" value="root">
<param name="Keyword" value="factorial">
<param name="Keyword" value="abs">
<param name="Keyword" value="sgn">
<param name="Keyword" value="mod">
<param name="Keyword" value="max">
<param name="Keyword" value="min">
<param name="Keyword" value="sum">
<param name="Keyword" value="avg">
</object>
</head>
<body>
<h1>Arithmetic functions</h1>
<p><strong>Note:</strong> If a function takes more than one argument, the arguments are separated with semicolon ';'.</p>
<h2>Other functions</h2>
<dl>
<dt>sqrt(x)</dt>
<dd>Sqrt returns the square root of x<br>sqrt(9)=3</dd>
<dt>root(x ; n)</dt>
<dd>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.<br>
root(8;3)=2<br>
root(-8;3)=-2
</dd>
<dt>factorial(x)</dt>
<dd>The factorial function<br>factorial(6)=1*2*3*4*5*6=720</dd>
<dt>abs(x)</dt>
<dd>The absolute value of x<br>abs(-10)=10</dd>
<dt>sgn(x)</dt>
<dd>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<br>
sgn(-10)=-1<br>
sgn(0)=0<br>
sgn(5)=1</dd>
<dt>mod(x,y)</dt>
<dd>Mod returns the remainder from the division x by y<br>mod(10; 2.2)=1.2 because 10=2.2*4 + 1.2</dd>
<dt>max(x1; x2; ...)</dt>
<dd>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.<br>
max(2;5;8;3)=8<br>
max()=6.97846825730330952352039893e+646457021 (assuming the small precision is selected)</dd>
<dt>min(x1; x2; ...)</dt>
<dd>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.<br>
min(45;-23;18;19)=-23<br>
min()=-6.97846825730330952352039893e+646457021 (assuming the small precision is selected)
</dd>
<dt>sum(x1; x2; ...)</dt>
<dd>This functions takes one or more arguments. It returns the sum of them.<br>
sum(4;2;9;3)=18
</dd>
<dt>avg(x1; x2; ...)</dt>
<dd>This functions takes one or more arguments. It returns the arithmetic mean. (The sum divided by
the number of arguments)<br>
avg(4;2;9;3)=4.5
</dd>
</dl>
</body>
</html>

View File

@ -0,0 +1,67 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>TTCalc - Rounding functions</title>
<link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="int">
<param name="Keyword" value="round">
<param name="Keyword" value="ceil">
<param name="Keyword" value="floor">
</object>
</head>
<body>
<h1>Arithmetic functions</h1>
<p><strong>Note:</strong> If a function takes more than one argument, the arguments are separated with semicolon ';'.</p>
<h2>Rounding functions</h2>
<dl>
<dt>int(x)</dt>
<dd>This method returns only the integer part of x.<br>
int(2.8)=2<br>
int(2.2)=2<br>
int(2)=2<br>
int(-4.1)=-4<br>
int(-4.8)=-4<br>
</dd>
<dt>round(x)</dt>
<dd>This method rounds the value of x to the nearest integer<br>
round(2.8)=3<br>
round(2.2)=2<br>
round(2)=2<br>
round(-4.1)=-4<br>
round(-4.8)=-5</dd>
<dt>ceil(x)</dt>
<dd>This function returns a value representing the smallest integer that is greater than or equal to x<br>
ceil(2.8)=3<br>
ceil(2.2)=3<br>
ceil(2)=2<br>
ceil(-4.1)=-4<br>
ceil(-4.8)=-4</dd>
<dt>floor(x)</dt>
<dd>This function returns a value representing the largest integer that is less than or equal to x<br>
floor(2.8)=2<br>
floor(2.2)=2<br>
floor(2)=2<br>
floor(-4.1)=-5<br>
floor(-4.8)=-5</dd>
</dl>
</body>
</html>

View File

@ -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;
}

View File

@ -20,33 +20,36 @@
<h1>Tips</h1>
<p>
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.
</p>
<ul class="tips">
<li>
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 &mdash; just type ESC,
the entire edit will be selected and have a focus.
</li>
<p>
<li>
If you want to insert a value with a base (radix) 2 or 16 use the unary operator &amp; (for the base 2)
or # (for the base 16).
For example &amp;10=2 (decimal), #10=16 (decimal). When you're using these operators
then 'input' mode on the 'display' tab is ignored.
</p>
</li>
<p>
<li>
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&nbsp;&nbsp;&nbsp;50'.
</p>
</li>
<p>
<li>
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)
</p>
</li>
<p>
<li>
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)
</p>
(if a control which has a focus is not an edit control)
</li>
</ul>
</body>
</html>

View File

@ -21,6 +21,40 @@
<param name="Name" value="Arithmetic functions">
<param name="Local" value="arithmetic_functions.html">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Logarithm and Exponential">
<param name="Local" value="logarithm_exponential.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Trigonometric functions">
<param name="Local" value="trigonometric_functions.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Inverse trigonometric functions">
<param name="Local" value="inverse_trigonometric_functions.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Hyperbolic functions">
<param name="Local" value="hyperbolic_functions.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Inverse hyperbolic functions">
<param name="Local" value="inverse_hyperbolic_functions.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Conversions between radians, degrees and gradians">
<param name="Local" value="conversions_deg_rad_grad.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Rounding functions">
<param name="Local" value="rounding_functions.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Other functions">
<param name="Local" value="other_functions.html">
</OBJECT>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Logical operators and functions">
<param name="Local" value="logical_functions.html">
@ -37,6 +71,10 @@
<param name="Name" value="Operators priority">
<param name="Local" value="operators_priority.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Accuracy">
<param name="Local" value="accuracy.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Tips">
<param name="Local" value="tips.html">

View File

@ -0,0 +1,48 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>TTCalc - Trigonometric functions</title>
<link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="sin">
<param name="Keyword" value="cos">
<param name="Keyword" value="tan">
<param name="Keyword" value="tg">
<param name="Keyword" value="cot">
<param name="Keyword" value="ctg">
</object>
</head>
<body>
<h1>Arithmetic functions</h1>
<p><strong>Note:</strong> If a function takes more than one argument, the arguments are separated with semicolon ';'.</p>
<h2>Trigonometric functions</h2>
<p><strong>Note:</strong> 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 input value.</p>
<dl>
<dt>sin(x)</dt>
<dd>This function returns the sine of x.<br>For example sin(0.8)=0.717...</dd>
<dt>cos(x)</dt>
<dd>Cosine of x<br>cos(1.3)=0.267...</dd>
<dt>tan(x) or tg(x)</dt>
<dd>Tangent of x<br>tan(3.6)=0.493...</dd>
<dt>cot(x) or ctg(x)</dt>
<dd>Cotangent of x<br>cot(2.3)=-0.893...</dd>
</dl>
</body>
</html>

View File

@ -16,19 +16,24 @@
<h1>User defined variables and functions</h1>
<p>
You are allowed to define your own variables and functions. As a name of a variable or a function
can be a name consists of letters, digits or an underline character but the first character must be a letter.
You are allowed to define your own variables and functions. As a name of a variable or function
can be a name consists of letters, digits or an underline character (only the first character must be a letter).
From version 0.8.3 names are case-sensitive that means 'name' is not the same as 'NaMe'. For example these
are correct names: a, b, c3, MyName, etc. During defining variables and functions you can call another
variables and functions but you cannot call a variable or a function twice. Recurrence calling are not allowed.
are correct names: a, b, c3, MyName. During defining variables and functions you can call another
variables and functions.
</p>
<p>
Functions can get maximum 9 parameters. You have to specify how many parameters your function takes and
you can refer to them by using the variable 'x' with a number from 1 to 9 ('x' without a number means 'x1').
For example you can define a function 'xy' as 'x1*x2' (of course without apostrophes), set the 'parameters' on 2
and then put into the edit box an expression 'xy(10;20)', the result will be 200. Note that we use a semicolon
to separate arguments in a function.
For example you can define a function 'xy' as 'x1*x2' (of course without apostrophes), set the 'parameters' to '2'
and then put into the edit box expression 'xy(10;20)', the result will be '200'. Note that we use a semicolon
to separate arguments in the function.
</p>
<p>
More complex example: myfunction(x) which returns sin(x) when the x is negative, 0 when the x is 0, and cos(x) when the x is greater than 0: <br>
myfunction(x)='if(x==0; 0; if(x<0; sin(x); cos(x)))'
</p>
</body>

View File

@ -12,11 +12,14 @@
<param name="Keyword" value="standard operators">
<param name="Keyword" value="builtin variables">
<param name="Keyword" value="e">
<param name="Keyword" value="pi">
<param name="Keyword" value="^">
<param name="Keyword" value="*">
<param name="Keyword" value="/">
<param name="Keyword" value="+">
<param name="Keyword" value="-">
<param name="Keyword" value="#">
<param name="Keyword" value="&amp;">
</object>
</head>
@ -24,27 +27,37 @@
<h1>Numbers</h1>
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&amp;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.
<p>
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&amp;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.
</p>
<h1>Standard operators</h1>
<dl>
<dt>^</dt>
<dd>Powering</dd>
<dd>Powering, e.g.: 2^3=8</dd>
<dt>*</dt>
<dd>Multiplication</dd>
<dd>Multiplication, e.g.: 2*3=6</dd>
<dt>/</dt>
<dd>Division</dd>
<dd>Division, e.g.: 2/3 = 0.6666...</dd>
<dt>+</dt>
<dd>Addition</dd>
<dd>Addition, e.g.: 2+3=5<br>
Unary plus, e.g.: +2</dd>
<dt>-</dt>
<dd>Subtraction</dd>
<dd>Subtraction, e.g.: 2-3=-1<br>
Unary minus, e.g.: -2</dd>
<dt>#</dt>
<dd>Operator for changing the base (radix) to 16 (hex), e.g.: #ff=255</dd>
<dt>&amp;</dt>
<dd>Operator for changing the base (radix) to 2 (bin), e.g.: -&amp;110=-6</dd>
</dl>

View File

@ -1,6 +1,5 @@
o = resource.o calculation.o convert.o functions.o iniparser.o languages.o mainwindow.o parsermanager.o programresources.o tabs.o variables.o winmain.o
calculation.o: calculation.cpp compileconfig.h parsermanager.h resource.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h tabs.h messages.h
convert.o: convert.cpp convert.h compileconfig.h bigtypes.h
functions.o: functions.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h
@ -20,12 +19,21 @@ winmain.o: winmain.cpp compileconfig.h winmain.h programresources.h iniparser.
$(CC) -c $(CFLAGS) $<
helpdep = ../help/arithmetic_functions.html \
helpdep = ../help/arithmetic_functions.html \
../help/logarithm_exponential.html \
../help/trigonometric_functions.html \
../help/inverse_trigonometric_functions.html \
../help/hyperbolic_functions.html \
../help/inverse_hyperbolic_functions.html \
../help/conversions_deg_rad_grad.html \
../help/rounding_functions.html \
../help/other_functions.html \
../help/operators_priority.html \
../help/bitwise_functions.html \
../help/index.html \
../help/userfunctions.html \
../help/logical_functions.html \
../help/accuracy.html \
../help/tips.html \
../help/values_and_std_operators.html \
../help/styles.css \
@ -33,4 +41,4 @@ helpdep = ../help/arithmetic_functions.html \
../help/toc.hhc \
../help/help.hhp
setupdep = ttcalc help ../setup/innosetup.iss ../setup/COPYRIGHT
setupdep = ttcalc help ../setup/innosetup.iss ../setup/COPYRIGHT ../COPYRIGHT ../CHANGELOG ../README

View File

@ -454,7 +454,7 @@ ProgramResources::ProgramResources()
base_output = 10;
display_always_scientific = false;
display_when_scientific = 15;
display_when_scientific = 8;
display_rounding = -1;
remove_zeroes = true;

View File

@ -69,10 +69,14 @@
GetPrgRes()->SetPrecision( new_precision );
GetPrgRes()->GetThreadController()->StartCalculating();
if you change some variables by using GetVariable() method
you should call VariablesChanged() in order to inform the second thread that variables have changed
(variables_id will be increment), the same is for functions (FunctionsChanged() method)
methods which are used by the second thread:
GetBuffer(), GetVariables(), GetFunctions(), GetBaseInput(), GetBaseOutput()
GetDisplayAlwaysScientific(), GetDisplayWhenScientific(), GetDisplayRounding()
GetCurrentLanguage(), GetPrecision()
GetCurrentLanguage(), GetPrecision() ...
and if you're using methods which begin with Set..... you must call it
between StopCalculating() and StartCalculating()

View File

@ -1,159 +1,159 @@
/*
* This file is a part of TTCalc - a mathematical calculator
* and is distributed under the (new) BSD licence.
* Author: Tomasz Sowa <t.sowa@slimaczek.pl>
*/
/*
* Copyright (c) 2006-2008, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name Tomasz Sowa nor the names of contributors to this
* project may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef headerfilestopcalculating
#define headerfilestopcalculating
/*!
\file stopcalculating.h
\brief it tells us whether there was a stop signal or not
*/
#include <ttmath/ttmathtypes.h>
#include <windows.h>
/*!
\brief it tells us whether there was a stop signal or not
we can pass a pointer to the object of this class to the certain
calculating methods especially for the method which calculates the
Factorial (1*2*3*4....), such methods as the Factorial takes a lot of time
and sometimes we want to break the calculations for example when we've got
a new input string
those methods which take a lot of time check the object of type NewStopCalculating
and if there was a stop signal they stop and return immediately without returning
a correct result
the stop signal can be caused by another thread in our case by the first (gui) thread
there'll be only one object of this class
(it'll be as an variable of ThreadController class)
*/
class NewStopCalculating : public ttmath::StopCalculating
{
public:
/*!
the constructor
*/
NewStopCalculating()
{
stop = 0;
}
/*!
the destructor
*/
~NewStopCalculating()
{
if(stop) CloseHandle(stop);
}
/*!
it initializes an object of this class
this method will be called from Init() of the ThreadController object
*/
bool Init() volatile
{
char buffer[80];
// with 'GetTickCount()' we're generating an unique identifier of our event
// (there can be another window of ttcalc)
sprintf(buffer,"TTCalcStopEventForStoppingCalculations7756%u",
(unsigned int)GetTickCount());
// 'stop' will be manual-reseted and initialized as non-signaled
if( (stop = CreateEvent(0,true,false,buffer))==NULL)
return false;
return true;
}
/*!
when we want to stop the calculations for example when the user changed somewhat
we call the Stop() method from the first (gui) thread
*/
void Stop() volatile
{
SetEvent(stop);
}
/*!
when we start the calculations we call this method
(we call it from WaitForCalculatingAndBlockForStop() method of
ThreadController class)
*/
void Start() volatile
{
ResetEvent(stop);
}
/*!
it returns 'true' if there was a stop signal
it's useful for the second thread and functions which take plenty of time
for calculating, when this method returns 'true' those methods break the
calculations and return without returning a correct value
*/
virtual bool WasStopSignal() const volatile
{
if( WaitForSingleObject(stop,0) == WAIT_OBJECT_0 )
return true;
return false;
}
private:
// manual-reset, initialized as non-signaled
HANDLE stop;
};
#endif
/*
* This file is a part of TTCalc - a mathematical calculator
* and is distributed under the (new) BSD licence.
* Author: Tomasz Sowa <t.sowa@slimaczek.pl>
*/
/*
* Copyright (c) 2006-2008, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name Tomasz Sowa nor the names of contributors to this
* project may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef headerfilestopcalculating
#define headerfilestopcalculating
/*!
\file stopcalculating.h
\brief it tells us whether there was a stop signal or not
*/
#include <ttmath/ttmathtypes.h>
#include <windows.h>
/*!
\brief it tells us whether there was a stop signal or not
we can pass a pointer to the object of this class to the certain
calculating methods especially for the method which calculates the
Factorial (1*2*3*4....), such methods as the Factorial takes a lot of time
and sometimes we want to break the calculations for example when we've got
a new input string
those methods which take a lot of time check the object of type NewStopCalculating
and if there was a stop signal they stop and return immediately without returning
a correct result
the stop signal can be caused by another thread in our case by the first (gui) thread
there'll be only one object of this class
(it'll be as an variable of ThreadController class)
*/
class NewStopCalculating : public ttmath::StopCalculating
{
public:
/*!
the constructor
*/
NewStopCalculating()
{
stop = 0;
}
/*!
the destructor
*/
~NewStopCalculating()
{
if(stop) CloseHandle(stop);
}
/*!
it initializes an object of this class
this method will be called from Init() of the ThreadController object
*/
bool Init() volatile
{
char buffer[80];
// with 'GetTickCount()' we're generating an unique identifier of our event
// (there can be another window of ttcalc)
sprintf(buffer,"TTCalcStopEventForStoppingCalculations7756%u",
(unsigned int)GetTickCount());
// 'stop' will be manual-reseted and initialized as non-signaled
if( (stop = CreateEvent(0,true,false,buffer))==NULL)
return false;
return true;
}
/*!
when we want to stop the calculations for example when the user changed somewhat
we call the Stop() method from the first (gui) thread
*/
void Stop() volatile
{
SetEvent(stop);
}
/*!
when we start the calculations we call this method
(we call it from WaitForCalculatingAndBlockForStop() method of
ThreadController class)
*/
void Start() volatile
{
ResetEvent(stop);
}
/*!
it returns 'true' if there was a stop signal
it's useful for the second thread and functions which take plenty of time
for calculating, when this method returns 'true' those methods break the
calculations and return without returning a correct value
*/
virtual bool WasStopSignal() const volatile
{
if( WaitForSingleObject(stop,0) == WAIT_OBJECT_0 )
return true;
return false;
}
private:
// manual-reset, initialized as non-signaled
HANDLE stop;
};
#endif