Hi Regina,

I was on sick leave, hence the silence.

On Tuesday, 2008-07-01 14:16:08 +0200, Regina Henschel wrote:

> I'm searching for the functions log1p and expm1 in OOo. The function  
> log1p(x) returns log(1+x) for x near 0, and expm1(x) returns exp(x)-1  
> for x near 0.

C99 compliant compilers should provide them with their math libraries.
GCC and Sun Studio have it, your question sounds as if MSVC does not.
AFAIK Boost provides those functions as well, don't know if the template
works out of the box or would need some Boost library compiled and
linked.

> I've got an ersatz, but I'd be surprised if it was not implemented yet.
>
> If it is really not implemented, I need to know whether my ersatz will  
> work on other compilers than MS Visual Express 9. Can anyone help with 
> that?

It might be that no other supported platform than MSVC would need it..

#ifdef __MSC_VER
double log1p( double x ) { ... }
#endif

may be sufficient. However, I'd try the Boost implementation first, that
might save worries.

  Eike

-- 
 OOo/SO Calc core developer. Number formatter stricken i18n transpositionizer.
 SunSign   0x87F8D412 : 2F58 5236 DB02 F335 8304  7D6C 65C9 F9B5 87F8 D412
 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
 Please don't send personal mail to the [EMAIL PROTECTED] account, which I use 
for
 mailing lists only and don't read from outside Sun. Use [EMAIL PROTECTED] 
Thanks.

Attachment: pgpWssLFdQtlZ.pgp
Description: PGP signature

Reply via email to