From: Bil Kleb Date: 2002-02-06T07:40:58+09:00 Subject: Re: smallest non-zero number (and other limits) Yukihiro Matsumoto wrote: > > Hi, Hello. > (a) is already checked by AC_HEADER_STDC in configure, so > that you don't have to add AC_CHECK_HEADERS. You just have to > use STDC_HEADERS instead of HAVE_FLOAT_H. Roger. > (b) Ruby only has double precision float (Float class), why do we > need these FLT_* constants? Excellent point; no need for the LDBL's either... So this narrows it down to ROUNDS, RADIX, MANT_DIG, DIG, MIN_EXP, MAX_EXP, MIN_10_EXP, MAX_10_EXP, MIN, MAX, and EPSILON. Although it would seem that folks would only typically want access to MIN, MAX, EPSILON, DIG, MANT_DIG, and perhaps a spacing function? (The spacing function would be a generalization of EPSILON which takes an argument for the origin as opposed to EPSILON's "1". In other words, what is the "epsilon" about "3.45" or "1.45e+34".) > (c) I still think we should do something other than just ommiting on > non ANSI platforms if we do check. Or just abandon non ANSI C > platforms. "[D]o something" as in compute them in place, search for another header which might have them, or give the user some sort of a failure message when trying to access these when Ruby is compiled with a non-ANSI compiler? Computing them for the general case would require computing the radix of the exponent representation. Does anyone have a bullet-proof radix algorithm lying around? Regards, -- Bil