A detailed introduction to floating-point (float)

Source: Internet
Author: User
Tags scalar
What is a floating-point (float) data type? Floating-point data types are our common decimals, like "0.7", "100.2" are floating-point data, floating-point data types can be used to store integers or to store decimals. It's more accurate than the integer data type we talked about earlier. The valid range for floating-point is 1.8e-308~1.8e+308. Before PHP4.0, floating-point identification is double, also known as double-precision floating-point number, there is no difference between floating point data default has two writing formats, a standard format, the following 3.1415-35.8 also has a scientific notation format 3.14*10^3 You can use 3.14E3 to represent a floating-point (float) data type example in the following example, we will test for different numbers. PHP Var_dump () returns the data type and value of the variable: <?php$x = 10.3605;var_dump ($x); echo "<br>"; $x &nb

1. PHP: Floating-point type (float) data type instance detailed

Summary: Floating-point data types are our common decimals, like "0.7", "100.2" are floating-point data, floating-point data types can be used to store integers, or to store decimals. It's more accurate than the integer data type we talked about earlier. The valid range for floating-point is 1.8e-308~1.8e+308.

2. Floating-point (float) parsing PHP data type

Summary: Floating point (also known as floating point float, doubles double or real) can define:<?php$a=1.234; $b =1.2e3 with any of the following syntax; $c =7e-10; > Floating-point number in the form of: Lnum ...

3. PHP floating point type (float)

Summary: The precision of floating-point numbers is limited. Although depending on the system, PHP typically uses IEEE 754 double-precision format, the maximum relative error caused by rounding is 1.11e-16. A non-basic mathematical operation may give greater error and take into account the error transfer during the composite operation.

4. What type of PHP data does PHP determine for a character type?

Introduction: PHP Judgment character type: PHP to determine the character type of PHP data types have? : There are three main categories: 1, the basic data type: integer type (integers), can be positive, negative integer decimal, octal, hexadecimal, float (float), String type (String), Boolean type (Boolean), 2, Composite data type: Array Object (object) 3, special data type: null () resource type (Resource) Note:1> A variable is considered null in the following cases: is assigned null. has not yet been assigned. Be unset ().

5. Data type in PHP (1) _php tutorial

Introduction: Data Type in PHP (1). PHP supports eight primitive types. Four scalar types: Boolean (Boolean) integer (integer) floating-point (float) (floating-point, also Double) string (string)

6. PHP supports 8 primitive types

Summary: PHP supports eight primitive types for eight primitive PHP types. Four scalar types: Boolean (Boolean) ――true or Fasle two are case insensitive integer (integer) ――32-bit systems, range:-2 147 483 648~+2 147 483 647 Float (float) (floating-point, also "Doub Le ") ――32-bit system, range: 1.7e-308~

7. PHP supports 8 primitive types

Summary: PHP supports eight primitive types for eight primitive PHP types. Four scalar types: Boolean (Boolean)--true or Fasle two are case insensitive integer (integer)-32-bit system, Range: 2 147 483 648~+2 147 483 647 Float (float) (floating-point, also "Doub Le ")--32-bit system, range: 1.7e-308~1

8. Data type in PHP (1)

Introduction: Data Type in PHP (1). PHP supports eight primitive types. Four scalar types: Boolean (Boolean) integer (integer) floating-point (float) (floating-point, also Double) string (string)

9. PHP Data Type 01

Introduction: 1. Data type: Scalar type: integer (int), float (float), String type (String), Boolean (Boolean) conforming type: Array, object (objects) other type: resource (Resource), NULL 2. $a = 123; Echo 11$a; $a can play out echo 11$a11; $a, PHP default $A11 is a

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.