?
Solved

a question about the extended type

Posted on 2005-04-26
7
Medium Priority
?
167 Views
Last Modified: 2011-09-20
I need to work with bad numbers like this 34564563645560.0600500000400001
i read in the delphi help that the extended type allows for 20 siginificant digits.
What is meant by significant digits ?is it the float part of the number or the number all digits including the integer part?
thanks
0
Comment
Question by:oalawna
  • 4
  • 3
7 Comments
 

Author Comment

by:oalawna
ID: 13867268
Ok I think it mean all numbers starting from the leftmost zero.
Solet me change the question.
what type should i use with such numbers?
0
 
LVL 15

Expert Comment

by:mikelittlewood
ID: 13867323
Significant digits are all the numbers.

The type is double.
0
 

Author Comment

by:oalawna
ID: 13867359
mike thanks. but the numbers i am using contain more than 20 significant digits.
I will use hexadecimal if there is no solution.
thanks
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Accepted Solution

by:
mikelittlewood earned 2000 total points
ID: 13867385
From the delphi help

The double keyword designates a 64-bit floating-point number.

Type      Range                                      Significant digits         Size in bytes
Double      5.0 x 10^-324 .. 1.7 x 10^308      15-16                         8
Extended      3.6 x 10^-4951 .. 1.1 x 10^4932      19-20                         10

Most poeple use double, though extended will allow you slightly more digits.
Extended though you usually find it will change the value from say 34567.891234 to 3.4567891234 x 10^4
0
 
LVL 15

Expert Comment

by:mikelittlewood
ID: 13867391
Then I would suggest using hexidecimal
0
 

Author Comment

by:oalawna
ID: 13867440

 i did not notice ^308

thank you
0
 

Author Comment

by:oalawna
ID: 13867459
I will use hex
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Loops Section Overview
Suggested Courses
Course of the Month17 days, 13 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question