Home > Backend Development > C#.Net Tutorial > Comparison of double and float basic types in C#

Comparison of double and float basic types in C#

WBOY
Release: 2023-09-14 13:25:02
forward
1121 people have browsed it

C# 中 double 和 float 基本类型的比较

Precision describes the difference between float and double data types.

Float is a single-precision (32-bit) floating-point data type.

Double is a double-precision (64-bit) floating-point data type.

Range of floating point types -

-3.4 x 1038 to + 3.4 x 1038
Copy after login

The range of double precision type is -

(+/-)5.0 x 10-324 to (+/-)1.7 x 10308
Copy after login

Default value of float type -

0.0F
Copy after login

Default value for double type -

0.0D
Copy after login

The above is the detailed content of Comparison of double and float basic types in C#. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template