On Wed, 30 Sep 2015 13:06:56 +0200, Andrea Mauri <[email protected]>
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
[email protected]
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus