bdeket
bdeket
Changes from 12 march where only about fllonum-flonum operations. Which are now improved: ``` #lang racket/base (require math/bigfloat math/flonum) (bf-precision 1024) (expt 1.000000000000001 (expt 2 56)) (expt 1.000000000000001 (fl (expt...
Some extra boundaries on the problem: For `(< (abs y) (expt 2 53))` the flonum-flonum path is taken For `(< (log +min.0 (flprev 1.)) (abs y))` the result will be...
Yes you are right, I had an error in my calculation for the second exponent (your `rest-arg`) With the correct version I don't find any error bigger than 2ulp which...
I should have specified this was for bc. https://github.com/racket/racket/blob/fcc5cf9ab597e0dea90112f0e06cab0ce200b7d0/racket/src/bc/src/number.c#L3051 Currently with: ``` #lang racket/base (require math/bigfloat racket/math) (define (mytan z) (cond [(< (imag-part z) -354) 0.0-1.0i] [(< 354 (imag-part z))...
My first post was a start for probably a very specific region. Looking at it a bit closer, for `imag-part` < 1 my implementation is a lot worse (errors up...
Great, I was still investigating if this formula performs better everywhere, but lack of time makes my progress a bit slow. I found 2 more problematic regions with my suggested...
I would still like to do this, both in CS and BC. But I don't know when I'll find the time since this is a bit different from my normal...
@gambiteer : I implemented your version. I still added extra checks for the regions where 2x or 2y could go to infinity. I agree that for 2x there is probably...
Thank you for looking at this. 3. As far as I understand, racket has (complex) `tan` defined 'outside' and implemented `tanh` in the `racket/math` library. At the moment for CS...