help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] floating point arithmetic


From: John McKown
Subject: Re: [Help-bash] floating point arithmetic
Date: Mon, 30 Oct 2017 15:38:06 -0500

On Mon, Oct 30, 2017 at 3:19 PM, Jerry <address@hidden> wrote:

> I was told that "bash" does not support floating point arithmetic. I was
> wondering if there are any plans to change that in future releases?
>

​Gee, I never knew that. My work around would be something like:

$ x=1.1
$ echo $x
1.1
$ y=2.2
$ echo $y
2.2
$ z=$(echo "${x} + ${y}" | bc)
$ echo $z
3.3
​



>
> Thanks!
>
> --
> Jerry
>
>


-- 
I have a theory that it's impossible to prove anything, but I can't prove
it.

Maranatha! <><
John McKown


reply via email to

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