Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004638OCaml~DO NOT USE (was: OCaml general)public2008-11-05 17:132011-05-29 12:14
ReporterChristophe Troestler 
Assigned Toxleroy 
PlatformOSOS Version
Product Version3.11.0+beta 
Target VersionFixed in Version3.12.0+dev 
Summary0004638: Provide expm1 and log1p
DescriptionThe functions expm1 and log1p are important in some situations to avoid loss of precision. It will be nice to have them available in OCaml by default.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
xleroy (administrator)
2008-11-09 10:20

I agree expm1 and log1p are useful. The problem is that these functions are not in the C89 standard ("ANSI C"), only in C99. In particular, Microsoft's standard library does not implement them. So, we have a cross-platform portability issue here.

In the meantime, there exists numerically-accurate implementations in terms of regular exp() and log(), due to W. Kahan himself: [^]
Maybe these would be good enough for your application.

Christophe Troestler (reporter)
2008-12-11 15:58
edited on: 2008-12-11 15:58

Thanks for your prompt reply. Since I use Linux, I did a direct binding to the C function but maybe, for windows, a binding to fdlibm [^] can maybe envisioned?

xleroy (administrator)
2009-04-01 18:11

Tentative implementation in CVS trunk. Use Kahan's magic formulae if the C library doesn't provide the functions. Scheduled for inclusion in release 3.12.0.

- Issue History
Date Modified Username Field Change
2008-11-05 17:13 Christophe Troestler New Issue
2008-11-09 10:20 xleroy Note Added: 0004718
2008-11-09 10:20 xleroy Status new => acknowledged
2008-12-11 15:58 Christophe Troestler Note Added: 0004794
2008-12-11 15:58 Christophe Troestler Note Edited: 0004794
2009-03-31 13:47 xleroy Status acknowledged => assigned
2009-03-31 13:47 xleroy Assigned To => xleroy
2009-04-01 18:11 xleroy Note Added: 0004896
2009-04-01 18:11 xleroy Status assigned => resolved
2009-04-01 18:11 xleroy Resolution open => fixed
2009-04-01 18:11 xleroy Fixed in Version => 3.12.0+dev
2011-05-29 12:14 xleroy Status resolved => closed
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker