On Mon, Jan 15, 2018 at 08:38:15PM +0300, Mehmet Erol Sanliturk:
On Mon, Jan 15, 2018 at 5:38 PM, Yuri Pankov > wrote:
Hi,
Looking at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217149
On Mon, Jan 15, 2018 at 08:38:15PM +0300, Mehmet Erol Sanliturk wrote:
>
> When you perform floating point computations , it may be useful
> to ...
read David Goldberg's paper, "What Every Computer Scientist Should
Know about Floating-Point Arithmetic."
http://www.validlab.com/
--
Steve
On Mon, Jan 15, 2018 at 5:38 PM, Yuri Pankov wrote:
> Hi,
>
> Looking at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217149, I
> noticed that it isn't a seq(1) problem per se, rather for() and while()
> loops behaving inconsistently while using floating point, i.e.:
>
>
On Mon, Jan 15, 2018 at 02:54:59PM +, David Chisnall:
On 15 Jan 2018, at 14:49, Hans Petter Selasky wrote:
The "seq" utility should use two 64-bit integers to represent the 10-base
decimal number instead of float/double. And then you need to step this pair of integers.
On Mon, Jan 15, 2018 at 7:38 AM, Yuri Pankov wrote:
> Is this a known problem with loops and floating point numbers?
>
Yes. Many exact fractions in base-10 aren't exact in base-2, so you get
accumulation of errors based on the tiny difference and see behavior like
this. This
On 15 Jan 2018, at 14:49, Hans Petter Selasky wrote:
>
> The "seq" utility should use two 64-bit integers to represent the 10-base
> decimal number instead of float/double. And then you need to step this pair
> of integers.
As the saying goes:
> Sometimes, people think 'I
Hi,
The "seq" utility should use two 64-bit integers to represent the
10-base decimal number instead of float/double. And then you need to
step this pair of integers.
--HPS
___
freebsd-current@freebsd.org mailing list
On 01/15/18 15:38, Yuri Pankov wrote:
Hi,
Looking at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217149, I
noticed that it isn't a seq(1) problem per se, rather for() and while()
loops behaving inconsistently while using floating point, i.e.:
double i;
for (i = 1; i
Hi,
Looking at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217149, I
noticed that it isn't a seq(1) problem per se, rather for() and while()
loops behaving inconsistently while using floating point, i.e.:
double i;
for (i = 1; i <= 2.00; i += 0.1)