]> gitweb.factorcode.org Git - factor.git/blob - basis/math/libm/libm-docs.factor
Merge branch 'master' of git://factorcode.org/git/factor into constraints
[factor.git] / basis / 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 { $warning
7 "These functions are unsafe. The compiler special-cases them to operate on floats only. 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 "USE: math.functions" "2.0 acos ." "C{ 0.0 1.316957896924817 }" }
9 { $unchecked-example "USE: math.libm" "2.0 facos ." "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 { $subsection flog10 }
24 "Powers:"
25 { $subsection fpow }
26 { $subsection fsqrt } ;
27
28 ABOUT: "math.libm"
29
30 HELP: facos
31 { $values { "x" real } { "y" real } }
32 { $description "Calls the inverse trigonometric cosine function from the C standard library. User code should call " { $link acos } " instead." } ;
33
34 HELP: fasin
35 { $values { "x" real } { "y" real } }
36 { $description "Calls the inverse trigonometric sine function from the C standard library. User code should call " { $link asin } " instead." } ;
37
38 HELP: fatan
39 { $values { "x" real } { "y" real } }
40 { $description "Calls the inverse trigonometric tangent function from the C standard library. User code should call " { $link atan } " instead." } ;
41
42 HELP: fatan2
43 { $values { "x" real } { "y" real } { "z" real } }
44 { $description "Calls the two-parameter inverse trigonometric tangent function from the C standard library. User code should call " { $link arg } " instead." } ;
45
46 HELP: fcos
47 { $values { "x" real } { "y" real } }
48 { $description "Calls the trigonometric cosine function from the C standard library. User code should call " { $link cos } " instead." } ;
49
50 HELP: fsin
51 { $values { "x" real } { "y" real } }
52 { $description "Calls the trigonometric sine function from the C standard library. User code should call " { $link sin } " instead." } ;
53
54 HELP: fcosh
55 { $values { "x" real } { "y" real } }
56 { $description "Calls the hyperbolic cosine function from the C standard library. User code should call " { $link cosh } " instead." } ;
57
58 HELP: fsinh
59 { $values { "x" real } { "y" real } }
60 { $description "Calls the hyperbolic sine function from the C standard library. User code should call " { $link sinh } " instead." } ;
61
62 HELP: fexp
63 { $values { "x" real } { "y" real } }
64 { $description "Calls the exponential function (" { $snippet "y=e^x" } " from the C standard library. User code should call " { $link exp } " instead." } ;
65
66 HELP: flog
67 { $values { "x" real } { "y" real } }
68 { $description "Calls the natural logarithm function from the C standard library. User code should call " { $link log } " instead." } ;
69
70 HELP: flog10
71 { $values { "x" real } { "y" real } }
72 { $description "Calls the base 10 logarithm function from the C standard library. User code should call " { $link log10 } " instead." } ;
73
74 HELP: fpow
75 { $values { "x" real } { "y" real } { "z" real } }
76 { $description "Calls the power function (" { $snippet "z=x^y" } ") from the C standard library. User code should call " { $link ^ } " instead." } ;
77
78 HELP: fsqrt
79 { $values { "x" real } { "y" real } }
80 { $description "Calls the square root function from the C standard library. User code should call " { $link sqrt } " instead." } ;