Post Reply 
(Free42) accuracy of LN1+X
06-14-2020, 01:09 AM
Post: #8
RE: (Free42) accuracy of LN1+X
I've not checked the Intel code for this function, but the library does make use of binary floating point functions in several places.

This function is actually fairly easy to implement once its problems are realised. The code on the 34S is:

Code:
decNumber *decNumberLn1p(decNumber *r, const decNumber *x) {
    decNumber u, v, w;

    if (decNumberIsSpecial(x) || dn_eq0(x)) {
        return decNumberCopy(r, x);
    }
    dn_p1(&u, x);
    dn_m1(&v, &u);
    if (dn_eq0(&v)) {
        return decNumberCopy(r, x);
    }
    dn_divide(&w, x, &v);
    dn_ln(&v, &u);
    return dn_multiply(r, &v, &w);
}


Pauli
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(Free42) accuracy of LN1+X - Werner - 06-12-2020, 03:23 PM
RE: (Free42) accuracy of LN1+X - grsbanks - 06-12-2020, 08:21 PM
RE: (Free42) accuracy of LN1+X - ijabbott - 06-13-2020, 11:07 AM
RE: (Free42) accuracy of LN1+X - johanw - 06-12-2020, 10:07 PM
RE: (Free42) accuracy of LN1+X - rprosperi - 06-12-2020, 10:45 PM
RE: (Free42) accuracy of LN1+X - Paul Dale - 06-14-2020 01:09 AM
RE: (Free42) accuracy of LN1+X - Paul Dale - 06-14-2020, 10:39 PM



User(s) browsing this thread: 1 Guest(s)