64 bit
Mike or Penny Novack
stepbystepfarm at mtdata.com
Fri Jul 25 15:13:14 EDT 2014
> On 25/07/14 08:46, John Ralls wrote:
>
>> It might be. I don't think anyone has tried. Mingw64 would be
>> required. Note that I also don't think that there's any good reason
>> to, as GnuCash's data fits easily in a 32-bit address space.
>
> This is pure curiosity, but the maximum value of a 32 bit signed
> integer is 2,147,483,647, so if that were cents it would represent
> $21,474,836.47. My bank balance will never grow that high, worse luck,
> but a medium sized business might have totals of that order. Does
> Gnucash use multi-word data types to handle this, or would it cause an
> error?
>
> John Dablin
You have hit the nail on the head. It would likely NOT help very much to
simply recompile the existing C code with a 64 bit compiler because the
existing code would have been written assuming 32 bit. C is odd in one
regard. You are guaranteed that "integer" is not shorter than "short
integer" and that "long integer" is not shorter than "integer" and that
"short integer" is at least two bytes. That's all. A typical 32 bit
compiler has short = two bytes, integer = four bytes, and long also = 4
bytes. So IF in some place longer integers were needed would have been
written as multiple precision. And no compiler going to be clever enough
to rewrite that code if "long" has become as long as the multiple
precision integer. And where that doesn't apply, not going to gain by
going to 64 bits.
Rewriting so the code were conditional depending on whether being
complied 32 or 64 bit is a fair bit of work << I've never written code
for conditional compiling but have for conditional assembly so know what
it's like >>
Michael D Novack
More information about the gnucash-user
mailing list