Electronic record
Most calculators and many computer programs present very large and very small results in scientific notation. Since superscripted indexes such as 10 7 may not always be conveniently displayed, the letter E or e is often used to denote a ten-fold exponentiation (which will be written as βx 10 b β) and is accompanied by the exponent value. Please note that with such use, the symbol e is not related to the mathematical constant e or the exponential function e x (confusion, which is less likely with capital E); and although it denotes an exponent, the designation is usually called the (scientific) designation E or (scientific) electronic designation, and not the (scientific) exponential designation (although the latter also occurs). Use of this entry is discouraged by publications.
Regarding your second question:
Can we use this approach in a different data type or can we use it only with a floating point?
See the C # specification :
Real literals [the type of numeric literals that allow the E character in them] are used to write values ββof types float , double and decimal .
However, if you assign it to anything other than Double , you must appropriately cast or add the suffix suffix, since any literal with e or E in it is recognized as Double in Visual Studio. I can not find where this behavior is indicated.
float f1 = 7E1; // Compile error. Needs F suffix (7E1F) decimal d1 = 8E2; // Compile error. Needs M suffix (8E2M) double d2 = 9E3; // Works. int overninethousand = (int)9E3 + 1; // Works
Codecaster
source share