mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
2000-05-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
acbb1c9434
commit
fedf48986d
69 changed files with 1841 additions and 1455 deletions
14
numeric.c
14
numeric.c
|
@ -1,4 +1,4 @@
|
|||
/************************************************
|
||||
/**********************************************************************
|
||||
|
||||
numeric.c -
|
||||
|
||||
|
@ -8,12 +8,12 @@
|
|||
|
||||
Copyright (C) 1993-2000 Yukihiro Matsumoto
|
||||
|
||||
************************************************/
|
||||
**********************************************************************/
|
||||
|
||||
#include "ruby.h"
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#if defined(FreeBSD) && __FreeBSD_version < 400012
|
||||
#if defined(__FreeBSD__) && __FreeBSD__ < 4
|
||||
#include <floatingpoint.h>
|
||||
#endif
|
||||
|
||||
|
@ -28,10 +28,6 @@ VALUE rb_cFixnum;
|
|||
VALUE rb_eZeroDivError;
|
||||
VALUE rb_eFloatDomainError;
|
||||
|
||||
ID rb_frame_last_func();
|
||||
VALUE rb_float_new();
|
||||
double rb_big2dbl();
|
||||
|
||||
void
|
||||
rb_num_zerodiv()
|
||||
{
|
||||
|
@ -1451,7 +1447,7 @@ fix_zero_p(num)
|
|||
void
|
||||
Init_Numeric()
|
||||
{
|
||||
#if defined(FreeBSD) && __FreeBSD_version < 400012
|
||||
#if defined(__FreeBSD__) && __FreeBSD__ < 4
|
||||
/* allow divide by zero -- Inf */
|
||||
fpsetmask(fpgetmask() & ~(FP_X_DZ|FP_X_INV|FP_X_OFL));
|
||||
#endif
|
||||
|
@ -1459,7 +1455,7 @@ Init_Numeric()
|
|||
to_i = rb_intern("to_i");
|
||||
|
||||
rb_eZeroDivError = rb_define_class("ZeroDivisionError", rb_eStandardError);
|
||||
rb_eFloatDomainError = rb_define_class("FloatDomainError", rb_eStandardError);
|
||||
rb_eFloatDomainError = rb_define_class("FloatDomainError", rb_eRangeError);
|
||||
rb_cNumeric = rb_define_class("Numeric", rb_cObject);
|
||||
|
||||
rb_include_module(rb_cNumeric, rb_mComparable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue