Tag:Floating point number

  • C ා language learning — data types


    data type Sbyte X; // 8bit, signed, represents – 128 ~ 127 Bit X; // 8bit, no sign, 0 ~ 255 Short X; // 16bit, signed integer USHORT X; // 16bit, unsigned integer Int x; // 32bit, signed integer Uint X; // 32bit, unsigned integer Long x; // 64bit, signed integer Ulong X; // 64bit, […]

  • Floating point correlation


    Read some IEEE 754 implementation of floating-point arithmetic related articles IEEE 754 (IEEE 754-2019) Floating-point arithmetic Significand JavaScript floating point number trap and solution Basic field: on floating point numbers In depth analysis of floating point numbers What is the difference between quiet NaN and signaling NaN? Why is the most secure integer in JavaScript […]

  • The most practical regular expression collation


    Author: moocnetLink:https://zhuanlan.zhihu.com/p/…Source: ZhihuThe copyright belongs to the author. For commercial reprint, please contact the author for authorization. For non-commercial reprint, please indicate the source. 1、 Check the expression of the number 1 digit: ^ [0-9]$ 2 n-digit number: ^ D {n}$ 3 at least n digits: ^ D {n,}$ 4 M-N digits: ^ D {m, […]

  • Notes on time conversion of getdate in SQL Server


      In SQL server, sometimes when querying data, it is necessary to limit the query time range. At this time, you need to calculate the time as follows:   USE AdventureWorks2014; GO SELECT  * FROM    HumanResources.Employee WHERE   ModifiedDate > GETDATE() – 20;     For example, to get the time of the previous day, you […]

  • C ා learning 3


    11   Two ways to run code pressF5Or click Run (right arrow) 12   In the process of programming, pay attention to write notes and appropriate names (notes–Easy to find the wrong name–Easy to find) 13   “//”Represents a comment symbol 14   The annotator plays two roles: cancellation and interpretation. First, the line of code will not be […]

  • C ා the corresponding value range of basic type and. Net framework type


    C ා type name explain Value . net framework type Default value sbyte 8-bit signed integer -128~127 System.SByte 0 byte 8-bit signed integer 0~255 System.Byte 0 short 16 bit signed integer -32768~32767 System.Int16 0 ushort 16 bit unsigned integer 0~65535 System.UInt16 0 int 32-bit signed integer -2,147,483,648~2,147,483,647 System.Int32 0 uint 32-bit signed integer 0~4,294,967,295 System.UInt32 […]

  • Why is precision lost? Teach you to understand IEEE-754!


    Link to the original text: https://ssshooter.com/2020-09… The image above is from Wikipedia. IEEE-754 standard is a floating-point number standard. There are three formats: 32-bit, 64-bit, and 128 bit (the above two pictures are 32-bit and 64 bit respectively, and the structure is consistent). JavaScript uses 64 bit, which is commonly known as “double precision”. This […]

  • 9. C language format controller / place holder


    The Internet has such a paragraph: If a boy has no partner –single af; If a girl has no partner –Go Believe;   Whether it’s a single dog or a dog, it always corresponds to a type. In the previous article, we also introduced that variable types in C language include shaping, floating-point numbers, strings, […]

  • [mongodb] Mongo common field types


    1. JSON and bson JSON JSON is a simple data representation, which is easy to understand, parse and remember. But on the other hand, because there are only null, Boolean, number, string, array and object data types, JSON has some limitations. For example, JSON does not have a date type, and JSON has only one […]

  • Regular


    PHP common checks #Android or not function is_android() { return stripos($_SERVER[‘HTTP_USER_AGENT’], “Android”); } #IPhone function is_iphone() { return stripos($_SERVER[‘HTTP_USER_AGENT’], “iPhone”); } //Determine whether Ajax request function isAjax() { return (isset($_SERVER[‘HTTP_X_REQUESTED_WITH’]) && ($_SERVER[‘HTTP_X_REQUESTED_WITH’] == ‘XMLHttpRequest’)); } Regular rules in PHP #ID card verification $preg = ‘/^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/’; if (!preg_match($preg, $idNumber)) { return false; } #Mobile phone number […]

  • Basic part: java basic data type


    1: The size of several basic data types in Java keyword type Bits (8 bits, 1 byte) Value range (indicated range) byte integer 8 -2^7 ~ 2^7-1 short integer 16 -2^15 ~ 2^15-1 int integer 32 -2^31 ~ 2^31-1 long integer 64 -2^63 ~ 2^63-1 float Floating point number 32 3.402823e+38 ~ 1.401298e-45 double Floating […]

  • C Series 6 – declaration and valuation


    1、 Miscellaneous comments 1. The storage mode of computer can be divided into two basic types: integer type and floating point type. 2. Data type keywords in C language: int\long\short\unsigned\char\float\double\signed\void\__Bool\__Complex\__Imaginary 3. 1 byte = 8 bytes 4. Word is a natural storage unit given in the design of a computer. For an 8-bit microcomputer (such […]