bug-bash
[Top][All Lists]
Advanced

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

Re: REQUEST - bash floating point math support


From: Léa Gris
Subject: Re: REQUEST - bash floating point math support
Date: Mon, 17 Jun 2024 08:56:19 +0200
User-agent: Mozilla Thunderbird

Le 16/06/2024 à 23:44, Zachary Santer écrivait :
How do you propose to take an LC_NUMERIC-formatted floating-point
literal and assign it to a variable with the numeric flag or make use
of it in another type of arithmetic context?

This proposal does not include conversion of locale formatted literals.

Anyway, this could be handled with existing bash string replacement feature:

localeFormatted=3,1415
declare -i numvar=${localeFormatted/,/.}


--
Léa Gris


reply via email to

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