[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MPFRCPP] Re: MPFRCPP Question
From: |
Alexey Beshenov |
Subject: |
[MPFRCPP] Re: MPFRCPP Question |
Date: |
Wed, 5 Dec 2007 09:47:21 +0300 |
User-agent: |
KMail/1.9.5 |
On Wednesday 05 December 2007 08:52, Vladan Bozic wrote:
> I am planning on storing all constants used by my procedures in a
> separate file and this is where I encounter some problems.
> [...]
> const Real ktab19_3 =
> 0.3173792625963528200426948557929716065822159652762980415259019731018799499
>5063706220066472607895786721425182565276490599701898980808436994071610337023
>3;
> [...]
> Once ran, the main procedure outputs:
> 3.1737926259635280e-01
> which is a lot less of digits then I require.
C++ doesn't know anything about arbitrary precision numbers, so your
definition is treated as a double precision number converted to MPFR type.
You should store constants as strings. It's important not only for high
precision numbers but also for non-integer numbers which are not represented
as finite binary fractions.
--
Alexey Beshenov <address@hidden>
http://beshenov.ru/
pgpp2YD0TZVSh.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [MPFRCPP] Re: MPFRCPP Question,
Alexey Beshenov <=