Hi,
Inserting number 99999.99 into a FLOAT 17 16 field results in
9.99999900....5 E+004 being inserted into the base.
What is confusing me is the digit 5 that appears at the end of the
number. Where does it come from and what does it mean? I have tried to
find something by searching about rounding, but so far didn't find
anything helpful.
If I insert number 99999.00, I don't get the number 5 at the end. 2 2307 si*********@gma il.com wrote:
Hi,
Inserting number 99999.99 into a FLOAT 17 16 field results in
9.99999900....5 E+004 being inserted into the base.
What is confusing me is the digit 5 that appears at the end of the
number. Where does it come from and what does it mean? I have tried to
find something by searching about rounding, but so far didn't find
anything helpful.
If I insert number 99999.00, I don't get the number 5 at the end.
I don't know what a "FLOAT 17 16 field" is supposed to be, but I assume you
see quite normal rounding differences related to floating point numbers.
Are you aware of this article? http://docs.sun.com/source/806-3568/ncg_goldberg.html It explains a few
things that you should really know when dealing with floating point
numbers.
--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Knut Stolze je napisao/la:
si*********@gma il.com wrote:
Hi,
Inserting number 99999.99 into a FLOAT 17 16 field results in
9.99999900....5 E+004 being inserted into the base.
What is confusing me is the digit 5 that appears at the end of the
number. Where does it come from and what does it mean? I have tried to
find something by searching about rounding, but so far didn't find
anything helpful.
If I insert number 99999.00, I don't get the number 5 at the end.
I don't know what a "FLOAT 17 16 field" is supposed to be, but I assume you
see quite normal rounding differences related to floating point numbers.
FLOAT field of length 17 and scale 16. Length is number of digits and
scale is number of digits to the right of the decimal point. This is
DB2 for iSeries, so those may be called differently in other versions.
Are you aware of this article? http://docs.sun.com/source/806-3568/ncg_goldberg.html It explains a few
things that you should really know when dealing with floating point
numbers.
Thanks for the link. The article is lengthy so I've just skimmed it,
but this thing I am seeing could be the "guard digit" that is
mentioned there. Not sure. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: 1111111111 |
last post by:
Here is what I need to do...
I need to enter a 5 digit number from 11111 to 99999 and have the
output look like this.. Example I enter 12345..It needs to look like
this when it outputs.
1 2 3 4 5 (each number needs to be 3 spaces apart)
Here is my code so far thanks for everyone help!!!
Thanks for the input everyone!! Here is what i have so far. I AM NEW
TO THIS SO DONT BASH ME!!! :)
|
by: xixi |
last post by:
hi, we are running db2 udb v8.1 on windows, when i try to retrieve a
view's data , i get the error SQL10007N Message "99999" could not be
retrieved. Reason code:
"4". what is message 99999? i know the view is based on the table, so
i do inspect on the table
db2 => inspect check table name oeptoly schema njipd for error state
all results keep results.txt on all dbpartitionnums
the output is
|
by: Goran |
last post by:
Hi!
I need to convert from a unsigned char array to a float. I don't think
i get the right results in the program below.
unsigned char array1 = { 0xde, 0xc2, 0x44, 0x23}; //I'm not sure in
what order the data is stored so i try both ways.
unsigned char array2 = { 0x23, 0x44, 0xc2, 0xde};
float *pfloat1, *pfloat2;
|
by: Neils Christoffersen |
last post by:
Hey all,
I wrote on Friday asking for some help moving a common subclass field up
to the base class (original post and followup included below). This
entails storing whole numbers inside float data types. What I'm stuck on
is how to make sure that the value coming in is indeed a whole number,
without converting it to a string and doing manipulation that way. Is
there a mathematical way to do this?
Thanks again for your help.
|
by: julien |
last post by:
Hi, I am using Sybase 12.5 dataserver and ASP.NET
I am calling a stored procedure from my asp.net page, in this stored
procedure, I have 2 float fields that are returned. One is directly
taken from one float column of a table, and the other one is a
substraction of 2 float columns of a table. The first field is all the
time ok, whereas the calculated field is almost all the time wrong,
that is it returns things like :
1,332294 - 1,334709...
| |
by: Enekajmer |
last post by:
Hi,
1 int main()
2 {
3 float a = 17.5;
4 printf("%d\n", a);
5 printf("%d\n", *(int *)&a);
6 return 0;
7 }
|
by: morc |
last post by:
hey,
I have float values that look something like this when they are
printed:
6.0E-4
7.0E-4
I don't want them to be like this I want them to be normalized with 4
decimal places.
|
by: seagullino |
last post by:
Hello,
I've developed my first Form, a simple affair that enables the user to search text in the memo fields in our database. When the "search" button is pressed, it runs a macro which runs the simple query.
I have added a second field to the form, in addition to the text search field. This new field allows the user to type in an identification number, which returns all of the memo fields associated with that particular client. If the...
|
by: Bill Reid |
last post by:
I just noticed that my "improved" version of sscanf() doesn't assign
floating point numbers properly if the variable assigned to is declared
as a "float" rather than a "double". (This never cropped up before, since
I rarely use "float"s for anything, and hardly ever use the function for
floating-point numbers in the first place; I just was messing around
testing it for all cases and noticed a problem.)
Anyway, it is declared and I...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |