[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas


http://gambaswiki.org/bugtracker/edit?object=BUG.2921&from=L21haW4-

Comment #5 by Christof THALHOFER:

So it's not a bug in the representation of Postgresql float but Float itself is buggy:

Public Sub Main()

  Dim f As Float
  f = 19.900000000000099
  Print f ' = 20

  f = Round(f, -2)
  Print f  ' = 20


  'and for zxMarce:
  
  f = 4.85
  
  f = Round(f, -2)
  Print f  ' = 4.85

End


----[ Gambas bugtracker-list is hosted by https://www.hostsharing.net ]----