double and float are floating point types. Doubles (double type) are more accurate than float (single-precision) data and occupy more space. Double precision is twice times that of float, so a double is often used for more precise calculations.
The FLOAT type is used to indicate the approximate numeric data type. The SQL standard allows you to specify the precision (but not the exponential range) with bits in parentheses after the keyword FLOAT ). MySQL also supports optional
Title in Java accurate calculation of floating-point number Ayellow (original) modificationKeyword Java floating-point number accurate calculationThe question is raised:What will we see if we compile and run the following program?public class
Single-precision floating-point numbers are 4 bytes (32bit) representing floating point numbersUses the IEEE754 standard computer floating-point number, in the interior is uses the binary system to representFor example: 7.22 with a 32-bit binary is
(Its tool class is in the project Arith Util )Original URL:http://blog.csdn.net/pttaag/article/details/5912171First, the previous case: public class test{ public static void main (String Args[]) { system.out.println (0.05+0.01);
Oracle uses a standard, variable-length internal format to store numbers. This internal format can be up to 38 bits in precision.The number data type can have two qualifiers, such as:Column number (precision, scale)Represents a valid bit in a number.
This article is mainly to share with you PHP to achieve high-precision computing, engaged in the financial industry, capital operations frequently, here I met the pit .... Slightly inattentive, the user funds may lose hundreds of thousands of, even
Engaged in the financial industry, capital operations frequently, here I met the pit .... Slightly inattentive, the user funds may lose hundreds of thousands of, even more terrible ... Go directly to the example:Javascript0.1 + 0.2 Why isn't it
The simple floating-point number types in Java float and double are not capable of operation. It's not just Java, it's also a problem in many other programming languages.What will we see if we compile and run the following program?public class Test {
question: What do we see if we compile and run the program below? Public classtest{ Public Static voidMain (String args[]) {System.out.println (0.05+0.01); System.out.println (1.0-0.42); System.out.println (4.015*100); System.out.println (123.3/100)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.