TFR
TFR

Reputation: 131

What is the difference between scientific notation and floating point number?

What are the differences between these two terms? Are they different only because the numbers of digits (for the significand and for the exponent} in a floating point number are fixed?

On Wikipedia, it says

the floating-point representation can be thought of as a kind of scientific notation

and

decimal floating point is a computer arithmetic system closely related to scientific notation.

Upvotes: 2

Views: 3015

Answers (3)

Steve Summit
Steve Summit

Reputation: 47915

The primary difference between the two terms is the base. Strictly speaking, scientific notation uses base 10: m × 10n, and with m and n expressed in base 10 also.

But computer floating point typically uses base 2 internally, not base 10: m × 2n, with at least m typically rendered in base 2 or base 16. So floating point isn't truly "scientific notation". But it's certainly closely related. You can call it generalized scientific notation or exponential notation if you like. (And even if it's not strictly correct, if you do call it "scientific notation", everyone will know what you mean.)

Besides the base, there are several other, less consequential differences: computer floating point has limited range and precision, it may special-case some values for infinities and NaNs ("Not a Number"), and its internal representation may have wrinkles involving an implicit 1 bit, and subnormals.

Upvotes: 0

chux
chux

Reputation: 153303

What is the difference between scientific notation and floating point number?

Not much difference aside from some details. Both use: sign * significant * baseexponent

Floating point (FP), as used with computer languages or specified with standard like IEEE 754, implies a limited precisions and exponent range. Scientific notation (SN) has no such limitation.

The FP limited precision impacts the results of various math operations and conversions. The end result is coherenced into the target floating point format incurring a difference from what could be represented with the open ended scientific notation.

The limited exponent range of floating point also causes operation results like infinity and sub-normals or zero where as scientific notation poses no requirement.

Floating point often does not carry the idea of significance. A FP 1.0 has the same significance (both encoded the same) as 1.00000 whereas SN is 2 vs 6 places of significance. Some modern FP formats (decimal ones) employ different encoding for the same value, but of different significance.

FP has finite different values, e.g. 264 encodings, whereas SN is unlimited.

Upvotes: 1

phuclv
phuclv

Reputation: 41753

Scientific notation is a way of expressing numbers that are too large or too small (usually would result in a long string of digits) to be conveniently written in decimal form.

https://en.wikipedia.org/wiki/Scientific_notation

The general scientific notation format is m × 10n where m is any decimal number and n is an integer, for example 31.4 × 10–25 or –2.45 × 1031

More generally the format can be expressed as sign × m × basen. In computers floating-point types are also expressed in that format where the sign, m and n are stored explicitly. n is the exponent and m is called the significand for a linear scale or mantissa for a logarithmic scale. The base is usually 2 because modern computers are binary machines, however other bases do exist. For example in the past there were floating-point formats that use base 8 and 16. Decimal floating-point types (i.e. base = 10) is also common in many situations where the precision lost due in binary floating-point types is unacceptable

The modern IEEE 754 standard (which is the de facto standard for floating-point operations in computers) includes both binary and decimal floating-point types. For example its single-precision (A.K.A binary32) format uses 1 bit for sign, 8 bits for exponent and 23 bits for the significand

Upvotes: 0

Related Questions