From: gotoken / math.sci.hokudai.ac.jp (GOTO Kentaro)
Subject: [ruby-math:00156] libm
Date: Fri, 28 Jan 2000 10:33:59 +0900 (JST)

るびきちです。

> ちゅーわけで、libm 関数を調べようと思うんですが、どうやると
> いいでしょうかねぇ。grep extern /usr/include/math.h の結果を

うちの環境 (Debian GNU/Linux) では grep __MATHCALL /usr/include/mathcalls.h
とやる必要がありました。

   __MATHCALL (NAME,[_r], (ARGS...));
   This is just like __MATHCALL but for a function returning `TYPE'
__MATHCALL (acos,, (_Mdouble_ __x));
__MATHCALL (asin,, (_Mdouble_ __x));
__MATHCALL (atan,, (_Mdouble_ __x));
__MATHCALL (atan2,, (_Mdouble_ __y, _Mdouble_ __x));
__MATHCALL (cos,, (_Mdouble_ __x));
__MATHCALL (sin,, (_Mdouble_ __x));
__MATHCALL (tan,, (_Mdouble_ __x));
__MATHCALL (cosh,, (_Mdouble_ __x));
__MATHCALL (sinh,, (_Mdouble_ __x));
__MATHCALL (tanh,, (_Mdouble_ __x));
__MATHCALL (acosh,, (_Mdouble_ __x));
__MATHCALL (asinh,, (_Mdouble_ __x));
__MATHCALL (atanh,, (_Mdouble_ __x));
__MATHCALL (exp,, (_Mdouble_ __x));
__MATHCALL (frexp,, (_Mdouble_ __x, int *__exponent));
__MATHCALL (ldexp,, (_Mdouble_ __x, int __exponent));
__MATHCALL (log,, (_Mdouble_ __x));
__MATHCALL (log10,, (_Mdouble_ __x));
__MATHCALL (expm1,, (_Mdouble_ __x));
__MATHCALL (log1p,, (_Mdouble_ __x));
__MATHCALL (logb,, (_Mdouble_ __x));
__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr));
__MATHCALL (pow,, (_Mdouble_ __x, _Mdouble_ __y));
__MATHCALL (sqrt,, (_Mdouble_ __x));
__MATHCALL (cbrt,, (_Mdouble_ __x));
__MATHCALL (ceil,, (_Mdouble_ __x));
__MATHCALL (fabs,, (_Mdouble_ __x));
__MATHCALL (floor,, (_Mdouble_ __x));
__MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y));
__MATHCALL (copysign,, (_Mdouble_ __x, _Mdouble_ __y));
__MATHCALL (scalbn,, (_Mdouble_ __x, int __n));
__MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y));
__MATHCALL (significand,, (_Mdouble_ __x));
__MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
__MATHCALL (erf,, (_Mdouble_));
__MATHCALL (erfc,, (_Mdouble_));
__MATHCALL (gamma,, (_Mdouble_));
__MATHCALL (j0,, (_Mdouble_));
__MATHCALL (j1,, (_Mdouble_));
__MATHCALL (jn,, (int, _Mdouble_));
__MATHCALL (lgamma,, (_Mdouble_));
__MATHCALL (y0,, (_Mdouble_));
__MATHCALL (y1,, (_Mdouble_));
__MATHCALL (yn,, (int, _Mdouble_));
__MATHCALL (gamma,_r, (_Mdouble_, int *));
__MATHCALL (lgamma,_r, (_Mdouble_, int *));
__MATHCALL (rint,, (_Mdouble_ __x));
__MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n));
__MATHCALL (nextafter,, (_Mdouble_ __x, _Mdouble_ __y));
__MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y));