From 91b6958a098edf36401788417681988fae4fa91c Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Fri, 24 Jul 2009 21:04:49 -0500 Subject: [PATCH] nitpick --- core/math/floats/floats-docs.factor | 10 +++++----- core/math/math-docs.factor | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/math/floats/floats-docs.factor b/core/math/floats/floats-docs.factor index dfa5779c47..1305f2a18d 100644 --- a/core/math/floats/floats-docs.factor +++ b/core/math/floats/floats-docs.factor @@ -9,21 +9,21 @@ HELP: >float { $description "Converts a real to a float. This is the identity on floats, and performs a floating point division on rationals." } ; HELP: bits>double ( n -- x ) -{ $values { "n" "a 64-bit integer representing an 754 double-precision float" } { "x" float } } +{ $values { "n" "a 64-bit integer representing an IEEE 754 double-precision float" } { "x" float } } { $description "Creates a " { $link float } " object from a binary representation. This word is usually used to reconstruct floats read from streams." } ; { bits>double bits>float double>bits float>bits } related-words HELP: bits>float ( n -- x ) -{ $values { "n" "a 32-bit integer representing an 754 single-precision float" } { "x" float } } +{ $values { "n" "a 32-bit integer representing an IEEE 754 single-precision float" } { "x" float } } { $description "Creates a " { $link float } " object from a binary representation. This word is usually used to reconstruct floats read from streams." } ; HELP: double>bits ( x -- n ) -{ $values { "x" float } { "n" "a 64-bit integer representing an 754 double-precision float" } } +{ $values { "x" float } { "n" "a 64-bit integer representing an IEEE 754 double-precision float" } } { $description "Creates a " { $link float } " object from a binary representation. This word is usually used to reconstruct floats read from streams." } ; HELP: float>bits ( x -- n ) -{ $values { "x" float } { "n" "a 32-bit integer representing an 754 single-precision float" } } +{ $values { "x" float } { "n" "a 32-bit integer representing an IEEE 754 single-precision float" } } { $description "Creates a " { $link float } " object from a binary representation. This word is usually used to reconstruct floats read from streams." } ; ! Unsafe primitives @@ -74,7 +74,7 @@ HELP: float>= ( x y -- ? ) ARTICLE: "floats" "Floats" { $subsection float } -"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." +"Rational numbers represent " { $emphasis "exact" } " quantities. On the other hand, a floating point number is an " { $emphasis "approximate" } " value. While rationals can grow to any required precision, floating point numbers have limited precision, and manipulating them is usually faster than manipulating ratios or bignums." $nl "Introducing a floating point number in a computation forces the result to be expressed in floating point." { $example "5/4 1/2 + ." "1+3/4" } diff --git a/core/math/math-docs.factor b/core/math/math-docs.factor index 5cc7328580..55a50cd5d7 100644 --- a/core/math/math-docs.factor +++ b/core/math/math-docs.factor @@ -289,11 +289,11 @@ HELP: HELP: next-float { $values { "m" float } { "n" float } } -{ $description "Returns the least representable " { $link float } " value greater than " { $snippet "m" } "." } ; +{ $description "Returns the least representable " { $link float } " value greater than " { $snippet "m" } ", or in the case of " { $snippet "-0.0" } ", returns " { $snippet "+0.0" } "." } ; HELP: prev-float { $values { "m" float } { "n" float } } -{ $description "Returns the greatest representable " { $link float } " value less than " { $snippet "m" } "." } ; +{ $description "Returns the greatest representable " { $link float } " value less than " { $snippet "m" } ", or in the case of " { $snippet "+0.0" } ", returns " { $snippet "-0.0" } "." } ; { next-float prev-float } related-words