[Gambas-bugtracker] Bug #1508: Inconsistant Round behavior on Float
bugtracker at gambaswiki.org
bugtracker at gambaswiki.org
Mon Jan 14 22:14:10 CET 2019
http://gambaswiki.org/bugtracker/edit?object=BUG.1508&from=L21haW4-
Damien COTTIER reported a new bug.
Summary
-------
Inconsistant Round behavior on Float
Type : Bug
Priority : Medium
Gambas version : Unknown
Product : Unknown
Description
-----------
Rounding float in math should give:
3.150* => 3.2
3.149* => 3.1
Code
Print Round(3.150000, -1)
Print Round(3.1500, -1)
Print Round(3.15, -1)
Output in gambas 3.11.4
3,1
3,2
3,1
System information
------------------
[System]
Gambas=3.11.4
OperatingSystem=Linux
Kernel=3.18.0-18546-g285bb8d836e6
Architecture=x86_64
Distribution=Ubuntu 16.04.5 LTS
Desktop=UNITY
Theme=Gtk
Language=fr_FR.UTF-8
Memory=3895M
[Libraries]
Cairo=libcairo.so.2.11400.6
Curl=libcurl.so.4.4.0
DBus=libdbus-1.so.3.14.6
GStreamer=libgstreamer-1.0.so.0.803.0
GTK+2=libgtk-x11-2.0.so.0.2400.30
GTK+3=libgtk-3.so.0.1800.9
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.58.0.0
QT4=libQtCore.so.4.8.7
QT5=libQt5Core.so.5.5.1
SDL=libSDL-1.2.so.0.11.4
SQLite=libsqlite3.so.0.8.6
[Environment]
CLUTTER_IM_MODULE=xim
COMPIZ_BIN_PATH=/usr/bin/
COMPIZ_CONFIG_PROFILE=ubuntu
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-4ZtPgOCEau,guid=d1130118b211fb22164edd385c2bc8d7
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
DESKTOP_SESSION=ubuntu
DISPLAY=:1
GB_GUI=gb.qt4
GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/gambas3.desktop
GIO_LAUNCHED_DESKTOP_FILE_PID=8388
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
GTK2_MODULES=overlay-scrollbar
GTK_IM_MODULE=ibus
GTK_MODULES=unity-gtk-module:gail:atk-bridge
HOME=<home>
LANG=fr_FR.UTF-8
LANGUAGE=fr:en
LOGNAME=<user>
MAIL=/var/mail/<user>
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
PATH=<home>/bin:<home>/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin:/sbin
PWD=<home>
QT4_IM_MODULE=xim
QT_ACCESSIBILITY=1
QT_IM_MODULE=ibus
QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
QT_QPA_PLATFORMTHEME=appmenu-qt5
SESSION_MANAGER=local/<hostname>:@/tmp/.ICE-unix/6430,unix/<hostname>:/tmp/.ICE-unix/6430
SHELL=/bin/bash
SSH_AGENT_PID=6471
SSH_AUTH_SOCK=/tmp/ssh-lGe7fwnueVXr/agent.6430
TERM=xterm-256color
TZ=:/etc/localtime
UBUNTU_MENUPROXY=1
USER=<user>
WINDOWPATH=7
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
XDG_CURRENT_DESKTOP=Unity
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop
XDG_MENU_PREFIX=gnome-
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=Unity
XDG_SESSION_TYPE=x11
XMETHOD=xorg
XMODIFIERS=@im=ibus
More information about the Bugtracker
mailing list