puddlejumper26 / blogs

Personal Tech Blogs
4 stars 1 forks source link

Floating-point number #83

Open puddlejumper26 opened 4 years ago

puddlejumper26 commented 4 years ago

image image

floating point operations per second (FLOPS, flops or flop/s)

It is arithmetic using formulaic representation of real numbers as an approximation to support a trade-off between range and precision.

A number is, in general, represented approximately to a fixed number of significant digits (the significand) and scaled using an exponent in some fixed base; the base for the scaling is normally two, ten, or sixteen. A number that can be represented exactly is of the following form:

image

where significand is an integer, base is an integer greater than or equal to two, and exponent is also an integer. For example:

image

The term floating point refers to the fact that a number's radix point (decimal point, or, more commonly in computers, binary point) can "float"; that is, it can be placed anywhere relative to the significant digits of the number. This position is indicated as the exponent component, and thus the floating-point representation can be thought of as a kind of scientific notation.

浮点指的是带有小数的数值,浮点运算即是小数的四则运算,常用来测量电脑运算速度。大部份计算机采用二進制(b=2)的表示方法。

位(bit)是衡量浮点数所需存储空间的单位,通常为32位或64位,分别被叫作单精度和双精度。

image image

Reference

[1] https://en.wikipedia.org/wiki/Floating-point_arithmetic [2] https://en.wikipedia.org/wiki/Single-precision_floating-point_format [3] https://en.wikipedia.org/wiki/Double-precision_floating-point_format