Position: Home page » Computing » Single precision and calculation force

Single precision and calculation force

Publish: 2021-04-16 04:29:46
1. Ie8.0

is a classic work. It has a very good visual interface integrated with windows, but its speed is slow, but it is not too slow. In addition, it does not support third-party plug-ins. Its plug-ins are called accelerators, which are only provided by Microsoft itself. Of course, their role is very small for Chinese users, It's almost useless. IE9 is a new one. The interface is very simple and the function is small. It's also related to the fact that it's only a beta version, but the official version hasn't come out yet<

the following browsers are all non IE core, that is to say, they are not like Sogou, but they just change the vest of IE and add a few additional functions. They have their own kernel, that is, their own code processing mechanism. It is inevitable that they are faster than ie, and there is no doubt about it. However, at present, many websites in China are written in the way of IE kernel. Because ie is not strict with code specifications, most websites with powerful functions are incompatible in high-speed browsers without IE kernel. That is to say, they don't display things, or display abnormally, or press the button to react, or they can't download things, wait. So, the IE plug-in appeared later. That is to say, when using non IE kernel browser to view web pages, if there is incompatibility, you can use the IE plug-in on the browser to let the browser browse with IE kernel temporarily. However, you have to log in to that website again, which is more chaotic< Now, chrome has entered version 2 and continues to develop in full swing. Its idea of browser as a platform is very attractive. It's a good browser in terms of speed, design and built-in development tools
among the many factors that make Chrome a good browser, the most important one is its internal design. Each tag uses an independent windows process. The collapse of any tag will not affect other tags. In advanced multi-core systems, these tags or windows run smoothly< However, it is still in the planning stage. Chrome is a good browser, but its real purpose is to become a platform. Google hopes to release web references that do not depend on specific OS, such as Gmail and Google Docs, Its best functions are for developers. Its JavaScript engine, especially its web page object detector, allows you to directly set properties for the objects in the page, and immediately see the results or interact with them
the beta version of the next version of chrome has been basically stable, but it is still a bit rough compared with the official version. Its speed is very impressive. Chrome's latest beta 3 is 30% faster than chrome 2. To

3. The most attractive part of Firefox is its huge third-party extension library, which makes it a platform

for example, Greasemonkey changes the behavior of web pages by writing some scripts, and other practical extensions of Firefox include twitterfox, yoono, ireftp, noscript, etc. From 3.0 to 3.5, the development team of Firefox has realized many improvements, such as faster rendering speed, more stable operation, faster and more intelligent JavaScript. The weakness of Firefox is that its built-in development tools are not powerful enough. There is only one JavaScript console and error window, but it can be easily implemented through third-party extensions, such as irebug. The idea of Firefox is to leave peripheral functions to third-party extensions as much as possible, while keeping itself as small as possible. F

4. Opera

although opera has a small market share, it still has a very loyal fan base. It's hard to say why. It's fast, clean, compatible, and contains some small functions that make people overjoyed. What's worth mentioning about opera is their efforts for those who have low bandwidth and slow computers. They are the biggest fans of opera, and each new version of opera contains some features that they can't put down. For example, the Trubo function can enable those websites that need high bandwidth to be reprocessed in the proxy server of opera
to achieve low bandwidth for fast browsing, Although it will rece the image quality, you can easily make the browser reload the original high-quality image

Open opera and do not browse any websites. The home page will display the thumbnails of the nine websites you have visited recently. This function is also available in chrome and safari, but opera is the first to do so. In addition, opera
seems to be the first browser to realize tag browsing. In the actual browsing, the address bar will display the detailed progress status, so I can know what content is being loaded now. If something gets stuck, I will know what it is

its bookmark management is also commendable. You can search the bookmark globally or input it in the address bar. Like Firefox, opera does not have a tag bookmark, but the bookmark can be named by another name. When you enter an address in the address bar, you can also use another name. Bookmarks can also be sorted alphabetically or by the number you actually drag and drop. Next, there are many small functions. Pop up windows pop up to new tags by default, not new windows. When visiting websites that like pop-up windows, this can prevent your desktop from getting messy

the built-in BT support can be downloaded directly from opera. Opera uses widgets to expand the kernel functions. Currently, Opera 10 has been launched, and can coexist with opera 9

