[Gambas-user] Possible bug in round() function
Ricardo Díaz Martín
oceanosoftlapalma at ...626...
Thu Jan 30 11:33:42 CET 2014
Hi guys,
Try to do this in the gambas console:
? round (283.5 * 0.21, -2)
59,53
? 283.5 * 0.21
59,535
? round(59.535, -2)
59,54
Why round (283.5 * 0.21, -2) doesn't works as expected? (or as I
expected...)
I got the same wrong behavior in my program using something like fAux =
round(fNumber1, fNumber2, -2)
Regards,
Ricardo Díaz
[System]
Gambas=3.5.90
OperatingSystem=Linux
Kernel=3.11-2-amd64
Architecture=x86_64
Distribution=debian jessie/sid
Desktop=KDE4
Theme=Oxygen
Language=es_ES.UTF-8
Memory=994M
[Libraries]
Cairo=libcairo.so.0.0.0
Cairo=libcairo.so.2.11200.16
Curl=libcurl.so.4.3.0
DBus=libdbus-1.so.3.7.6
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.201.0
GTK+=libgtk-x11-2.0.so.0.2400.22
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.19.0.0
Qt4=libQtCore.so.4.8.6
SDL=libSDL-1.2.so.0.11.4
More information about the User
mailing list