in reply to bc within perl

Hello amudelkaa, and welcome to the Monastery!

I am using bc because the numbers I am using are beyond 64bit in size.

Please note that Perl has core modules to handle arbitrary-size numbers:

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Replies are listed 'Best First'.
Re^2: bc within perl
by amudelkaa (Novice) on Nov 08, 2016 at 09:32 UTC
    I did try BigInt prior to this. That has a restriction of 64bit binary and doesn't support beyond that. I am not sure on BigFloat nor BigRat. The numbers I have in mind are going to be at most 73bits and I couldn't find a better alternative to 'bc' so far.
      > That has a restriction of 64bit binary

      Are you sure?

      perl -Mbigint -wE 'say 12345678912345678912345678912345678912345678912 +3456789123456789 ** 1234'
        So this is bigint and not BigInt? Because when I tried doing the same with BigInt, the data hit the ceiling of xffffffffffffffff.