473,405 Members | 2,444 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

is there a utility class to store unlimited floating point number?

'double' data type can only represent 1.79769e+308 by maximum on a 32
bit machine. Is there a utility class somewhere to store unlimited
floating point number?

Thanks,
Derek
Aug 16 '08 #1
6 1502
On Aug 16, 4:26 pm, derek....@googlemail.com wrote:
'double' data type can only represent 1.79769e+308 by maximum on a 32
bit machine. Is there a utility class somewhere to store unlimited
floating point number?

Thanks,
Derek

Thats incorrect, the range of a double is roughly double that
(negative range).
2.2e–308 to 1.8e308
Do you realize what 1.8e308 is? One trillion is 1.0e12.
Aug 16 '08 #2
de*******@googlemail.com wrote:
'double' data type can only represent 1.79769e+308 by maximum on a 32
bit machine.
Maybe on your 32 bit machine. The standard remains largely silent about this
issue.

Is there a utility class somewhere to store unlimited floating point
number?
Not in the standard. There are, however, third party libraries. A google
search should help.
Best

Kai-Uwe Bux

Aug 17 '08 #3
de*******@googlemail.com wrote:
'double' data type can only represent 1.79769e+308 by maximum on a 32
bit machine.
You mean the range is different in a 64-bit machine?
Is there a utility class somewhere to store unlimited
floating point number?
http://gmplib.org/
Aug 17 '08 #4
On Sat, 16 Aug 2008 13:26:26 -0700, derek.ldn wrote:
'double' data type can only represent 1.79769e+308 by maximum on a 32
bit machine. Is there a utility class somewhere to store unlimited
floating point number?
Look at the links at the end of this page:
http://en.wikipedia.org/wiki/Arbitra...ion_arithmetic

P.

Aug 19 '08 #5
* You mean the range is different in a 64-bit machine?

It's implementation dependent, isn't it?
http://en.wikipedia.org/wiki/Arbitra...ion_arithmetic
which one would you recommend?
Aug 19 '08 #6
de********@gmail.com wrote:
> You mean the range is different in a 64-bit machine?

It's implementation dependent, isn't it?
Strictly speaking, yes. In practice, however, in most desktop computer
systems (and most server systems) a double will be an IEEE 64-bit
floating point number.
>http://en.wikipedia.org/wiki/Arbitra...ion_arithmetic

which one would you recommend?
If you are not afraid of C, the GMP library seems rather popular and
efficient. (Although I believe there's a C++ wrapper for GMP. Never
tried it, though.)
Aug 19 '08 #7

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

Similar topics

12
by: jose luis fernandez diaz | last post by:
Hi, My OS is: cronos:jdiaz:tmp>uname -a HP-UX cronos B.11.11 U 9000/800 820960681 unlimited-user license I compile in 64-bits mode the program below:
7
by: thisismyidentity | last post by:
Hi all, I am trying to predict the behaviour of floating point load and store operations on integer locations. I ve written a small piece of code having some inline assembly code which I am...
118
by: ramasubramanian.rahul | last post by:
hi .. can we design a program in c which will point out the possible memory leaks in any given c file and fix them.... i am trying to come with something like this but do not know where to start......
33
by: Prasad | last post by:
Hi, Can anyone please tell me how to store a 13 digit number in C language ? Also what is the format specifier to be used to access this variable ? Thanks in advance, Prasad P
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
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...

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.