in reply to Re: Division of big integers
in thread Division of big integers

Wait, let me save a little time for everyone:

Re^2: Division of big integers by harangzsolt33
I'm aware, but bigint doesn't work in TinyPerl 5.8 (justification) (justification)
Re^3: Division of big integers by LanX
Are you seriously going to waste the time to (rant) (rant)
Re^4: Division of big integers by harangzsolt33
It's not my fault that you will never realize the brilliance of TinyPerl (etc) (etc) Windows XP (etc)

Re-implementing big-int math from scratch in decimal ascii is a small price to pay.
Re^5: Division of big integers by LanX
I'm done with this. Why do you keep posting about (rant) (rant)

Re^5: Division of big integers by NERDVANA
So... on your page about how to install Windows XP I see that in addition to TinyPerl you also install Python 3.4

One easy fix could then be
sub bigint_divide { my ($numerator, $divisor)= @_; chomp(my $ret= `python3.exe -c "print(int('$numerator')/int('$diviso +r'))"`); $ret; }

Now everyone can get back to their holiday partying!

Happy New Year!

Replies are listed 'Best First'.
Re^3: Division of big integers
by karlgoethebier (Abbot) on Jan 01, 2025 at 00:04 UTC
      2025--

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      see Wikisyntax for the Monastery

      PS: Granted I'm bitching about a lot of stuff, but I don't think TinyPerl is part of it. That slot is taken by others. =)

      I literally wanted to know if he's aware.

      Even if he wants to reinvent this wheel for his tiny thingy, those modules are in Pure Perl, so "borrowing" code shouldn't be too hard. (If it's not already running out of the box)

Re^3: Division of big integers
by etj (Priest) on Jan 01, 2025 at 04:10 UTC
    NERDVANA, you are the wind beneath my wings.
Re^3: Division of big integers
by LanX (Saint) on Dec 31, 2024 at 22:31 UTC
Re^3: Division of big integers
by harangzsolt33 (Deacon) on Jan 01, 2025 at 04:44 UTC
    I think, the conversation would have unfolded differently. But it's New Year's Eve, so let's party. Btw I haven't started learning Python yet. First I want to become a lot more familiar with Perl. I might learn Python one day, but I keep putting it off. Honestly, I hate its syntax.

      One thing I was maybe wrong about was BigInt not working for TinyPerl. I assumed it would need a .dll that didn't ship with TinyPerl, but LanX pointed out that Perl's Math::BigInt is in fact pure-perl, so you just need to put the 5.8 version of Math/BigInt.pm file (and maybe bigint.pm for the pragma) in your lib path and it might just work.

      Part of my joke is that you have the full version of Python installed but only half of Perl installed... so you might reconsider your motivations for that some time. Yes Perl comes with a lot of bloat modules, but I wouldn't classify BigInt or BigFloat or BigRat as part of the "bloat".