Unfortunately, bigint makes numeric scalars that are Perl objects (of variable
size, made up of other Perl scalars) that pretend through overloading to be
numbers. PDL does something somewhat similar, except the PDL ones are
n-dimensional arrays of C numbers, all fixed-size (at least for now).
For your particular application you may have better luck specifying the type as
ldouble. Doubling 3000 times is roughly the same as multiplying by 1e900, which
overflows double precision (max val ~1e308), but ldouble if 80 bit can go to
~1e4932. Obviously that will lose numerical precision.
Best regards,
Ed
From: Mark NanoNebulas
Sent: Saturday, September 23, 2023 6:42 PM
To: pdl-general@lists.sourceforge.net
Subject: [Pdl-general] getting bigint to work with PDL
how can we get [use bigint] to work with PDL
or is there another function that can be used
example
$xx=sequence(10);
for(0..3000) { $xx*=2; p$xx; }
it goes to infinite
is there anyway to get around this
and get the real value
-Mark Baker
___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general