diff --git a/CHANGELOG b/CHANGELOG index 93904d6..c359339 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,15 @@ +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) diff --git a/TODO b/TODO index 453c052..cd23d1b 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,6 @@ TODO TTCalc =========== -* Add some physical constants diff --git a/help/arithmetic_functions.html b/help/arithmetic_functions.html index cc19737..8b3558f 100644 --- a/help/arithmetic_functions.html +++ b/help/arithmetic_functions.html @@ -27,6 +27,12 @@ + + + + + + @@ -57,65 +63,77 @@
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'
e.g. log(123; 4)=3.471...
+
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
e.g. exp(20)=e^20=485165195.409...
+
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.
cos(x)
-
Cosine of x
e.g. cos(1.3)=0.267...
The argument x is in radians.
+
Cosine of x
cos(1.3)=0.267...
The argument x is in radians.
tan(x) or tg(x)
-
Tangent of x
e.g. tan(3.6)=0.493...
The argument x is in radians.
+
Tangent of x
tan(3.6)=0.493...
The argument x is in radians.
cot(x) or ctg(x)
-
Cotangent of x
e.g. cot(2.3)=-0.893...
The argument x is in radians.
+
Cotangent of x
cot(2.3)=-0.893...
The argument x is in radians.
asin(x)
-
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 +
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
acos(x)
-
Arc cosine of x
e.g. acos(0.9)=0.451...
The result is in radians.
+
Inverse cosine (arc cosine) of x
acos(0.9)=0.451...
The result is in radians.
atan(x) or atg(x)
-
Arc tangent of x
e.g. atan(3.3)=1.276...
The result is in radians.
+
Inverse tangent (arc tangent) of x
atan(3.3)=1.276...
The result is in radians.
acot(x) or actg(x)
-
Arc cotangent of x
e.g. acot(10)=0.099...
The result is in radians.
+
Inverse cotangent (arc cotangent) of x
acot(10)=0.099...
The result is in radians.
sinh(x)
-
This function returns hyperbolic sine of x
e.g.sinh(12)=81377.395...
+
This function returns hyperbolic sine of x
sinh(12)=81377.395...
cosh(x)
-
Hyperbolic cosine of x
e.g. cosh(8.5)=2457.384...
+
Hyperbolic cosine of x
cosh(8.5)=2457.384...
tanh(x) or tgh(x)
-
Hyperbolic tangent of x
e.g. tanh(0.67)=0.584...
+
Hyperbolic tangent of x
tanh(0.67)=0.584...
coth(x) or ctgh(x)
-
Hyperbolic cotangent of x
e.g. coth(1.67)=1.073...
+
Hyperbolic cotangent of x
coth(1.67)=1.073...
+ +
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...
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
DegToRad(deg)
-
This function converts degrees into radians
e.g. degtorad(12.5)=0.218166...
+
This function converts degrees into radians
degtorad(12.5)=0.218166...
DegToRad(deg; min; sec)
This function converts degrees in the long format (degrees, minutes, seconds) to radians.
For example degtorad(12; 30; 0)=0.218166...
RadToDeg(rad)
-
This function converts radians into degrees
e.g. radtodeg(pi)=180
+
This function converts radians into degrees
radtodeg(pi)=180
sqrt(x)
-
Sqrt returns the square root of x
e.g. sqrt(9)=3
+
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, @@ -125,26 +143,26 @@ root(-8;3)=-2
factorial(x)
-
The factorial function
e.g. factorial(6)=1*2*3*4*5*6=720
+
The factorial function
factorial(6)=1*2*3*4*5*6=720
abs(x)
-
The absolute value of x
e.g. abs(-10)=10
+
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, e.g.
+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
e.g. mod(10; 2.2)=1.2 because 10=2.2*4 + 1.2
+
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.
e.g. int(2.7)=2
+
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 e.g.
+
This method rounds the value of x to the nearest integer
round(2.8)=3
round(2.2)=2
round(2)=2
@@ -152,7 +170,7 @@ 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, e.g.
+
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
@@ -160,7 +178,7 @@ 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, e.g.
+
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
diff --git a/help/help.hhp b/help/help.hhp index 6588f72..98e4330 100644 --- a/help/help.hhp +++ b/help/help.hhp @@ -18,6 +18,7 @@ operators_priority.html userfunctions.html index.html tips.html +bitwise_functions.html [INFOTYPES] diff --git a/help/toc.hhc b/help/toc.hhc index f4ef632..39860e3 100644 --- a/help/toc.hhc +++ b/help/toc.hhc @@ -25,6 +25,10 @@ +
  • + + +
  • diff --git a/setup/innosetup.iss b/setup/innosetup.iss index c7be811..876cf77 100644 --- a/setup/innosetup.iss +++ b/setup/innosetup.iss @@ -3,7 +3,7 @@ [Setup] AppName=TTCalc -AppVerName=TTCalc 0.8.0 +AppVerName=TTCalc 0.8.1 AppPublisher=Tomasz Sowa AppPublisherURL=http://sourceforge.net/projects/ttcalc AppSupportURL=http://sourceforge.net/projects/ttcalc @@ -24,7 +24,6 @@ Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl" [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked -Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] Source: "..\..\output\ttcalc.exe"; DestDir: "{app}"; Flags: ignoreversion diff --git a/src/compileconfig.h b/src/compileconfig.h index 0e5cea3..7f4b384 100644 --- a/src/compileconfig.h +++ b/src/compileconfig.h @@ -56,7 +56,7 @@ #define TTCALC_MAJOR_VER 0 #define TTCALC_MINOR_VER 8 #define TTCALC_REVISION_VER 1 -#define TTCALC_PRERELEASE_VER 1 +#define TTCALC_PRERELEASE_VER 0 diff --git a/src/languages.cpp b/src/languages.cpp index 8003826..1912130 100644 --- a/src/languages.cpp +++ b/src/languages.cpp @@ -228,9 +228,9 @@ void Languages::InitGuiMessagesTab() InsertGuiPair(tab_precision,"Precision"); InsertGuiPair(tab_display,"Display"); - InsertGuiPair(radio_precision_1,"Small - 96 bits for mantissa, 32 bits for exponent"); - InsertGuiPair(radio_precision_2,"Medium - 192 bits for mantissa, 64 bits for exponent"); - InsertGuiPair(radio_precision_3,"Big - 288 bits for mantissa, 96 bits for exponent"); + InsertGuiPair(radio_precision_1,"Small - 96 bits for the mantissa, 32 bits for the exponent"); + InsertGuiPair(radio_precision_2,"Medium - 192 bits for the mantissa, 64 bits for the exponent"); + InsertGuiPair(radio_precision_3,"Big - 288 bits for the mantissa, 96 bits for the exponent"); InsertGuiPair(precision_1_info,"(+/-)6.9 e+646457021, 26 valid digits (decimal)"); InsertGuiPair(precision_2_info,"(+/-)4.3 e+2776511644261678623, 56 valid digits"); diff --git a/src/parsermanager.h b/src/parsermanager.h index 7be5905..fa6b3c3 100644 --- a/src/parsermanager.h +++ b/src/parsermanager.h @@ -134,38 +134,46 @@ private: for(i=0 ; iGetLanguages()->GuiMessage(country, Languages::overflow_during_printing); + // will be working correctly on gcc with -O3 + + // this error doesn't appear always, it can be seen, for example, + // if we use Big<1,3> type and we give '2^32' for calculating + + // I didn't check this error on a new version of gcc + + part = GetPrgRes()->GetLanguages()->GuiMessage(country, Languages::overflow_during_printing); + } + } + catch(...) + { part.erase(); - - // we can omit this part.erase() and use operator+= instead of - // operator= below, for example: - // part += GetPrgRes()->GetLanguages()->GuiMessage(country, Languages::overflow_during_printing); - // will be working correctly on gcc with -O3 - - // this error doesn't appear always, it can be seen, for example, - // if we use Big<1,3> type and we give '2^32' for calculating - - // I didn't check this error on a new version of gcc - - part = GetPrgRes()->GetLanguages()->GuiMessage(country, Languages::overflow_during_printing); + part = GetPrgRes()->GetLanguages()->ErrorMessage(country, ttmath::err_internal_error); } result += part; diff --git a/src/programresources.cpp b/src/programresources.cpp index 06474bf..7a0fde2 100644 --- a/src/programresources.cpp +++ b/src/programresources.cpp @@ -461,23 +461,6 @@ return true; } -bool ProgramResources::IsWindowsNt() -{ -OSVERSIONINFO os_info; - - os_info.dwOSVersionInfoSize = sizeof( os_info ); - - if( !GetVersionEx( &os_info ) ) - return false; - - if( os_info.dwPlatformId != VER_PLATFORM_WIN32_NT ) - // we've got Windows 3.1, Windows 95 or Windows 98 - return false; - -return true; -} - - bool ProgramResources::ReadTextValueFromRegistry(HKEY main_key, const char * sub_key, const char * value, std::string & result) { HKEY reg_key; @@ -515,13 +498,10 @@ std::string application_data; // if there'll be an error we assume that the current directory will be used configuration_file = std::string(".\\") + simple_file_name; - // for the first we must check which operating system we're using - if( !IsWindowsNt() ) - return; - // we're trying to read the value "AppData" from registry // which can be, for instance, as: - // "C:\Documents and Settings\user\data application" + // "C:\Documents and Settings\user\data application" on WinNT + // or "C:\Windows\Data Application\" on Win9x if( ReadTextValueFromRegistry( HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", @@ -553,8 +533,6 @@ std::string application_data; delete [] buffer; } - - } diff --git a/src/tabs.cpp b/src/tabs.cpp index 7254804..e1f02d2 100644 --- a/src/tabs.cpp +++ b/src/tabs.cpp @@ -1026,14 +1026,6 @@ return false; } -BOOL WmTabKeyDown(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ -MessageBox(hWnd, "trol", "", 0); - -return true; - - -} void CreateTabMessagesTable(Messages & messages) @@ -1045,7 +1037,6 @@ void CreateTabMessagesTable(Messages & messages) messages.Associate(WM_INIT_TAB_PRECISION, WmInitTabPrecision); messages.Associate(WM_INIT_TAB_DISPLAY, WmInitTabDisplay); messages.Associate(WM_NOTIFY, WmNotify); - messages.Associate(WM_KEYDOWN, WmTabKeyDown); }