summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-08 04:50:09 (GMT)
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-08 04:50:09 (GMT)
commit1dee5e34a3d397eb96db0b6bcc8e9cb9858975d0 (patch)
tree5822fdfead1635f2f78cfd0ee69bd61c217ad07f /math.c
parentb140b77926a6e62228f1152157d0348ff5724f89 (diff)
* error.c: RDoc for subclasses of Exception. [ruby-core:28394]
* cont.c: ditto * enumerator.c: ditto * io.c: ditto * math.c: ditto * numeric.c: ditto * proc.c: ditto * re.c: ditto * thread.c: ditto * transcode.c: ditto. Thanks to Run Paint for some of the documentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'math.c')
-rw-r--r--math.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/math.c b/math.c
index 8601b61..3d67312 100644
--- a/math.c
+++ b/math.c
@@ -735,6 +735,22 @@ exp1(sqrt)
/*
+ * Document-class: Math::DomainError
+ *
+ * Raised when a mathematical function is evaluated outside of its
+ * domain of definition.
+ *
+ * For example, since +cos+ returns values in the range -1..1,
+ * its inverse function +acos+ is only defined on that interval:
+ *
+ * Math.acos(42)
+ *
+ * <em>produces:</em>
+ *
+ * Math::DomainError: Numerical argument is out of domain - "acos"
+ */
+
+/*
* The <code>Math</code> module contains module functions for basic
* trigonometric and transcendental functions. See class
* <code>Float</code> for a list of constants that