> > I wouldn't say magical. Disillusioning maybe :-) > > 0.21 is not exactly representable with a finite number of bits. That's > why you should expect errors when computing with it. When you multiply, > the absolute error can get relatively large, obviously. >
This probably has something to do with floating point errors, but not sure it's that simple. This is the exact presentation of value 59.535 with 64 bits: 59.534999999999996589394868351519107818603515625 And... ? round(59.534999999999996589394868351519107818603515625, -2) 59,54 ? round(59.53499999999999, -2) 59,54 This seems to be where Gambas cut off: ? round(59.5349999999999, -2) 59,53 If I have understand right Gambas does cut off to the presentation when they are shown, but the whole accuracy is intact in memory. So maybe cut off is done in wrong order in Round(). Jussi ------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user