]> gitweb.factorcode.org Git - factor.git/blob - extra/math/approx/approx-docs.factor
Switch to https urls
[factor.git] / extra / math / approx / approx-docs.factor
1 ! Copyright (C) 2010 John Benediktsson.
2 ! See https://factorcode.org/license.txt for BSD license
3
4 USING: help.markup help.syntax math math.approx ;
5
6 IN: math.approx
7
8 HELP: approximate
9 { $values { "x" ratio } { "epsilon" ratio } { "y" ratio } }
10 { $description
11 "Applied to two fractional numbers \"x\" and \"epsilon\", returns the "
12 "simplest rational number within \"epsilon\" of \"x\"."
13 $nl
14 "A rational number \"y\" is said to be simpler than another \"y'\" if "
15 "abs numerator y <= abs numerator y', and denominator y <= denominator y'"
16 $nl
17 "Any real interval contains a unique simplest rational; in particular note "
18 "that 0/1 is the simplest rational of all."
19 } ;