changed: precision:

Medium - 512 mantissa,  64  exponent
         Big    - 1024 mantissa, 128 exponent
changed: small changes in the pod window
changed: releases we compile with TTMATH_RELEASE flag



git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@214 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2009-10-16 18:41:09 +00:00
parent 59d24bf3ae
commit 8fa1a24350
5 changed files with 63 additions and 66 deletions

View File

@ -1,5 +1,8 @@
Version 0.9.0 prerelease (2009.09.15):
Version 0.9.0 prerelease (2009.09.16):
* added: Pad window - a multiline edit window
* changed: precision:
Medium - 512 mantissa, 64 exponent
Big - 1024 mantissa, 128 exponent
Version 0.8.7 prerelease (2009.09.16):

View File

@ -1,6 +1,6 @@
CC = g++
#CFLAGS = -Wall -pedantic -s -O2 -mwindows -I../../ttmath -DTTCALC_CONVERT
CFLAGS = -Wall -pedantic -s -O2 -mwindows -I../../ttmath
#CFLAGS = -Wall -pedantic -s -O2 -mwindows -I../../ttmath -DTTMATH_RELEASE -DTTCALC_CONVERT
CFLAGS = -Wall -pedantic -s -O2 -mwindows -I../../ttmath -DTTMATH_RELEASE
name = ttcalc.exe
# the name of the help is also set in the html help workshop project file

View File

@ -53,16 +53,23 @@
ttmath::Big<3,9>
*/
/*
typedef ttmath::Big<1,3> TTMathBig1;
typedef ttmath::Big<2,9> TTMathBig2;
typedef ttmath::Big<4,27> TTMathBig3;
typedef TTMathBig3 TTMathBigMax;
*/
typedef ttmath::Big<TTMATH_BITS(32), TTMATH_BITS(96) > TTMathBig1;
typedef ttmath::Big<TTMATH_BITS(64), TTMATH_BITS(512) > TTMathBig2;
typedef ttmath::Big<TTMATH_BITS(128), TTMATH_BITS(1024)> TTMathBig3;
typedef TTMathBig3 TTMathBigMax;
#else
/* portable */
typedef ttmath::Big<1,3> TTMathBig1;
typedef ttmath::Big<TTMATH_BITS(32), TTMATH_BITS(96)> TTMathBig1;
typedef TTMathBig1 TTMathBigMax;
#endif

View File

