Re: Big numbers
- From: jameskuyper <jameskuyper@xxxxxxxxxxx>
- Date: Tue, 13 Jan 2009 11:50:13 -0800 (PST)
marc wrote:
On 13 jan, 20:17, Lew Pitcher <lpitc...@xxxxxxxxxxxx> wrote:
However, the onus is on the OP to determine what "Decimal" means.
Additionally, the documentation on his DBMS API would/should provide
information on how the API converts database values ("Decimal", etc.) to C
datatypes, and what C datatypes the API will populate.
Decimal is a standard Sybase data type.
It's converted into C double data type.
It works in 99.999% of cases.
But not for this big number...
Well, that would appear to be at least part of your problem. On many
systems (including the one I'm using right now), 'double' has
insufficient precision to represent all of the significant digits in
that number. When you say "It is converted into C double data type",
you're using the passive voice, leaving it unclear what it is that is
doing the conversion. If it's being done by SYBASE, then you need to
find a way to convince SYBASE to give you the value as a long double
(how you do that is off-topic in this newsgroup). On the other hand,
if your own code performs the conversion, then the solution is to
rewrite that code to convert it to long double.
.
- References:
- Big numbers
- From: marc
- Re: Big numbers
- From: J. J. Farrell
- Re: Big numbers
- From: marc
- Re: Big numbers
- From: jameskuyper
- Re: Big numbers
- From: Lew Pitcher
- Re: Big numbers
- From: marc
- Big numbers
- Prev by Date: Re: C vs. C++
- Next by Date: Re: Big numbers
- Previous by thread: Re: Big numbers
- Next by thread: Re: Big numbers
- Index(es):
Relevant Pages
|