bug-bash
[Top][All Lists]
Advanced

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

Re: [the result of $[23**15] is wrong]


From: Robert Elz
Subject: Re: [the result of $[23**15] is wrong]
Date: Mon, 11 Jul 2022 22:41:40 +0700

    Date:        Mon, 11 Jul 2022 22:10:38 +0800 (CST)
    From:        root@ROCKY8-5-WL.localdomain
    Message-ID:  <20220711141038.BE1E299F00@ROCKY8-5-WL.localdomain>

Should we be attempting to reply to root@ROCKY8-5-WL.localdomain ?

I'm not going to bother.

  | [root@ROCKY8-5-02 ~]#echo $[23**15]
  | 8380818432457522983

In addition to what Chet & Greg said:

jacaranda$ echo '(23^15) % (2^64)' | bc
8380818432457522983

So, given the 64 bit limitation the answer is quite good...

kre

ps: Isn't $[ supposed to be obsolete?





reply via email to

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