bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: +=() can be used to set illegal indices


From: Greg Wooledge
Subject: Re: +=() can be used to set illegal indices
Date: Tue, 4 Jul 2023 08:00:53 -0400

On Tue, Jul 04, 2023 at 10:40:26AM +0200, alex xmb ratchev wrote:
> On Tue, Jul 4, 2023, 01:52 Chet Ramey <chet.ramey@case.edu> wrote:
> 
> > On 7/3/23 5:56 PM, alex xmb ratchev wrote:
> >
> > > looked into non finite number libs ?
> > > gawk like .. ?
> >
> > bignums? No. intmax_t is enough for the shell.
> >
> 
> yea , bignums .. sad
> .. greets

Seriously, why would you need this inside a shell?  You have access to
bc(1) if your mostly-bash project requires it.

I could see an argument for adding floating point arithmetic, as I
believe one of the Korn shells does, but not bignums.

If you want a scripting language with bignums, there are others -- like
Tcl, for example.

unicorn:~$ tclsh
% expr {2**63}
9223372036854775808
% expr {1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19*20*21*22}
1124000727777607680000



reply via email to

[Prev in Thread] Current Thread [Next in Thread]