Get the App
SLTechnology News&Howtos  ›  Development  › 

How to express the floating point constant of C #

Shulou Source: shulou.com Published: 2022-06-01 02:09:14 09月30日 Update

This article mainly introduces the relevant knowledge of "how to express the floating point constant of C#". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "how to express the floating point constant of C#" can help you solve the problem.

Floating point constant

A floating-point constant consists of an integer part, a decimal point, a decimal part, and an exponential part. You can represent floating-point constants in either decimal or exponential form.

Here are some examples of floating point constants:

3.14159 / * legal * / 314159E-5L / * illegal * / 510e / * illegal: incomplete index * / 210f / * illegal: no decimal or index * / .e55 / * illegal: missing integer or decimal * /

When represented in floating-point form, you must include a decimal point, an exponent, or both. When expressed in exponential form, it must contain an integer part, a decimal part, or both. Signed exponents are represented by e or E.

This is the end of the content about "how to express the floating point constant of C#". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Tags: Floating point constant decimal index part form Coulomb integer knowledge legal at the same time decimal point industry different practical content example practical practical article Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Redmi Docker Apple Shulou Information