473,396 Members | 1,780 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,396 software developers and data experts.

floating point precision

why java double datatype has more than 15 digits in floatingpoint?
Jul 11 '11 #1
1 1944
The double data type is a double-precision 64-bit IEEE 754 floating point. Its range of values is beyond the scope of this discussion, For decimal values, this data type is generally the default choice. this data type should never be used for precise values, such as currency.
Jul 11 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: j_mckitrick | last post by:
I checked the docs, but found nothing about floating point issues. I am working on an app that deals with currency values, and only does addition and subtraction (no division). But I am starting...
4
by: Skip Montanaro | last post by:
I understand why the repr() of float("95.895") is "95.894999999999996". What I don't understand is why if I multiply the best approximation to 95.895 that the machine has by 10000 I magically seem...
21
by: syntax | last post by:
hi, i need to get high presion float numbers. say, i need pi = 22/7.0 = 3.142857....(upto 80 digits) is it possible ? does gcc/g++ compiler can give such type of high precision?? plz...
15
by: michael.mcgarry | last post by:
Hi, I have a question about floating point precision in C. What is the minimum distinguishable difference between 2 floating point numbers? Does this differ for various computers? Is this...
1
by: Joseph Turian | last post by:
Hi, How can I change the default floating point precision for the duration of execution? i.e. that *every* ostream I subsequently create will have this precision? Thanks Joseph
5
by: rocknbil | last post by:
Hello everyone! I'm new here but have been programming for the web in various languages for 15 years or so. I'm certainly no "expert" but can keep myself out of trouble (or in it?) most of the time....
5
by: artifact.one | last post by:
Hello. Is there any reliable way to determine the number of digits of precision given by the float/double type? I read somewhere that the C99 standard guarantees six digits of precision with...
2
by: eternalLearner | last post by:
hi, i need to set precision for floating point operations in the c++ program. i have a number of files.Please tell me how to do it ,so that i don't have to make the change in all the files in...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...

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.