473,498 Members | 1,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

double rounding in gui tools

Hi,

I am trying to understand why (and when) DB2 rounds double values.
Example:

(a) Using CLP, I do this query

SELECT ref_value FROM stz_target_data WHERE version = '6.2' and g_name
= 'XXX'

I get this result:

+2.17262381600000E+000

(b) I do the same thing in the Command Editor, I get:

2.173

(c) If I click on the ref_value column it shows me the value with all
its digits, but if I then export the results, they are rounded!

How can I control the rounding?

Thanks,

Alejandrina
Jan 15 '08 #1
1 1369
apattin wrote:
Hi,

I am trying to understand why (and when) DB2 rounds double values.
Example:

(a) Using CLP, I do this query

SELECT ref_value FROM stz_target_data WHERE version = '6.2' and g_name
= 'XXX'

I get this result:

+2.17262381600000E+000
This is CLI.
>
(b) I do the same thing in the Command Editor, I get:

2.173
This is JDBC

So the short answer is the server has nothing to do with it.
Maybe there is a Preferences option of sorts in the commandEditor?

Have you tried dataStudio?

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jan 15 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
1904
by: Christian Meier | last post by:
Hallo NG My problem is the deviation of the floating point datatypes. 90.625 is not exactly 90.625. It is 90.624999999.... on my system. Now I tried to find a solution for my problem but I...
31
6575
by: Bjørn Augestad | last post by:
Below is a program which converts a double to an integer in two different ways, giving me two different values for the int. The basic expression is 1.0 / (1.0 * 365.0) which should be 365, but one...
3
6713
by: Norvin Laudon | last post by:
Hi, Can somebody explain the following, from the MSDN documentation for the "System.Convert.ToInt32(double)" function <quote> Return Value value rounded to the nearest 32-bit signed...
116
35659
by: Dilip | last post by:
Recently in our code, I ran into a situation where were stuffing a float inside a double. The precision was extended automatically because of that. To make a long story short, this caused...
13
6145
by: Shirsoft | last post by:
I have a 32 bit intel and 64 bit AMD machine. There is a rounding error in the 8th digit. Unfortunately because of the algorithm we use, the errors percolate into higher digits. C++ code is...
206
13078
by: md | last post by:
Hi Does any body know, how to round a double value with a specific number of digits after the decimal points? A function like this: RoundMyDouble (double &value, short numberOfPrecisions) ...
0
7126
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7168
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7210
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7381
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5465
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4916
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3096
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3087
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
293
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.