Working with huge Floating Point Numbers
-
Hello, I need a class which I can work with a huge floating point numbers and make an operations with them like *-/+ for example: 122354554654549878987.003253265465454597 * 65465465456654564.3212154654 I need something like this http://www.codeproject.com/cpp/largenumber.asp[^] but with floating point numbers. Is there any class like I want?
SnaidiS(Semion)
-
Hello, I need a class which I can work with a huge floating point numbers and make an operations with them like *-/+ for example: 122354554654549878987.003253265465454597 * 65465465456654564.3212154654 I need something like this http://www.codeproject.com/cpp/largenumber.asp[^] but with floating point numbers. Is there any class like I want?
SnaidiS(Semion)
-
Hello, I need a class which I can work with a huge floating point numbers and make an operations with them like *-/+ for example: 122354554654549878987.003253265465454597 * 65465465456654564.3212154654 I need something like this http://www.codeproject.com/cpp/largenumber.asp[^] but with floating point numbers. Is there any class like I want?
SnaidiS(Semion)
a little Googling turns up a few high-precision floating point libs for C++.
image processing toolkits | batch image processing | blogging
-
a little Googling turns up a few high-precision floating point libs for C++.
image processing toolkits | batch image processing | blogging
-
do you think http://savannah.nongnu.org/projects/hpalib[^] will fulfill my requirements I mentioned?
SnaidiS(Semion)
it says it can handle numbers in the range: 2^16384 > x > 2^[-16383] that's far greater than the numbers you gave in your post
image processing toolkits | batch image processing | blogging
-
it says it can handle numbers in the range: 2^16384 > x > 2^[-16383] that's far greater than the numbers you gave in your post
image processing toolkits | batch image processing | blogging
I have problems with the files. I added the src folder to the project like that: Tools->Options->Projects And Solutions->VC++ Directories-> and to included files and source files. I'll show you here the most important code:
#include "stdafx.h" #include "num.h" #include "numDlg.h" #include "stdio.h" #include "xpre.h" BOOL CnumDlg::OnInitDialog() { CDialog::OnInitDialog(); CnumDlg::play(); return TRUE; // return TRUE unless you set the focus to a control } void CnumDlg::play() { struct xpr s; int i,n; s=xZero; do { scanf("%d",&n); s=xZero; for(i=0;i<=n;i++) s=xadd(s,xpr2(xOne,i),0); xprxpr(s,30); putchar('\n'); }while (n>0); }
I earased the most of the code-just the important there. After I'm running the program I have the following Errors:1>numDlg.obj : error LNK2019: unresolved external symbol _xprxpr referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ) 1>numDlg.obj : error LNK2019: unresolved external symbol _xadd referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ) 1>numDlg.obj : error LNK2019: unresolved external symbol _xpr2 referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ) 1>numDlg.obj : error LNK2001: unresolved external symbol _xOne 1>numDlg.obj : error LNK2001: unresolved external symbol _xZero 1>C:\Documents and Settings\Semion Naidis\My Documents\Visual Studio 2005\Projects\num\Debug\num.exe : fatal error LNK1120: 5 unresolved externals
How can I fix that?SnaidiS(Semion)
-
I have problems with the files. I added the src folder to the project like that: Tools->Options->Projects And Solutions->VC++ Directories-> and to included files and source files. I'll show you here the most important code:
#include "stdafx.h" #include "num.h" #include "numDlg.h" #include "stdio.h" #include "xpre.h" BOOL CnumDlg::OnInitDialog() { CDialog::OnInitDialog(); CnumDlg::play(); return TRUE; // return TRUE unless you set the focus to a control } void CnumDlg::play() { struct xpr s; int i,n; s=xZero; do { scanf("%d",&n); s=xZero; for(i=0;i<=n;i++) s=xadd(s,xpr2(xOne,i),0); xprxpr(s,30); putchar('\n'); }while (n>0); }
I earased the most of the code-just the important there. After I'm running the program I have the following Errors:1>numDlg.obj : error LNK2019: unresolved external symbol _xprxpr referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ) 1>numDlg.obj : error LNK2019: unresolved external symbol _xadd referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ) 1>numDlg.obj : error LNK2019: unresolved external symbol _xpr2 referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ) 1>numDlg.obj : error LNK2001: unresolved external symbol _xOne 1>numDlg.obj : error LNK2001: unresolved external symbol _xZero 1>C:\Documents and Settings\Semion Naidis\My Documents\Visual Studio 2005\Projects\num\Debug\num.exe : fatal error LNK1120: 5 unresolved externals
How can I fix that?SnaidiS(Semion)
you'll need to either provide definitions for those functions, or remove the calls to them.
-
you'll need to either provide definitions for those functions, or remove the calls to them.
I gave a definitions for those functions here:
// numDlg.h : header file // #include "xpre.h" #pragma once // CnumDlg dialog class CnumDlg : public CDialog { // Construction public: CnumDlg(CWnd* pParent = NULL); // standard constructor void CnumDlg::play(); _**struct xpr xadd (struct xpr a, struct xpr b, int k); struct xpr xpr2 (struct xpr s, int n); void xprxpr (struct xpr u, int m);**_
I have the almost the same problem...1>numDlg.obj : error LNK2019: unresolved external symbol "public: void __thiscall CnumDlg::xprxpr(struct xpr,int)" (?xprxpr@CnumDlg@@QAEXUxpr@@H@Z) referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ) 1>numDlg.obj : error LNK2019: unresolved external symbol "public: struct xpr __thiscall CnumDlg::xadd(struct xpr,struct xpr,int)" (?xadd@CnumDlg@@QAE?AUxpr@@U2@0H@Z) referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ) 1>numDlg.obj : error LNK2019: unresolved external symbol "public: struct xpr __thiscall CnumDlg::xpr2(struct xpr,int)" (?xpr2@CnumDlg@@QAE?AUxpr@@U2@H@Z) referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ) 1>numDlg.obj : error LNK2001: unresolved external symbol _xOne
And if I'm trying to define it the xZero and xOne too(extern const struct xpr xZero, xOne, xTwo, xTen;)I have the following errors: 1>c:\documents and settings\semion naidis\my documents\visual studio 2005\projects\num\num\numdlg.h(17) : error C2071: 'CnumDlg::xZero' : illegal storage class 1>c:\documents and settings\semion naidis\my documents\visual studio 2005\projects\num\num\numdlg.h(17) : error C2071: 'CnumDlg::xOne' : illegal storage class 1>c:\documents and settings\semion naidis\my documents\visual studio 2005\projects\num\num\numdlg.h(17) : error C2071: 'CnumDlg::xTwo' : illegal storage class 1>c:\documents and settings\semion naidis\my documents\visual studio 2005\projects\num\num\numdlg.h(17) : error C2071: 'CnumDlg::xTen' : illegal storage class
What should I do?SnaidiS(Semion)
-
I gave a definitions for those functions here:
// numDlg.h : header file // #include "xpre.h" #pragma once // CnumDlg dialog class CnumDlg : public CDialog { // Construction public: CnumDlg(CWnd* pParent = NULL); // standard constructor void CnumDlg::play(); _**struct xpr xadd (struct xpr a, struct xpr b, int k); struct xpr xpr2 (struct xpr s, int n); void xprxpr (struct xpr u, int m);**_
I have the almost the same problem...1>numDlg.obj : error LNK2019: unresolved external symbol "public: void __thiscall CnumDlg::xprxpr(struct xpr,int)" (?xprxpr@CnumDlg@@QAEXUxpr@@H@Z) referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ) 1>numDlg.obj : error LNK2019: unresolved external symbol "public: struct xpr __thiscall CnumDlg::xadd(struct xpr,struct xpr,int)" (?xadd@CnumDlg@@QAE?AUxpr@@U2@0H@Z) referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ) 1>numDlg.obj : error LNK2019: unresolved external symbol "public: struct xpr __thiscall CnumDlg::xpr2(struct xpr,int)" (?xpr2@CnumDlg@@QAE?AUxpr@@U2@H@Z) referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ) 1>numDlg.obj : error LNK2001: unresolved external symbol _xOne
And if I'm trying to define it the xZero and xOne too(extern const struct xpr xZero, xOne, xTwo, xTen;)I have the following errors: 1>c:\documents and settings\semion naidis\my documents\visual studio 2005\projects\num\num\numdlg.h(17) : error C2071: 'CnumDlg::xZero' : illegal storage class 1>c:\documents and settings\semion naidis\my documents\visual studio 2005\projects\num\num\numdlg.h(17) : error C2071: 'CnumDlg::xOne' : illegal storage class 1>c:\documents and settings\semion naidis\my documents\visual studio 2005\projects\num\num\numdlg.h(17) : error C2071: 'CnumDlg::xTwo' : illegal storage class 1>c:\documents and settings\semion naidis\my documents\visual studio 2005\projects\num\num\numdlg.h(17) : error C2071: 'CnumDlg::xTen' : illegal storage class
What should I do?SnaidiS(Semion)
it's hard for me to say. i suggest you try to contact the authors of the class to see if they have any documentation that can help.
image processing toolkits | batch image processing | blogging
-
it's hard for me to say. i suggest you try to contact the authors of the class to see if they have any documentation that can help.
image processing toolkits | batch image processing | blogging
-
i don't have any libraries of this type. try Google.
image processing toolkits | batch image processing | blogging