2

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.

phuclv
  • 37,963
  • 15
  • 156
  • 475
TFR
  • 131
  • 1
  • 5

3 Answers3

1

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.

chux - Reinstate Monica
  • 143,097
  • 13
  • 135
  • 256
0

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

phuclv
  • 37,963
  • 15
  • 156
  • 475
  • So scientific notation refers to any number written in that way, whereas a floating-point number is a piece data stored in a computer intended to represent or approximate a real number expressed in the scientific format? – TFR Mar 14 '21 at 10:34
  • And in conclusion, scientific notation is a way of expressing numbers in mathematics; floating-point representation is a way of coding real numbers in computers by first converting a number to its scientific notation or similar; a floating-point number is an instance of such code? – TFR Mar 14 '21 at 10:43
  • *floating-point representation **can be thought of** as a kind of scientific notation*, it isn't scientific notation. They're only similar in the way they represent values, otherwise they have nothing to do with each other. There's no conversion to scientific notation before doing anything in floating point – phuclv Mar 14 '21 at 11:53
0

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.

Steve Summit
  • 45,437
  • 7
  • 70
  • 103
  • The page that you linked to also says this: *"While base ten is normally used for scientific notation, **powers of other bases can be used too**, base 2 being the next most commonly used one."*. So your "strictly speaking" is incorrect ... strictly speaking. (And FWIW the Java supports floating point literals in scientific notation with binary exponents. Since Java 6, I think.) – Stephen C Jun 19 '22 at 23:13
  • I think it's clear that the "official" definition (whatever that even means in English) is base 10, but that broadened usage is widespread, to the point that articles like Wikipedia's explicitly acknowledge it. You might be interested in a [discussion I started a week ago at one of Wikipedia's talk pages](https://en.wikipedia.org/wiki/Wikipedia:Reference_desk/Science#Scientific_Notation_base). But I have softened my wording here by one or two small notches. – Steve Summit Jun 21 '22 at 12:02
  • There is no "official" definition of scientific notation, AFAIK. For example, an ISO standard that *defines* what the notation is called. (Sure, scientific notation is also called "standard notation" in some countries, but the word "standard" doesn't imply "official", AFAIK.) – Stephen C Jun 21 '22 at 12:47