summaryrefslogtreecommitdiff
path: root/ext/bigdecimal/bigdecimal_en.html
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bigdecimal/bigdecimal_en.html')
-rw-r--r--ext/bigdecimal/bigdecimal_en.html42
1 files changed, 11 insertions, 31 deletions
diff --git a/ext/bigdecimal/bigdecimal_en.html b/ext/bigdecimal/bigdecimal_en.html
index 2d86adcc6b..a8ced21e01 100644
--- a/ext/bigdecimal/bigdecimal_en.html
+++ b/ext/bigdecimal/bigdecimal_en.html
@@ -233,40 +233,35 @@ division(c = a / b)<BR>
For the resulting number of significant digits of c,see <A HREF="#PREC">Resulting number of significant digits</A>.
</BLOCKQUOTE>
-<LI><B>add</B></LI><BLOCKQUOTE>
+<LI><B>add(b,n)</B></LI><BLOCKQUOTE>
c = a.add(b,n)<BR>
c = a.add(b,n) performs c = a + b.
If n is less than the actual significant digits of a + b,
then c is rounded properly according to the BigDecimal.limit.
</BLOCKQUOTE>
-<LI><B>sub</B></LI><BLOCKQUOTE>
+<LI><B>sub(b,n)</B></LI><BLOCKQUOTE>
c = a.sub(b,n)<BR>
c = a.sub(b,n) performs c = a - b.
If n is less than the actual significant digits of a - b,
then c is rounded properly according to the BigDecimal.limit.
</BLOCKQUOTE>
-<LI><B>mult</B></LI><BLOCKQUOTE>
+<LI><B>mult(b,n)</B></LI><BLOCKQUOTE>
c = a.mult(b,n)<BR>
c = a.mult(b,n) performs c = a * b.
If n is less than the actual significant digits of a * b,
then c is rounded properly according to the BigDecimal.limit.
</BLOCKQUOTE>
-<LI><B>div</B></LI><BLOCKQUOTE>
+<LI><B>div(b[,n])</B></LI><BLOCKQUOTE>
c = a.div(b,n)<BR>
c = a.div(b,n) performs c = a / b.
If n is less than the actual significant digits of a / b,
-then c is rounded properly according to the BigDecimal.limit.
-
+then c is rounded properly according to the BigDecimal.limit.<BR>
+If n is not given,then the result will be an integer(BigDecimal) like Float#div.
</BLOCKQUOTE>
-<LI><B>%</B></LI><BLOCKQUOTE>
-r = a%b <BR>
-is the same as:<BR>
-r = a-((a/b).floor)*b<BR>
-</BLOCKQUOTE>
<LI><B>fix</B></LI><BLOCKQUOTE>
c = a.fix<BR>
returns integer part of a.<BR>
@@ -350,26 +345,6 @@ If n<0,then the n-th digit counted from the decimal point in integer part is pro
c = BigDecimal::new("1.23456").truncate(4) # ==> 1.2345
c = BigDecimal::new("15.23456").truncate(-1) # ==> 10.0
</PRE></CODE>
-
-</BLOCKQUOTE>
-<LI><B>divmod</B></LI><BLOCKQUOTE>
-c,r = a.divmod(b) # a = c*b + r<BR>
-returns the quotient and remainder of a/b.<BR>
-a = c * b + r is always satisfied.<BR>
-where c is the integer satisfying
-c = (a/b).floor <BR>
-and,therefore
-r = a - c*b<BR>
-
-</BLOCKQUOTE>
-<LI><B>remainder</B></LI><BLOCKQUOTE>
-r=a.remainder(b)<BR>
-returns the remainder of a/b.<BR>
-where c is the integer satisfying
-c = (a/b).fix <BR>
-and,therefore:
-r = a - c*b<BR>
-
</BLOCKQUOTE>
<LI><B>abs</B></LI><BLOCKQUOTE>
c = a.abs<BR>
@@ -483,6 +458,11 @@ The same as ** method.<BR>
c = a.power(n)<BR>
returns the value of a powered by n(c=a**n).
n must be an integer.<BR>
+</BLOCKQUOTE>
+
+<LI><B>divmod,quo,modulo,%,remainder</B></LI><BLOCKQUOTE>
+See,corresponding methods in Float class.
+</BLOCKQUOTE>
</BLOCKQUOTE>
<LI><B>&lt;=&gt;</B></LI><BLOCKQUOTE>