]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix documentation example for floats
authorAaron Schaefer <aaron@elasticdog.com>
Thu, 4 Dec 2008 05:36:11 +0000 (00:36 -0500)
committerAaron Schaefer <aaron@elasticdog.com>
Thu, 4 Dec 2008 05:36:11 +0000 (00:36 -0500)
core/math/floats/floats-docs.factor

index a1ba16c68accef1d8383728d4c51acf189efb4f0..5549ef79e9d9a555e9bec518a92335cde9151b05 100644 (file)
@@ -6,7 +6,7 @@ ARTICLE: "floats" "Floats"
 "Rational numbers represent " { $emphasis "exact" } " quantities. On the other hand, a floating point number is an " { $emphasis "approximation" } ". While rationals can grow to any required precision, floating point numbers are fixed-width, and manipulating them is usually faster than manipulating ratios or bignums (but slower than manipulating fixnums). Floating point numbers are often used to represent irrational numbers, which have no exact representation as a ratio of two integers."
 $nl
 "Introducing a floating point number in a computation forces the result to be expressed in floating point."
-{ $example "5/4 1/2 + ." "7/4" }
+{ $example "5/4 1/2 + ." "1+3/4" }
 { $example "5/4 0.5 + ." "1.75" }
 "Integers and rationals can be converted to floats:"
 { $subsection >float }