On Tue, Jun 4, 2024 at 4:01 PM Saint Michael wrote:
>
> >
> > It's time to add floating point variables and math to bash.
>
> It just makes so much easier to solve business problems without external
> calls to bc or Python.
> Please let's overcome the "shell complex". Let's treat bash a real langu
Date:Wed, 5 Jun 2024 08:40:51 -0400
From:Zachary Santer
Message-ID:
| The magnification factor is handled as a
| fractional number - 1.5, 1.75, etc. So, to change the magnification
| factor by increments of 0.25 or 0.5, I had to print an expression into
| b
On Wed, Jun 05, 2024 at 09:57:26PM +0700, Robert Elz wrote:
> Also note that to actually put floating support in the shell, more is
> needed than just arithmetic, you also need floating comparisons in test
> (or in bash, in [[ ) and a whole bunch more odds and ends that aren't
> obvious until you n
2024年6月5日(水) 21:41 Zachary Santer :
> Bash could potentially detect floating point literals within
> arithmetic expansions and adjust the operations to use floating point
> math in that case. [...]
ksh and zsh are already behaving in that way, and if Bash would
support the floating-point arithmeti
Date:Wed, 5 Jun 2024 11:09:45 -0400
From:Greg Wooledge
Message-ID:
| > to convert floats back into integers again, controlling how
| > rounding happens).
|
| Ironically, that last one is the one we already *do* have.
Yes, I know about printf (and while POSIX
Hello!
I would like to report an issue with bash version >=5.2.
For years, I have had the following line in my ~/.bashrc:
export HISTTIMEFORMAT="[$(tput setaf 6)%F %T$(tput sgr0)]: " # colorful date
This worked perfectly up to and including bash version 5.1.0(16).
However, since bash versio
the most obvious use of floating variables would be to compare
balances and to branch based on if a balance is lower than a certain
value
I use:
t=$(python3 -c "import math;print($balance > 0)")
and the
if [ "$t" == "False" ];then
echo "Result <= 0 [$t] Client $clname $clid Balance $balance"
fi
The
On Wed, Jun 05, 2024 at 01:31:20PM -0400, Saint Michael wrote:
> the most obvious use of floating variables would be to compare
> balances and to branch based on if a balance is lower than a certain
> value
> I use:
> t=$(python3 -c "import math;print($balance > 0)")
> and the
> if [ "$t" == "False
I think that we should do this in the shell. I mean. It will get done at
some point, in the next decades or centuries. Why not do it now? Let's
compile some C library or allow inline C
On Wed, Jun 5, 2024, 2:12 PM Greg Wooledge wrote:
> On Wed, Jun 05, 2024 at 01:31:20PM -0400, Saint Michael wro
Date:Wed, 5 Jun 2024 13:31:20 -0400
From:Saint Michael
Message-ID:
| the most obvious use of floating variables would be to compare
| balances and to branch based on if a balance is lower than a certain
| value
In addition to what Greg suggested, for the very
Le 05/06/2024 à 17:09, Koichi Murase écrivait :
2024年6月5日(水) 21:41 Zachary Santer :
Bash could potentially detect floating point literals within
arithmetic expansions and adjust the operations to use floating point
math in that case. [...]
ksh and zsh are already behaving in that way, and if B
11 matches
Mail list logo