On Tue, Jul 04, 2023 at 10:40:26AM +0200, alex xmb ratchev wrote: > On Tue, Jul 4, 2023, 01:52 Chet Ramey <chet.ra...@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