| Anonymous | Login | Signup for a new account | 2013-05-23 01:38 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0004638 | OCaml | OCaml general | public | 2008-11-05 17:13 | 2011-05-29 12:14 | |||
| Reporter | Christophe Troestler | |||||||
| Assigned To | xleroy | |||||||
| Priority | normal | Severity | feature | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | 3.11.0+beta | |||||||
| Target Version | Fixed in Version | 3.12.0+dev | ||||||
| Summary | 0004638: Provide expm1 and log1p | |||||||
| Description | The 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. | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0004718) 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: http://www.plunk.org/~hatch/rightway.php [^] Maybe these would be good enough for your application. |
|
(0004794) 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 http://www.netlib.org/fdlibm/ [^] can maybe envisioned? |
|
(0004896) 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 |
| Copyright © 2000 - 2011 MantisBT Group |