You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4638 Reporter:@Chris00 Assigned to:@xavierleroy Status: closed (set by @xavierleroy on 2011-05-29T10:14:20Z) Resolution: fixed Priority: normal Severity: feature Version: 3.11.0+beta Fixed in version: 3.12.0+dev Category: ~DO NOT USE (was: OCaml general)
Bug 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.
The text was updated successfully, but these errors were encountered:
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.
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?
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.
Original bug ID: 4638
Reporter: @Chris00
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2011-05-29T10:14:20Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 3.11.0+beta
Fixed in version: 3.12.0+dev
Category: ~DO NOT USE (was: OCaml general)
Bug 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.
The text was updated successfully, but these errors were encountered: