/********************************************************************** acosh.c - $Author$ $Date$ created at: Fri Apr 12 00:34:17 JST 2002 public domain rewrite of acosh(3), asinh(3) and atanh(3) **********************************************************************/ #include #include #include /* DBL_MANT_DIG must be less than 4 times of bits of int */ #ifndef DBL_MANT_DIG #define DBL_MANT_DIG 53 /* in this case, at least 12 digit precision */ #endif #define BIG_CRITERIA_BIT (1< 0 #define BIG_CRITERIA (1.0*BIG_CRITERIA_BIT) #else #define BIG_CRITERIA (1.0*(1< 0 #define SMALL_CRITERIA (1.0/SMALL_CRITERIA_BIT) #else #define SMALL_CRITERIA (1.0*(1< BIG_CRITERIA) x += x; else x += sqrt((x + 1) * (x - 1)); return log(x); } #endif #ifndef HAVE_ASINH double asinh(x) double x; { int neg = x < 0; double z = fabs(x); if (z < SMALL_CRITERIA) return x; if (z < (1.0/(1< BIG_CRITERIA) { z = log(z + z); } else { z = log(z + sqrt(z * z + 1)); } if (neg) z = -z; return z; } #endif #ifndef HAVE_ATANH double atanh(x) double x; { int neg = x < 0; double z = fabs(x); if (z < SMALL_CRITERIA) return x; z = log(z > 1 ? -1 : (1 + z) / (1 - z)) / 2; if (neg) z = -z; return z; } #endif option> The Ruby Programming Language
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2016-01-17* enc/unicode.c: Fixed a logical error and some comments.duerst
2016-01-17get rid of non-ascii charsnobu
2016-01-17* enc/unicode.c: Removed artificial expansion for Turkic,duerst
2016-01-16* enc/unicode.c: Artificial mapping to test buffer expansion code.duerst
2016-01-16* enc/unicode.c: fix implicit conversion error with clang. fixup r53548.hsbt
2016-01-16* string.c, enc/unicode.c: New code path as a preparation for Unicode-wideduerst
2015-11-26* regcomp.c, regenc.c, regexec.c, regint.h, enc/unicode.c:naruse
2015-08-27unicode.c: no st.hnobu
2015-08-27oniguruma.h: constifynobu
2014-09-15* reg*.c: Merge Onigmo 5.15.0 38a870960aa7370051a3544naruse
2014-06-01constify rb_encoding and OnigEncodingnobu
2014-05-30unicode.c: no initializationnobu
2014-05-30case-folding.rb: perfect hash for case unfolding3nobu
2014-05-30case-folding.rb: perfect hash for case unfolding2nobu
2014-05-30case-folding.rb: perfect hash for case unfolding1nobu
2014-05-30case-folding.rb: perfect hash for case foldingnobu
2014-05-30case-folding.rb: merge tablesnobu
2014-05-23enc/unicode.c: lookup functionsnobu
2014-05-23enc/unicode.c: constifynobu
2012-02-29* regparse.c (is_onechar_cclass): optimize character classnaruse
2012-02-17* Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]naruse
2011-11-20* enc/unicode.c (PROPERTY_NAME_MAX_SIZE): +1.naruse
2011-05-15* remove trailing spaces.nobu
2010-10-03* enc/unicode.c (onigenc_unicode_property_name_to_ctype):naruse
2010-03-01* include/ruby/oniguruma.h: updated to follow Oniguruma 5.9.2.matz
2009-09-10* unicode.c (onigenc_unicode_property_name_to_ctype):naruse
2009-09-08* include/ruby/st.h (st_hash_func): use st_index_t.nobu
2009-08-26* unicode.c (PROPERTY_NAME_MAX_SIZE): use MAX_WORD_LENGTH.naruse
2009-08-26* enc/unicode.c (onigenc_unicode_mbc_case_fold): balanced braces.nobu
2009-08-25Update Oniguruma's UnicodeData to 5.1.naruse
2009-08-21* enc/unicode/name2ctype.h: split from enc/unicode.c and made anobu
2009-08-19* enc/unicode.c (CodeRanges): initialized statically.nobu
2008-09-18* grapheme cluster implementation reverted. [ruby-dev:36375]akr
2008-09-16* include/ruby/oniguruma.h (OnigEncodingTypeST): add precise_retakr
2008-06-17* enc/euc_jp.c (property_name_to_ctype): core dumped when sizeof(int)mame