5. Safari browser

Apple's Safari is an alternative, a browser transplanted from apple to windows, although few people have such demand. Behind its metal drawing style interface, there are always some things that other browsers should learn from, but on the whole, it is not impressive

first of all, its "top sites" function is similar to Chrome's home page thumbnail, but it looks cool using 3D technology. When viewing browsing history, the same beautiful 3D lattice interface is also very beautiful. For those who only remember the appearance of the website, but forget the name of the website, this is very practical

some other functions are very weak, especially compared with Firefox and chrome
its bookmark management, although it has global search, is very difficult to use. You can't even right-click a bookmark to change its name. The function of importing bookmarks from Firefox is also very weak. The function of importing bookmarks is not in the bookmark management, but in the "file" menu. When importing bookmarks, Safari somehow confused the names of some bookmarks.
2. Yes, the card of Taizhou bank is free to withdraw money from any bank's ATM
3. As long as there is a UnionPay logo on the Taizhou bank card, you can withdraw money from any ATM, but you will charge part of the service charge
bank service charge standard:
CCB: 0.5% of the withdrawal amount plus 2 yuan / transaction for inter-bank in the same city, and 1% plus 2 yuan / transaction for inter-bank in different places (within or outside the province)
Agricultural Bank of China: inter banks in the same city and within the province charge 2 yuan per transaction, while inter banks outside the province charge 1% plus 2 yuan per transaction
ICBC: RMB 4 / transaction for inter-bank in the same city, RMB 2 / transaction for inter-bank in other places (within or outside the province)
China Merchants Bank: inter banks in the same city and within the province charge 2 yuan per transaction, while inter banks outside the province charge 0.5% plus 2 yuan per transaction
Bank of Communications: 2 yuan / transaction for inter-bank transactions in the same city, 0.8% plus 2 yuan / transaction for inter-bank transactions in different places (within or outside the province), at least 10 yuan / transaction, and at most 100 yuan / transaction< People's Livelihood: the first three transactions in the same city are free, and the next two are RMB yuan / transaction, and the other five are RMB yuan / transaction
Huaxia: the same city is free, and the other two are RMB yuan / transaction
CITIC: the first two transactions of inter-bank in the same city and within the province are free of charge, 2 yuan / transaction from the third transaction, and 0.5% of inter-bank outside the province, with a maximum of 200 yuan.
4. Credit card and debit card holders of Bank of Taizhou and village bank whose card numbers begin with "62" (UnionPay standard cards with bin numbers of "622321", "628273", "622247", "623039" and "621347")
hope to adopt
5. If you go to other provinces and cities, you will have to charge a handling charge of 5%
6. 1. If it's a bank card, you can withdraw money from the ATM of any bank in Taizhou
2. If it is a deposit book or a deposit slip, it is impossible to withdraw money from other banks
3. The inter-bank ATM charges 2-4 yuan for each withdrawal, which is divided into different banks in different cities, with a maximum of 4 yuan for each withdrawal.
7. The single precision type takes up four bytes (32 bits) of memory space, and its value range is 3.4e-38 ~ 3.4e + 38, which can only provide seven significant digits. The double precision type takes up 8 bytes (64 bits) of memory space, and its value range is 1.7e-308 ~ 1.7e + 308, which can provide 16 significant digits.
8.

C language is the data storage type, is the name of the type. The data in the computer is binary, when the number of significant digits is too much, the output outside the storage range will be rounded, showing that there are seven significant digits for single precision and fifteen significant digits for double precision

9. Single precision and double precision numerical types first appeared in C language (the more common language). In C language, single precision type is called float type. As the name suggests, floating decimal point is used to store data. These two data types were first proced for scientific calculation, which can provide high enough precision for scientific calculation to store the values with high precision requirements. But at the same time, he also fully conforms to the concept of numerical value in scientific calculation:

when we compare the lengths of two sticks, one method is to compare them side by side, and the other is to measure the lengths separately. But in fact, there are not two sticks of exactly the same length in the world. The accuracy of our length measurement is limited by human visual ability and the accuracy of measuring tools. In this sense, it is meaningless to judge whether two sticks are the same length, because the result must be false, but we can compare which of them is longer or shorter. This example is a good summary of the design intention and significance of the single precision / double precision numerical type

