Questions about Boost multiprecision library.
I have some basic startup for use questions pertaining to the Boost multiprecision library. I have downloaded the set of 64 bit .dll files successfully online, and would like some help points to help me get going. *I have heard that there are some strange results that can happen if you are quizzing multiprecision for trigonometry and try to keep using the double type. Is this true, so that I can just kee relying on the std library instead? -What is the name of the 64 bit windows .dll, or .dll files, that are the ones for the multiprecision library? -If I wish to go into arbitrary precision and scale numbers, what is the type I should use for an integer? What is the #include statement I should use, and how do I specify the number of whole number points and decimal points, before starting my operations? -If I wish to go into arbitrary precision and scale numbers, what is the type I should use for a rational number? What is the #include statement I should use, and how do I specify the number of whole number points and decimal points, before starting my operations? -For these two types, I wish to do sine, cosine, tangent, arcsine, arccosine, arctangent, base 10 logarithm, base e logarithm, power, nth root. I also want to obtain pi, but also Euler's constant, to any number of significang figure or decimal places that I would like. -If the files are separate for the function support or not, what are the 64 bit .dll files for this? What #include statements should I use?
From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of A Z via Boost-users Sent: 10 October 2018 02:56 To: boost-users@lists.boost.org Cc: A Z Subject: [Boost-users] Questions about Boost multiprecision library. Ø I have some basic startup for use questions pertaining to the Boost multiprecision library. I have downloaded the set of 64 bit .dll files successfully online, and would like some help points to help me get going. Boost.Multiprecision is a header-only library, so you should not need to consider any .dll at all. You must install all of Boost as the Getting Started instructions https://www.boost.org/doc/libs/1_68_0/more/getting_started/index.html and then make sure that you can reproduce some of multiprecision examples before you worry about the most detailed questions that you raise. boost\libs\multiprecision\example contains lots of examples that you can rebuild with your favourite tools, Visual studio, *nix, When you have go that far, I think that you will find many questions answer themselves, or are given in the comprehensive Multiprecision manual https://www.boost.org/doc/libs/1_68_0/libs/multiprecision/doc/html/index.htm... HTH Paul --- Paul A. Bristow Prizet Farmhouse Kendal UK LA8 8AB +44 (0) 1539 561830
*I have heard that there are some strange results that can happen if you are quizzing multiprecision for trigonometry and try to keep using the double type. Is this true, so that I can just kee relying on the std library instead?
Sorry don't understand the question.
-What is the name of the 64 bit windows .dll, or .dll files, that are the ones for the multiprecision library?
There are none - it's header only.
-If I wish to go into arbitrary precision and scale numbers, what is the type I should use for an *integer*? What is the #include statement I should use, and how do I specify the number of whole number points and decimal points, before starting my operations?
and how do I specify the number of whole number points and decimal
What kind of integer? Fixed precision or arbitrary precision?
Suggest you start with:
#include
-If I wish to go into arbitrary precision and scale numbers, what is the type I should use for a *rational number*? What is the #include statement I should use, and how do I specify the number of whole number points and decimal points, before starting my operations?
If you want arbitrary precision then try:
#include
-For these two types, I wish to do sine, cosine, tangent, arcsine, arccosine, arctangent, base 10 logarithm, base e logarithm, power, nth root. I also want to obtain pi, but also Euler's constant, to any number of significang figure or decimal places that I would like.
Really??? Eulers constant as an integer? I think you need to re-think that question. Best, John. --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
On 11/10/2018 06:22, John Maddock wrote:
and how do I specify the number of whole number points and decimal points,before starting my operations?
That question makes no sense for integer types.
They're probably asking about fixed-point "integers", not actual integers.
-For these two types, I wish to do sine, cosine, tangent, arcsine, arccosine, arctangent, base 10 logarithm, base e logarithm, power, nth root. I also want to obtain pi, but also Euler's constant, to any number of significang figure or decimal places that I would like.
Really??? Eulers constant as an integer? I think you need to re-think that question.
Fixed-point is generally inappropriate for these sorts of calculations (or indeed anything beyond basic arithmetic) as it induces too much rounding error. Stick to the floating-point types for these sorts of things.
participants (4)
-
A Z
-
Gavin Lambert
-
John Maddock
-
Paul A. Bristow