Re: [Lazarus] Problem with fpc-3.0.4 and double

2018-02-02 Thread zeljko via Lazarus
On 02/02/2018 04:10 PM, Marco van de Voort wrote: On Wed, Jan 31, 2018 at 07:31:56PM +0100, zeljko via Lazarus wrote: Using binary floats, there are just too many values that can't be represented 100%, regardless of the length of the mantissa. https://en.wikipedia.org/wiki/Floating-point_arithme

Re: [Lazarus] Problem with fpc-3.0.4 and double

2018-02-02 Thread Marco van de Voort via Lazarus
On Wed, Jan 31, 2018 at 07:31:56PM +0100, zeljko via Lazarus wrote: > > Using binary floats, there are just too many values that can't be > > represented 100%, regardless of the length of the mantissa. > > https://en.wikipedia.org/wiki/Floating-point_arithmetic#Accuracy_problems > > Thanks Ralf,

Re: [Lazarus] Problem with fpc-3.0.4 and double

2018-01-31 Thread zeljko via Lazarus
On 01/31/2018 07:27 PM, Ralf Quint via Lazarus wrote: Comparing any floating point value like this is pure luck when you claim that it worked in the past. In any programming language, unless maybe you are using one that by default utilizes BCD floats. Using binary floats, there are just too ma

Re: [Lazarus] Problem with fpc-3.0.4 and double

2018-01-31 Thread Ralf Quint via Lazarus
On 1/31/2018 10:18 AM, zeljko via Lazarus wrote: Hi all, In one of my applications I'm using someDouble1 <> someDouble2 for years, now got problem with fpc-3.0.4 (all previous fpc versions were ok (3.0.2, 3.0.0, 2.6.4, 2.6.2, 2.6.0...etc) + kylix + delphi7), so now must use IsSameValue(someDou