Arithmetic Bug ?: 0.09 + 3.9 different than 3.99

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi All,

I came across a strange situation using VB6 with SP6.

The code bellow illustrates the problem.

Debug.Print 0.09 + 1.9 = 1.99 True
Debug.Print 0.09 + 2.9 = 2.99 True
Debug.Print 0.09 + 3.9 = 3.99 False
Debug.Print 0.09 + 4.9 = 4.99 False
Debug.Print 0.09 + 5.9 = 5.99 True

Does anyone know why is this happening and if there is a way to avoid it ?

TIA,
Paulo


.



Relevant Pages

  • Re: Unexpected error number 380 has occurred: Invalid property val
    ... I've the same problem when using PDW, ... I've reinstall the VB6 and SP6. ... > This posting is provided “AS IS” with no warranties, and confers no rights. ...
    (microsoft.public.vb.bugs)
  • Re: MSADOCDC.OCX could not be loaded
    ... Are you attempting to use SP6 on a Win98se ... Un-install VB6 ... Install VS6 SP3 ... Thanks for your help Ralph, ...
    (microsoft.public.vb.database.ado)
  • Re: MSADOCDC.OCX could not be loaded
    ... During the VB6 install did it give any ... Are you attempting to use SP6 on a Win98se ... Why not try a re-install with SP5. ...
    (microsoft.public.vb.database.ado)
  • Re: Problem mit SP6
    ... > Klaus Ketelaer schrieb: ... und VB6 von der Visual-Studio CD aufgespielt. ... > denn SP6 wenig, bis gar nichts zu tun haben. ... Die Anwendungen melden den Fehler ...
    (microsoft.public.de.vb)
  • VB6 Anwendung luft auf einem XP Rechner nicht mehr
    ... seit 2 Tagen luft auf einem XP Rechner eine VB6 Anwendung ... Das Startformular wird noch geladen (da befinden sich auch ... Es gibt keine Controls aus dem SP6. ... Ich kann den Fehler nicht nachstellen. ...
    (microsoft.public.de.vb)