Re: accuracy of asinh and atanh

2018-08-03 Thread George Colpitts
I believe there was but IMHO calling the libm library function is the better solution, as discussed in the previous emails below. Less maintenance, less testing, and possibly better performance, e.g. as explained here :

Re: accuracy of asinh and atanh

2018-08-02 Thread Artem Pelenitsyn
Thanks David! Indeed, here is the commit and ticket: https://github.com/ghc/ghc/commit/3ea33411d7cbf32c20940cc72ca07df6830eeed7 https://ghc.haskell.org/trac/ghc/ticket/14927 This concerns only `asinh` though. The implementation is closer to what Matt proposes in his package but simpler.

Re: accuracy of asinh and atanh

2018-08-02 Thread David Feuer
Wasn't there a very recent commit to improve these functions, by leftaroundabout? On Thursday, August 2, 2018 8:16:10 AM EDT Artem Pelenitsyn wrote: > Here is the patch: https://phabricator.haskell.org/D5034 > > -- > Best, Artem > > On Thu, 2 Aug 2018 at 06:26 Artem Pelenitsyn wrote: > > >

Re: accuracy of asinh and atanh

2018-08-01 Thread Artem Pelenitsyn
Here is the patch: https://phabricator.haskell.org/D5034 -- Best, Artem On Thu, 2 Aug 2018 at 06:26 Artem Pelenitsyn wrote: > I'd be willing to do this. > > -- > Best wishes, > Artem > > > On Thu, 2 Aug 2018, 04:38 Matt Peddie, wrote: > >> Thanks, Ben, for chiming in. I think calling out to

Re: accuracy of asinh and atanh

2018-08-01 Thread Artem Pelenitsyn
I'd be willing to do this. -- Best wishes, Artem On Thu, 2 Aug 2018, 04:38 Matt Peddie, wrote: > Thanks, Ben, for chiming in. I think calling out to C for these > functions is the way to go if it's now feasible. (Calling out to libm > is the workaround I'm using in the application that led

Re: accuracy of asinh and atanh

2018-08-01 Thread Matt Peddie
Thanks, Ben, for chiming in. I think calling out to C for these functions is the way to go if it's now feasible. (Calling out to libm is the workaround I'm using in the application that led me to discover the inaccuracy.) Matt On Thu, Aug 2, 2018 at 11:33 AM, Ben Gamari wrote: > Matt Peddie

Re: accuracy of asinh and atanh

2018-08-01 Thread Ben Gamari
Matt Peddie writes: > Hi George, > > Not a stupid question. I don't have a single source at hand, but I > think I read in a few places on the wiki that calling out to the > system math library is not an option due to the variety of system math > libraries on the platforms GHC supports. It'd be

Re: accuracy of asinh and atanh

2018-06-16 Thread Ben Gamari
Sending again, this time including ghc-devs. Edward Kmett writes: > Note: From skimming your readme it is worth noting that log1p _is_ in base > now (alongside expm1, log1pexp, and log1mexp). We added them all a couple > of years back as a result of the very thread linked in your README. > >

Re: accuracy of asinh and atanh

2018-06-03 Thread Edward Kmett
Note: From skimming your readme it is worth noting that log1p _is_ in base now (alongside expm1, log1pexp, and log1mexp). We added them all a couple of years back as a result of the very thread linked in your README. You need to `import Numeric` to see them, though. Switching to more accurate

accuracy of asinh and atanh

2018-06-01 Thread Matt Peddie
Hi devs, I tried to use asinh :: Double -> Double and discovered that it's inaccurate compared to my system library (GNU libm), even returning -Infinity in place of finite values in the neighborhood of -22 for large negative arguments. `atanh` is also inaccurate compared to the system library.