]> gitweb.factorcode.org Git - factor.git/blob - extra/ryu/ryu-docs.factor
factor: trim using lists
[factor.git] / extra / ryu / ryu-docs.factor
1 ! Copyright (C) 2018 Alexander Ilin.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: help.markup help.syntax math strings ;
4 IN: ryu
5
6 ABOUT: "ryu"
7
8 ARTICLE: "ryu" "Ryū Float to String Conversion"
9 { "The " { $vocab-link "ryu" } " vocab contains a Factor implementation of the Ryū algorithm to quickly convert floating point numbers to decimal strings. Only the double-precision floats (64-bit) are supported. Original author's reference implementation (C and Java) and additional information can be found here: " { $url "https://github.com/ulfjack/ryu" } "."
10 { $subsections print-float d2s } } ;
11
12 HELP: print-float
13 { $values
14     { "value" number }
15     { "string" string }
16 }
17 { $description "Convert the " { $snippet "number" } " into its shortest stable floating-point representation string using the Ryū algorithm." } ;
18
19 HELP: d2s
20 { $values
21     { "value" number }
22     { "string" string }
23 }
24 { $description "An alias for " { $link print-float } "." } ;