debug.print 183 - 173.55
- From: "xgold" <xanghel@xxxxxxxxx>
- Date: Wed, 29 Nov 2006 00:19:40 +0200
i have visual basig 6
if i type in the debug window it gives me a strange result
debug.print 183 - 173.55
9.44999999999999
why this result instead of 9.45
the same is happening if i do
a = 183
b = 173.55
c = a-b
debug.print c
if i do 183 - 174.55 or 183 - 180.55 the same strange thing happen. ( with
..449999999 instead of .45 )why and how to avoid this?
if you try this with windows standard calculator it gives the right answer.
ty
.
- Follow-Ups:
- Re: debug.print 183 - 173.55
- From: Ken Halter
- Re: debug.print 183 - 173.55
- Prev by Date: Re: UpDown Control(s) turns into PictureBox(s)
- Next by Date: Re: debug.print 183 - 173.55
- Previous by thread: Re: UpDown Control(s) turns into PictureBox(s)
- Next by thread: Re: debug.print 183 - 173.55
- Index(es):