@ -143,7 +143,6 @@ void Languages::InitErrorMessagesTab()
InsertErrorPair(ttmath::err_functions_loop,"Pomiêdzy funkcjami zachodzi wywo³anie rekurencyjne");
InsertErrorPair(ttmath::err_must_be_only_one_value,"Zmienne albo funkcje mog¹ posiadaæ (zwracaæ) tylko jedn¹ wartoœæ");
InsertErrorPair(ttmath::err_still_calculating,"Obliczanie...");
//InsertErrorPair(ttmath::err_too_big_factorial,"Zbyt du¿y argument dla funkcji factorial()");
/*
@ -176,7 +175,6 @@ void Languages::InitErrorMessagesTab()
InsertErrorPair(ttmath::err_functions_loop,"Recurrencia entre funciones");
InsertErrorPair(ttmath::err_must_be_only_one_value,"Variables o funciones solo pueden retornar un valor");
InsertErrorPair(ttmath::err_still_calculating,"Calculando ...");
//InsertErrorPair(ttmath::err_too_big_factorial,"Argumento muy grande para la funcion factorial()");
/*
@ -208,7 +206,6 @@ void Languages::InitErrorMessagesTab()
InsertErrorPair(ttmath::err_functions_loop,"Der er en gentagelse mellem funktioner");
InsertErrorPair(ttmath::err_must_be_only_one_value,"Variabler eller funktioner skal kun returnere én værdi");
InsertErrorPair(ttmath::err_still_calculating,"Regner...");
//InsertErrorPair(ttmath::err_too_big_factorial,"Et for stort argument for factorial() funktionen");
/*
@ -240,7 +237,6 @@ void Languages::InitErrorMessagesTab()
InsertErrorPair(ttmath::err_functions_loop,"º¯ÊýÑ­»·");
InsertErrorPair(ttmath::err_must_be_only_one_value,"±äÁ¿»òº¯Êý±ØÐëÓзµ»ØÖµ");
InsertErrorPair(ttmath::err_still_calculating,"ÕýÔÚ¼ÆËã...");
//InsertErrorPair(ttmath::err_too_big_factorial,"½×³Ëº¯ÊýµÄ²ÎÊýÌ«´ó");
/*
@ -272,7 +268,6 @@ void Languages::InitErrorMessagesTab()
InsertErrorPair(ttmath::err_functions_loop,"Ôóíêöèè ðåêóððåíòíû");
InsertErrorPair(ttmath::err_must_be_only_one_value,"Ïåðåìåííûå èëè ôóíêöèè äîëæíû âîçâðàùàòü òîëüêî îäíî çíà÷åíèå");
InsertErrorPair(ttmath::err_still_calculating,"Ïîäñ÷èòûâàåì...");
//InsertErrorPair(ttmath::err_too_big_factorial,"Ñëèøêîì áîëüøîé àðãóìåíò äëÿ ôóíêöèè factorial()");
/*
@ -304,9 +299,6 @@ void Languages::InitErrorMessagesTab()
InsertErrorPair(ttmath::err_functions_loop,"Det är en upprepning mellan funktioner");
InsertErrorPair(ttmath::err_must_be_only_one_value,"Variabler eller funktioner skall kunna avge ett värde");
InsertErrorPair(ttmath::err_still_calculating,"Räknar bävrar...");
//InsertErrorPair(ttmath::err_too_big_factorial,"Ett för stort argument för factorial() funktionen");
}
@ -406,13 +398,12 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(tab_convert,"Convert");
InsertGuiPair(radio_precision_1,"Small - 96 bits for the mantissa, 32 bits for the exponent");
InsertGuiPair(radio_precision_2,"Medium - 288 bits for the mantissa, 64 bits for the exponent");
InsertGuiPair(radio_precision_3,"Big - 864 bits for the mantissa, 128 bits for the exponent");
InsertGuiPair(radio_precision_2,"Medium - 512 bits for the mantissa, 64 bits for the exponent");
InsertGuiPair(radio_precision_3,"Big - 1024 bits for the mantissa, 128 bits for the exponent");
InsertGuiPair(precision_1_info,"(+/-)6.9 e+646457021, 26 valid digits (decimal)");
InsertGuiPair(precision_2_info,"(+/-)3.4e+2776511644261678652, 85 valid digits");
InsertGuiPair(precision_3_info,"(+/-)6.7e+51217599719369681875006054625051616609, 258 digits");
InsertGuiPair(precision_1_info,"(+/-)6.97...e+646457021, 26 valid decimal digits");
InsertGuiPair(precision_2_info,"(+/-)9.25...e+2776511644261678719, 152 valid decimal digits");
InsertGuiPair(precision_3_info,"(+/-)9.80...*10^(10^37), 306 valid decimal digits");
InsertGuiPair(overflow_during_printing,"Overflow during printing");
@ -543,12 +534,12 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(tab_convert,"Konwersja");
InsertGuiPair(radio_precision_1,"Ma³a - 96 bitowa mantysa, 32 bitowy wyk³adnik");
InsertGuiPair(radio_precision_2,"Œrednia - 288 bitowa mantysa, 64 bitowy wyk³adnik");
InsertGuiPair(radio_precision_3,"Du¿a - 864 bitowa mantysa, 128 bitowy wyk³adnik");
InsertGuiPair(radio_precision_2,"Œrednia - 512 bitowa mantysa, 64 bitowy wyk³adnik");
InsertGuiPair(radio_precision_3,"Du¿a - 1024 bitowa mantysa, 128 bitowy wyk³adnik");
InsertGuiPair(precision_1_info,"(+/-)6.9e+646457021, 26 cyfr znacz¹cych (w rozwiniêciu dziesiêtnym)");
InsertGuiPair(precision_2_info,"(+/-)3.4e+2776511644261678652, 85 cyfr znacz¹cych");
InsertGuiPair(precision_3_info,"(+/-)6.7e+51217599719369681875006054625051616609, 258 cyfr");
InsertGuiPair(precision_1_info,"(+/-)6.97...e+646457021, 26 cyfr znacz¹cych (w rozwiniêciu dziesiêtnym)");
InsertGuiPair(precision_2_info,"(+/-)9.25...e+2776511644261678719, 152 cyfr znacz¹cych");
InsertGuiPair(precision_3_info,"(+/-)9.80...*10^(10^37), 306 cyfr znacz¹cych");
InsertGuiPair(overflow_during_printing,"Przepe³nienie podczas wypisywania");
@ -680,13 +671,12 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(tab_convert,"Convertir");
InsertGuiPair(radio_precision_1,"Pequeño - 96 bits para la mantissa, 32 bits para el exponente");
InsertGuiPair(radio_precision_2,"Mediano - 288 bits para la mantissa, 64 bits para el exponente");
InsertGuiPair(radio_precision_3,"Grande - 864 bits para la mantissa, 128 bits para el exponente");
InsertGuiPair(radio_precision_2,"Mediano - 512 bits para la mantissa, 64 bits para el exponente");
InsertGuiPair(radio_precision_3,"Grande - 1024 bits para la mantissa, 128 bits para el exponente");
InsertGuiPair(precision_1_info,"(+/-)6.9 e+646457021, 26 digitos validos (decimal)");
InsertGuiPair(precision_2_info,"(+/-)3.4e+2776511644261678652, 85 digitos validos");
InsertGuiPair(precision_3_info,"(+/-)6.7e+51217599719369681875006054625051616609, 258 digitos");
InsertGuiPair(precision_1_info,"(+/-)6.97...e+646457021, 26 digitos validos (decimal)");
InsertGuiPair(precision_2_info,"(+/-)9.25...e+2776511644261678719, 152 digitos validos");
InsertGuiPair(precision_3_info,"(+/-)9.80...*10^(10^37), 306 digitos digitos");
InsertGuiPair(overflow_during_printing,"Sobredimensión durante impresión");
@ -817,13 +807,13 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(tab_convert,"Konverter");
InsertGuiPair(radio_precision_1,"Lille - 96 bits for mantissen, 32 bits for exponenten");
InsertGuiPair(radio_precision_2,"Mellem - 288 bits for mantissen, 64 bits for exponenten");
InsertGuiPair(radio_precision_3,"Stor - 864 bits for mantissen, 128 bits for exponenten");
InsertGuiPair(radio_precision_2,"Mellem - 512 bits for mantissen, 64 bits for exponenten");
InsertGuiPair(radio_precision_3,"Stor - 1024 bits for mantissen, 128 bits for exponenten");
InsertGuiPair(precision_1_info,"(+/-)6.9 e+646457021, 26 gyldige cifre (decimaler)");
InsertGuiPair(precision_2_info,"(+/-)3.4e+2776511644261678652, 85 gyldige cifre");
InsertGuiPair(precision_3_info,"(+/-)6.7e+51217599719369681875006054625051616609, 258 cifre");
InsertGuiPair(precision_1_info,"(+/-)6.97...e+646457021, 26 gyldige cifre (decimaler)");
InsertGuiPair(precision_2_info,"(+/-)9.25...e+2776511644261678719, 152 gyldige cifre");
InsertGuiPair(precision_3_info,"(+/-)9.80...*10^(10^37), 306 gyldige cifre");
InsertGuiPair(overflow_during_printing,"Overflow under printning");
@ -953,13 +943,13 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(tab_convert,"ת»»");
InsertGuiPair(radio_precision_1,"С - 96 bits βÊý, 32 bits Ö¸Êý");
InsertGuiPair(radio_precision_2,"ÖÐ - 288 bits βÊý, 64 bits Ö¸Êý");
InsertGuiPair(radio_precision_3,"´ó - 864 bits βÊý, 128 bits for Ö¸Êý");
InsertGuiPair(radio_precision_2,"ÖÐ - 512 bits βÊý, 64 bits Ö¸Êý");
InsertGuiPair(radio_precision_3,"´ó - 1024 bits βÊý, 128 bits for Ö¸Êý");
InsertGuiPair(precision_1_info,"(+/-)6.9 e+646457021, 26λÓÐЧÊý×Ö(Ê®½øÖÆ)");
InsertGuiPair(precision_2_info,"(+/-)3.4e+2776511644261678652, 85λÓÐЧÊý×Ö");
InsertGuiPair(precision_3_info,"(+/-)6.7e+51217599719369681875006054625051616609, 258λÓÐЧÊý×Ö");
InsertGuiPair(precision_1_info,"(+/-)6.97...e+646457021, 26λÓÐЧÊý×Ö(Ê®½øÖÆ)");
InsertGuiPair(precision_2_info,"(+/-)9.25...e+2776511644261678719, 152λÓÐЧÊý×Ö");
InsertGuiPair(precision_3_info,"(+/-)9.80...*10^(10^37), 306λÓÐЧÊý×Ö");
InsertGuiPair(overflow_during_printing,"Êä³öʱÊý¾ÝÒç³ö");
@ -1086,13 +1076,13 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(tab_convert,"Êîíâåðòàöèÿ");
InsertGuiPair(radio_precision_1,"Ìàëàÿ - 96 áèò íà ìàíòèññó, 32 áèòà íà ïîêàçàòåëü ñòåïåíè");
InsertGuiPair(radio_precision_2,"Ñðåäíÿÿ - 288 áèò íà ìàíòèññó, 64 áèòà íà ïîêàçàòåëü ñòåïåíè");
InsertGuiPair(radio_precision_3,"Áîëüøàÿ - 864 áèò íà ìàíòèññó, 128 áèòà íà ïîêàçàòåëü ñòåïåíè");
InsertGuiPair(radio_precision_2,"Ñðåäíÿÿ - 512 áèò íà ìàíòèññó, 64 áèòà íà ïîêàçàòåëü ñòåïåíè");
InsertGuiPair(radio_precision_3,"Áîëüøàÿ - 1024 áèò íà ìàíòèññó, 128 áèòà íà ïîêàçàòåëü ñòåïåíè");
InsertGuiPair(precision_1_info,"(+/-)6.9 e+646457021, 26 çíà÷àùèõ öèôð (äåñÿòè÷íûõ)");
InsertGuiPair(precision_2_info,"(+/-)3.4e+2776511644261678652, 85 çíà÷àùèõ öèôð");
InsertGuiPair(precision_3_info,"(+/-)6.7e+51217599719369681875006054625051616609, 258 öèôð");
InsertGuiPair(precision_1_info,"(+/-)6.97...e+646457021, 26 çíà÷àùèõ öèôð (äåñÿòè÷íûõ)");
InsertGuiPair(precision_2_info,"(+/-)9.25...e+2776511644261678719, 152 çíà÷àùèõ öèôð");
InsertGuiPair(precision_3_info,"(+/-)9.80...*10^(10^37), 306 çíà÷àùèõ öèôð");
InsertGuiPair(overflow_during_printing,"Ïåðåïîëíåíèå ïðè âûâîäå");
@ -1221,13 +1211,13 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(tab_convert,"Konvertera");
InsertGuiPair(radio_precision_1,"Liten - 96 bitar för mantissan, 32 bitar för exponenten");
InsertGuiPair(radio_precision_2,"Mellan - 288 bitar för mantissan, 64 bitar för exponenten");
InsertGuiPair(radio_precision_3,"Stor - 864 bitar för mantissan, 128 bitar för exponenten");
InsertGuiPair(radio_precision_2,"Mellan - 512 bitar för mantissan, 64 bitar för exponenten");
InsertGuiPair(radio_precision_3,"Stor - 1024 bitar för mantissan, 128 bitar för exponenten");
InsertGuiPair(precision_1_info,"(+/-)6.9 e+646457021, 26 giltiga siffror (decimaler)");
InsertGuiPair(precision_2_info,"(+/-)3.4e+2776511644261678652, 85 giltiga siffror");
InsertGuiPair(precision_3_info,"(+/-)6.7e+51217599719369681875006054625051616609, 258 siffror");
InsertGuiPair(precision_1_info,"(+/-)6.97...e+646457021, 26 giltiga siffror (decimaler)");
InsertGuiPair(precision_2_info,"(+/-)9.25...e+2776511644261678719, 152 giltiga siffror");
InsertGuiPair(precision_3_info,"(+/-)9.80...*10^(10^37), 306 giltiga siffror");
InsertGuiPair(overflow_during_printing,"Overflow under printning");

View File

@ -162,17 +162,14 @@ void GetParseString(const char * buf, int line)
{
int i;
int first_line_char = SendMessage(edit, EM_LINEINDEX, line, 0);
i = SendMessage(edit, EM_LINEINDEX, line, 0);
// first_line_char takes into consideration \r\n characters
if( first_line_char < 0 )
if( i < 0 )
// something wrong
return;
// looking for the line
for(i=0 ; i<first_line_char && buf[i]!=0 ; ++i);
// looking for the beginning of the line
// looking for the beginning of the line (lines can be wrapped)
for( ; i>0 && buf[i-1]!=10 ; --i);
// copying the whole line
@ -296,13 +293,13 @@ DWORD sel_start, sel_end;
SendMessage(edit, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end);
if( sel_start != sel_end )
// something is selected
return CallWindowProc(old_edit_proc, hwnd, msg, wParam, lParam);
// putting the ENTER
LRESULT res = CallWindowProc(old_edit_proc, hwnd, msg, wParam, lParam);
if( sel_start != sel_end )
// something was selected
return res;
GetParseString();
ParseString();