[Lazarus] samevalue function issue

Virgo Pärna virgo.parna at mail.ee
Wed Sep 30 15:28:41 CEST 2015


On Wed, 30 Sep 2015 13:06:56 +0200, Andrea Mauri <andrea.mauri.75 at gmail.com> wrote:
> Dear all,
>
> I am using samevalue function provided with fpc (math unit).
> I am using samevalue instead of = in order to avoid problems related to 
> precision.
>

	Why are you not using your own epsilon value?


>    if samevalue(a, 5.1) then             // I get FALSE -- I supposed to 
> get TRUE- bad!

	Could you try 
samevalue(a, Double(5.1)) 
instead?


-- 
Virgo Pärna 
virgo.parna at mail.ee





More information about the Lazarus mailing list