#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::TAOCP Vol 2::4.2.4 Distribution of Floating Point Numbers
#columns:Front	Back	Tags
TAOCP §4.2.4 Distribution of Floating Point Numbers: what does it cover?	Why leading digits of real-world numbers are not uniformly distributed but follow a logarithmic law (smaller leading digits are more common), and what that means for floating-point error.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.2.4 cracked.guide::kind::about
TAOCP §4.2.4: why does it matter?	Benford's law is a famous, surprising result that has real uses, including fraud detection. It also explains why some rounding error estimates are pessimistic.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.2.4 cracked.guide::kind::why
TAOCP §4.2.4, exercise 1 (rated 13): what is it asking?	Estimate how often addition needs a normalizing shift, from the tables.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.2.4 cracked.guide::kind::exercise
TAOCP §4.2.4, exercise 3 (rated 15): what is it asking?	Probability of given leading digits under the logarithmic law.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.2.4 cracked.guide::kind::exercise
TAOCP §4.2.4, exercise 5 (rated M20, recommended): what is it asking?	Leading digits of a uniform random number. A contrast with the log law.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.2.4 cracked.guide::kind::exercise
TAOCP §4.2.4, exercise 11 (rated M15): what is it asking?	The reciprocal of a log-law number follows the same law.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.2.4 cracked.guide::kind::exercise
TAOCP §4.2.4, exercise 13 (rated M20, recommended): what is it asking?	How often the floating multiply needs its extra shift.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.2.4 cracked.guide::kind::exercise
TAOCP §4.2.4, exercise 19 (rated HM25): what is it asking?	Leading digits of Fibonacci numbers obey the log law. Try it in code first.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.2.4 cracked.guide::kind::exercise
TAOCP §4.2.4, exercise 14 (rated HM30, recommended): what is it asking?	Distribution of the result of adding two log-law numbers. The stretch.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.2.4 cracked.guide::kind::exercise
TAOCP §4.2.4: how many exercises, and how are they rated?	20 exercises, rated 13 to 42.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.2.4 cracked.guide::kind::exercises
TAOCP §4.2.4: what should you be comfortable with first?	<ul><li>4.2.2 Accuracy of Floating Point Arithmetic</li><li>1.2.2 Logarithms</li></ul>	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.2.4 cracked.guide::kind::prereqs
TAOCP §4.2.4: how should you work through it?	Download any numeric dataset (populations, file sizes) and check the leading-digit distribution. Then read the explanation.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.2.4 cracked.guide::kind::approach
