Re: Identify if a scalar is int, double or text

On May 12, 12:09 pm, "Dr.Ruud" <rvtol+n...@xxxxxxxxxxxx> wrote:
Klaus schreef:

That works fine, but I found out that a "monetary" value above 20
million Euros ( > 2^31 cents ) is not stored as an integer, but as a
double. As I said, it seems to work and the double seems to stick to
its "integer" properties, but I want to monitor very closely what
happens with that "double" if I grow bigger and bigger values.

Never heared of bigints?

Yes, I heard of the bigint::* modules, they construct a replacement of
all mathematical operations, but that carries an overhead and it lacks

==> time/memory overhead: bigint variables are objects.
==> lack of control: there is no logical limit to how big a bigint
can get.

I want to stay with the standard built-in "int / double" arithmetic,
but I want additional control of the transition between the (as I see
it) 3 types of numerical values:

type 1. (int)
type 2. (double, with only integral values)
type 3. (double, with free decimal values)

This control should be implemented efficiently, hence my preference
for subroutines written in C.