summaryrefslogtreecommitdiffhomepage
path: root/src/numeric.c
diff options
context:
space:
mode:
authorPaolo Bosetti <[email protected]>2012-05-29 14:32:05 -0700
committerPaolo Bosetti <[email protected]>2012-05-29 14:32:05 -0700
commitd73517877847dab5b345c7fa98091647737bbfe0 (patch)
tree6090a2df49b8093606181e5416e6aa6a5040b0ec /src/numeric.c
parent391f8dcef02cdafeb4e0acc693945acb166a8d09 (diff)
parent1e5d15dbcb977f6d197c24eca4a973ee1c5bf521 (diff)
downloadmruby-d73517877847dab5b345c7fa98091647737bbfe0.tar.gz
mruby-d73517877847dab5b345c7fa98091647737bbfe0.zip
Merge branch 'master' of git://github.com/mruby/mruby into XCode
Diffstat (limited to 'src/numeric.c')
-rw-r--r--src/numeric.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/numeric.c b/src/numeric.c
index 09d55a5de..f26dda424 100644
--- a/src/numeric.c
+++ b/src/numeric.c
@@ -37,12 +37,6 @@
#define fmod(x,y) fmodf(x,y)
#endif
-void
-mrb_num_zerodiv(mrb_state *mrb)
-{
- mrb_raise(mrb, E_ZERODIVISION_ERROR, "divided by 0");
-}
-
static mrb_float
mrb_to_flo(mrb_state *mrb, mrb_value val)
{
@@ -252,7 +246,6 @@ flodivmod(mrb_state *mrb, mrb_float x, mrb_float y, mrb_float *divp, mrb_float *
{
mrb_float div, mod;
- if (y == 0.0) mrb_num_zerodiv(mrb);
mod = fmod(x, y);
if (isinf(x) && !isinf(y) && !isnan(y))
div = x;
@@ -744,7 +737,6 @@ fixdivmod(mrb_state *mrb, mrb_int x, mrb_int y, mrb_int *divp, mrb_int *modp)
{
mrb_int div, mod;
- if (y == 0) mrb_num_zerodiv(mrb);
if (y < 0) {
if (x < 0)
div = -x / -y;
@@ -1043,24 +1035,6 @@ fix_to_f(mrb_state *mrb, mrb_value num)
}
/*
- * Document-class: ZeroDivisionError
- *
- * Raised when attempting to divide an integer by 0.
- *
- * 42 / 0
- *
- * <em>raises the exception:</em>
- *
- * ZeroDivisionError: divided by 0
- *
- * Note that only division by an exact 0 will raise that exception:
- *
- * 42 / 0.0 #=> Float::INFINITY
- * 42 / -0.0 #=> -Float::INFINITY
- * 0 / 0.0 #=> NaN
- */
-
-/*
* Document-class: FloatDomainError
*
* Raised when attempting to convert special float values