In javascript, integers and floating-point numbers both belong to the Number data type (one of the simple data types). we often find that the result of printing a floating-point Number such as 1.0 is 1 rather than 1.0, this is because the memory space used to save floating point numbers is twice the total storage space of the integer, so ECMAScript will at the same time convert the floating point numbers to integers. & Amp; nbsp; although the above situation makes the patients with obsessive-compulsive disorder a little uncomfortable, it is not a big mistake. then this situation is very scary. For example, when we calculate 0.1 and 0.2, its output ends... in javascript, integers and floating-point numbers both belong to the Number data type (one of the simple data types). we often find that the result of printing a floating-point Number such as 1.0 is 1 rather than 1.0, this is because the memory space used to save floating point numbers is twice the total storage space of the integer, so ECMAScript will at the same time convert the floating point numbers to integers. Although the above situation makes the patients with obsessive-compulsive disorder a little uncomfortable, it is not a big mistake. the next situation is very scary. For example, when we calculate 0.1 and 0.2, the output result is 0.3 instead of 0.3000000000000004. What the fuck ?! Does my first child shoes in this situation feel that the world outlook has been challenged? The reason was that I had to go through the book to save my soul and body, and found that the book said: ECMAScrip is based on IEEE754 numerical floating point computing. if you do not know what IEEE754 is, click on me, this numerical calculation method saves the value as binary and then computes it. because floating point numbers are expressed infinitely in binary format
1. javascript floating point value calculation bug
Summary: In javascript, integers and floating-point numbers both belong to the Number data type (one of the simple data types). we often find that the result of printing a floating-point Number such as 1.0 is 1 rather than 1.0, this is because the memory space used to save floating point numbers is twice the total storage space of the integer, so ECMAScript will at the same time convert the floating point numbers to integers. Although the above situation makes the patients with obsessive-compulsive disorder a little uncomfortable, it is not a big mistake. the next situation is very scary. For example, when we calculate 0.1 and 0.2, the output result is 0.3 instead of 0.3000000000000004. What the fuck ?! The first children's shoes in this situation are:
2. Brainfuck Compiler on PHP
Introduction: This article mainly introduces Brainfuck Compiler on PHP. For more information about PHP tutorials, see.
3. how to call functions in a PHP string _ PHP Tutorial
Description: method of calling a function in a PHP string. {$ O0_0o {phpinfo ()} 1 {$ click here to [phpinfo ()]} $ {~ -~ Phpinfo () }$ {0e0 + phpinfo ()} What fuck? ? Php I am a good guy $ _ $ {$ _ {pHPINfo (~ @-@~ -$ In short, I am a good guy)} I am a good guy ;? Easy to use
4. how to use PHP to ping An Address _ PHP Tutorial
Introduction: How to ping An address using PHP. How to use PHP to ping An address if ($ server = 127.0.0.1) | ($ server = localhost) | ($ server = getenv ("SERVER_ADDR "))) {echo ""; echo "Fuck Off! "; Echo" "; exit;} el
5. Questions about die
Introduction: about die This is my code. if there is no echo, the entire webpage is HTTP Error 500 (Internal Server
6. steps for writing php native code in the {dede: SQL} tag script
Introduction: how to write php native code in the {dede: SQL} tag script! {Dede: SQL = '... 'runphp = 'yes'} echo 'fuck'; {/dede: SQL} it's useless for me to write this statement. how can I find it in {dede: SQL} is the native php code written in the tag script ?? ------ Solution ------------------ The following are the php applications in dede. I hope to help you
7. I really don't know where to post the post, so I have to send it here: about linux6.1 Enterprise Edition configuration php run
Introduction: I really don't know where to post the post, so I have to send it here: about linux6.1 Enterprise Edition configuration php run I installed a desktop version of linux 6.1, apache also installed and started normally, however, the php code cannot be interpreted, that is, the/etc/www/html/file contains a test. php, the code is simple, just echo 'fuck'; but the browser (Firefox) outputs all the code as it is, and does not parse it. if
8. I want to implement such a function.
Introduction: how can I implement such a function? I want a static variable. The value is 0 for the first access, and the value is + 1 for each subsequent access. this is what I wrote on the page: if (! Isset ($ tmp) static $ tmp = 0; $ tmp ++; echo 'fucking number :'. $ tmp; does not work. every time $ tmp is changed back to 0, how can I set $ tmp to 0 only once? ------ Solution
9. Insert keywords to the string at random position in PHP
Introduction: PHP inserts a keyword $ times = 4 into a string at a random position. // keyword frequency $ keyword = "[fuck ]"; // The keyword to be replaced $ str = "Brown is the right Chinese and Western Medicine Group of the aluminum sulfate group. The las will be displayed in the third part of the Chinese and Western medicine. iasfls. sdmflaskdf L. A. S. law is stuck. oh, iuoi020990. it's crazy. "; $ strlen = mb_strlen ($ st
10. how to write the native php code in the {dede: SQL} tag script! Solution
Introduction: how to write php native code in the {dede: SQL} tag script! {Dede: SQL = '... 'runphp = 'yes'} echo 'fuck'; {/dede: SQL} it's useless for me to write this statement. how can I find it in {dede: SQL} is the native php code written in the tag script ?? ------ Solution -----------
[Related Q & A recommendations ]:
Python-how to determine whether a crawler has successfully logged on?
Javascript-how to control user input on mobile phones
Javascript-how to use JS to obtain this JSON data
Php-how to play with the JSON automatically returned by the verifier AJAX in laravel5
Python-csdn crawler comments
The above is a detailed description of PHP knowledge points. For more information, see other related articles in the first PHP community!