]> gitweb.factorcode.org Git - factor.git/blob - extra/math/libm/libm-docs.factor
Merge branch 'master' of git://factorcode.org/git/factor
[factor.git] / extra / math / libm / libm-docs.factor
1 USING: help.markup help.syntax math.functions math ;
2 IN: math.libm
3
4 ARTICLE: "math.libm" "C standard library math functions"
5 "The words in the " { $vocab-link "math.libm" } " vocabulary call C standard library math functions. They are used to implement words in the " { $vocab-link "math.functions" } " vocabulary."
6 $nl
7 "They can be called directly, however there is little reason to do so, since they only implement real-valued functions, and in some cases place restrictions on the domain:"
8 { $example "2 acos ." "C{ 0.0 1.316957896924817 }" }
9 { $example "2 facos ." "0.0/0.0" }
10 "Trigonometric functions:"
11 { $subsection fcos }
12 { $subsection fsin }
13 { $subsection facos }
14 { $subsection fasin }
15 { $subsection fatan }
16 { $subsection fatan2 }
17 "Hyperbolic functions:"
18 { $subsection fcosh }
19 { $subsection fsinh }
20 "Exponentials and logarithms:"
21 { $subsection fexp }
22 { $subsection flog }
23 "Powers:"
24 { $subsection fpow }
25 { $subsection fsqrt } ;
26
27 ABOUT: "math.libm"
28
29 HELP: facos
30 { $values { "x" real } { "y" real } }
31 { $description "Calls the inverse trigonometric cosine function from the C standard library. User code should call " { $link acos } " instead." } ;
32
33 HELP: fasin
34 { $values { "x" real } { "y" real } }
35 { $description "Calls the inverse trigonometric sine function from the C standard library. User code should call " { $link asin } " instead." } ;
36
37 HELP: fatan
38 { $values { "x" real } { "y" real } }
39 { $description "Calls the inverse trigonometric tangent function from the C standard library. User code should call " { $link atan } " instead." } ;
40
41 HELP: fatan2
42 { $values { "x" real } { "y" real } { "z" real } }
43 { $description "Calls the two-parameter inverse trigonometric tangent function from the C standard library. User code should call " { $link arg } " instead." } ;
44
45 HELP: fcos
46 { $values { "x" real } { "y" real } }
47 { $description "Calls the trigonometric cosine function from the C standard library. User code should call " { $link cos } " instead." } ;
48
49 HELP: fsin
50 { $values { "x" real } { "y" real } }
51 { $description "Calls the trigonometric sine function from the C standard library. User code should call " { $link sin } " instead." } ;
52
53 HELP: fcosh
54 { $values { "x" real } { "y" real } }
55 { $description "Calls the hyperbolic cosine function from the C standard library. User code should call " { $link cosh } " instead." } ;
56
57 HELP: fsinh
58 { $values { "x" real } { "y" real } }
59 { $description "Calls the hyperbolic sine function from the C standard library. User code should call " { $link sinh } " instead." } ;
60
61 HELP: fexp
62 { $values { "x" real } { "y" real } }
63 { $description "Calls the exponential function (" { $snippet "y=e^x" } " from the C standard library. User code should call " { $link exp } " instead." } ;
64
65 HELP: flog
66 { $values { "x" real } { "y" real } }
67 { $description "Calls the natural logarithm function from the C standard library. User code should call " { $link log } " instead." } ;
68
69 HELP: fpow
70 { $values { "x" real } { "y" real } { "z" real } }
71 { $description "Calls the power function (" { $snippet "z=x^y" } ") from the C standard library. User code should call " { $link ^ } " instead." } ;
72
73 HELP: fsqrt
74 { $values { "x" real } { "y" real } }
75 { $description "Calls the square root function from the C standard library. User code should call " { $link sqrt } " instead." } ;