based on the above understanding, the single precision / double precision numerical type is not an accurate numerical type from the beginning of design. It only guarantees that it is accurate within the accuracy of its numerical type, but not beyond the accuracy, for example, a value of 5.1, Most likely, the actual value stored in a single / double value is 5.1000000001 or 5.0999999. We can explain this phenomenon in two ways:

simple explanation method:

you can try to set its width to 3.2cm in the property panel of any control. After you input, you will find that the value automatically changes to 3.199cm. No matter how you change it, you can't input 3.200cm, In fact, what is stored in the computer is not the value in cm, but the value in "Ti". The ratio between "Ti" and cm is a very difficult number to divide. Therefore, after you input it, the computer automatically converts it into the closest "Ti" value, and then converts it into cm, which is displayed on the property panel. This is a multiplication and division, and rounding twice, The error comes out. The principle of single precision / double precision is also similar. In fact, when binary storage is used, single precision / double precision all adopt the method of similar scores, and such storage is impossible to achieve accuracy<

in depth explanation method:

let's take a look at the single precision / double precision values stored in digital media. We use the following code to dissect the single precision type:

public declare sub CopyMemory Lib & quot; kernel32" Alias " RtlMoveMemory" ( Destination As Any, Source As Any, ByVal Length As Long)

Public Sub floatTest()
Dim dblVar As Single

dblVar = 5.731 / 8
dblOutput dblVar

dblVar = dblVar * 2
dblOutput dblVar

dblVar = dblVar * 2
dblOutput dblVar

dblVar = dblVar * 2
dblOutput dblVar

dblVar = dblVar * 2
dblOutput dblVar

dblVar = dblVar * 2
dblOutput dblVar

End Sub

Public Sub dblOutput(ByVal dblVar As Single)
Dim bytVar(3) As Byte
Dim i As Integer, j As Integer
Dim strVar As String

CopyMemory ByVal VarPtr(bytVar(0)), ByVal VarPtr(dblVar), 4
strVar = dblVar & ": & quot;< br />For i = 3 To 0 Step -1
For j = 7 To 0 Step -1
strVar = strVar & (bytVar(i) And 2 ^ j) / 2 ^ j
Next j
strVar = strVar & " & quot;
next I
debug. Print strvar

End Sub
after running, we get the output results (the output format is high bit left, Low right):

. 716375: 00111111, 00110111, 01100100, 01011010
1.43275: 00111111, 10111, 01100100, 01011010
2.8655: 01000000, 00110111, 01100100100, 01011010
5.731: 01000000, 10111, 01100100, 01011010
11.462: 01000001, 00110111, 01100100100, 01011010
22.924: 01000001, 10111, 01100100100, 01011010
here, We convert the single precision data type into binary data output. Here we see that although these six numbers are completely different, their binary storage is surprisingly similar. We see that the red marked part is added by 1 every time. In fact, the single precision data type uses the first bit as the positive and negative marked bit (green), and the second bit to the ninth bit, It is a cross byte signed byte type data. This value determines the direction of decimal point movement and the number of digits (red). Bits 10 to 32 hold an integer (blue). In the storage process, the computer first shifts the input value continuously (multiplies and divides by 2) until the integer part of the number occupies all 24 digits, Then the number of bits moved is written into the floating-point part (red), and the result of the shift is written into the integer part (blue and green), and the decimal part is discarded. When evaluating, it is a reverse process. First, it is evaluated according to the positive and negative bits and the integer number, and then it is shifted according to the integer in the red part (to the power of 2). Finally, it is the single precision value we get. Double precision numerical value is the same principle, only more digits

by dissecting the binary storage format of single precision values, we can clearly see that in fact, single precision / double precision data are stored through multiplication and division, in which there must be rounding. If your value is rounded in division, then the initial value you assign may not be exactly the same as the value you finally store, and there is a slight difference, It is not against the design goal of single precision / double precision

when we use a single precision / double precision value in the database or VBA code, maybe you can't see the difference from the interface, but in the actual storage, the difference is really there. When you make an equal comparison, the system simply makes a binary comparison, which can't be reflected in the interface, In the face of binary comparison, there is no place to hide, so your equivalent comparison returns an unexpected false.
Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750