Elementary Functions

Carlos O'Donell carlos@systemhalted.org
Mon Jan 13 16:49:00 GMT 2020


On Mon, Jan 13, 2020 at 10:09 AM N.G. Timmons <ngt26@cam.ac.uk> wrote:
>
> Hi,
>
> I was looking through the source for sin/cos/exp etc. and noticed that a
> lot of the comments don't actually say what/why things are being done.
> There also exists a union type called "mynumber" which is used to access
> the high and low bits of a 64-bit floating point number.
>
> I would like to comment the elementary functions with:
>      - What algorithm is being used
>      - Why is it being used
>      - Any caveats on unusual operations so future changes can be made
> safely
>      - Actual testing information (the current statistics given at the
> top of some functions doesn't say how they were tested). This is to
> allow for verification and comparison if future changes are made.
>
> I would like to rename 'mynumber' and a few other variables to
> meaningful names so that the source code can be followed with greater
> ease.
>
> Would the community be open to me making these changes?

I think such changes would be great.

The various elementary math functions are part of glibc and we don't
import that code from anywhere anymore
(https://sourceware.org/glibc/wiki/SharedSourceFiles).

Joseph Myers does a lot of review of these functions and given your
email address I expect you might know him? :-)

Please post to libc-alpha@sourceware.org so core developers can see your post.

Usually libc-help is for help of one kind or another, and your
question is more directly related to developers.

Thanks!

Cheers,
Carlos.



More information about the Libc-help mailing list