[gambit-list] integer->char bootstrap problem: git head goes into infinite loop

Marc Feeley feeley at iro.umontreal.ca
Fri Jan 31 10:29:17 EST 2014


On Jan 30, 2014, at 6:21 PM, Bakul Shah <bakul at bitblocks.com> wrote:

> On Thu, 30 Jan 2014 17:51:26 EST Bradley Lucier <lucier at math.purdue.edu> wrote:
>> 
>> On Jan 30, 2014, at 5:43 PM, Bakul Shah wrote:
>> 
>>> 
>>> On Thu, 30 Jan 2014 16:27:11 EST Marc Feeley <feeley at iro.umontreal.ca> wrote:
>>>> 
>>>> Anyone know of a good portable implementation of those functions
>> (sinh, cosh,
>>>> tanh, asinh, acosh, atanh, expm1, log1p, scalbn)?  I'll take a poor
>>>> implementation if a good one doesn't exist...
>>> 
>>> May be you can use FreeBSD's math lib (originally from Sun).
>>> https://github.com/freebsd/freebsd/tree/master/lib/msun
>> 
>> Yes, this library is a good option (I don't know whether FreeBSD made
>> many changes to the original Sun library).
> 
> There have been a number of changes, support for more arch,
> long double, complex number versions, performance imrovements,
> fixes, etc. etc. You can trawl through its history to see what
> was done. I don't use them enough to know of their accuracy
> and I don't know if exhaustive tests are run regularly. You
> should talk to Bruce Evans and David Schultz for details.

Unfortunately the C code in those library function is very low-level (it directly accesses the bit pattern of the floats).  So I don’t consider them very portable.

On the bright side I have tested MSCV and sinh, cosh, tanh are available in math.h (at least in versions 10, 11 and 12).  So that leaves asinh, acosh, atanh, scalbn, ilogb, expm1, and log1p to implement.

Brad: we’ll definitely need some unit tests for these functions to make sure that switching to the Gambit internal implementation has the precision we need.

Marc




More information about the Gambit-list mailing list