]> gitweb.factorcode.org Git - factor.git/commitdiff
Docs: generic.math and layouts
authorBjörn Lindqvist <bjourne@gmail.com>
Sat, 3 May 2014 14:29:35 +0000 (16:29 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 11 May 2014 00:13:48 +0000 (17:13 -0700)
core/generic/math/math-docs.factor
core/layouts/layouts-docs.factor

index 5953c5ad9b5cabfc818453199c2fdd45099e6d40..f541db2486c8ed925added7143d6656ba2f64b8c 100644 (file)
@@ -2,6 +2,17 @@ USING: kernel generic help.markup help.syntax math classes
 sequences quotations generic.math.private ;
 IN: generic.math
 
+HELP: math-class-max
+{ $values { "class1" class } { "class2" class } }
+{ $description "Evaluates which math class is the largest." }
+{ $examples
+  { $example
+    "USING: generic.math math kernel prettyprint ;"
+    "integer float math-class-max ."
+    "float"
+  }
+} ;
+
 HELP: math-upgrade
 { $values { "class1" class } { "class2" class } { "quot" { $quotation "( n n -- n n )" } } }
 { $description "Outputs a quotation for upgrading numberical types. It takes two numbers on the stack, an instance of " { $snippet "class1" } ", and an instance of " { $snippet "class2" } ", and converts the one with the lower priority to the higher priority type." }
@@ -39,5 +50,3 @@ $nl
 
 HELP: math-generic
 { $class-description "The class of generic words using " { $link math-combination } "." } ;
-
-
index 2897f48e346a928487f722fc7d35d34f137c7b68..d330f52519e3fa362232ca62f5015414903002ee 100644 (file)
@@ -39,11 +39,11 @@ HELP: bootstrap-first-bignum
 { $description "Outputs the value for the target architecture when bootstrapping." } ;
 
 HELP: bootstrap-most-positive-fixnum
-{ $values { "n" "largest positive integer representable by a fixnum" } } 
+{ $values { "n" "largest positive integer representable by a fixnum" } }
 { $description "Outputs the value for the target architecture when bootstrapping." } ;
 
 HELP: bootstrap-most-negative-fixnum
-{ $values { "n" "smallest negative integer representable by a fixnum" } } 
+{ $values { "n" "smallest negative integer representable by a fixnum" } }
 { $description "Outputs the value for the target architecture when bootstrapping." } ;
 
 HELP: cell
@@ -70,6 +70,9 @@ HELP: bootstrap-cell-bits
 { $values { "n" integer } }
 { $description "Outputs the number of bits in one cell in the target image (if bootstrapping) or the current CPU architecture (otherwise)." } ;
 
+HELP: immediate
+{ $class-description "Union class of all values that the Factor VM can store immediately, all others are stored as references (pointer) to them." } ;
+
 ARTICLE: "layouts-types" "Type numbers"
 "Corresponding to every built-in class is a built-in type number. An object can be asked for its built-in type number:"
 { $subsections tag }