From iuc@r @ending from fedor@project@org  Fri Aug 31 17:31:19 2018
From: iuc@r @ending from fedor@project@org (=?UTF-8?Q?I=C3=B1aki_Ucar?=)
Date: Fri, 31 Aug 2018 17:31:19 +0200
Subject: [Rd] compairing doubles
In-Reply-To: <e275b09d-39c8-a7e2-fc11-30c00034d1e4@insa-toulouse.fr>
References: <AM0PR0502MB387404BC690F9AF421B6F5EAD6080@AM0PR0502MB3874.eurprd05.prod.outlook.com>
 <CALEXWq3wSS4uaYu33oA-KUu7gSBuqKYF0ESemwvsbmp6KktOJg@mail.gmail.com>
 <95F39593-22F4-46B6-A766-8FF60F608C0C@dans.knaw.nl>
 <CAOKDuOgykFYMA-ZT4kUxr_NKXBEBsxZV8s-3sAuQ3Motc5M_Fw@mail.gmail.com>
 <CALEXWq2ke081QLqbv89z=yfTuoocLw9dzQWx6-05gzSFqAD3vQ@mail.gmail.com>
 <CAOKDuOg5bA0Uf5bmQX_9ZP6qbnO=hewb7cVbjEEZEvu5KOGC5w@mail.gmail.com>
 <e275b09d-39c8-a7e2-fc11-30c00034d1e4@insa-toulouse.fr>
Message-ID: <CALEXWq3hNdLZwf9v=YZNTJ1FjTJfN6xuuUeSZ-zyZq1Sp+8yKA@mail.gmail.com>

El vie., 31 ago. 2018 a las 17:08, Serguei Sokol
(<sokol at insa-toulouse.fr>) escribi?:
>
> Le 31/08/2018 ? 16:25, Mark van der Loo a ?crit :
> > Ah, my bad, you're right of course.
> >
> > sum(abs(diff(diff( sort(x))))) < eps
> >
> > for some reasonable eps then, would do as a oneliner, or
> >
> > all(abs(diff(diff(sort(x)))) < eps)
> >
> > or
> >
> > max(abs(diff(diff(sort(x))))) < eps
> Or with only four function calls:
> diff(range(diff(sort(x)))) < eps

We may have a winner... :)

I?aki



[Rd] compairing doubles
=?UTF-8?Q?I=C3=B1aki_Ucar?=