shibatch / sleef

SIMD Library for Evaluating Elementary Functions, vectorized libm and DFT
https://sleef.org
Boost Software License 1.0
664 stars 132 forks source link

Reproducing Polynomial Coefficients #258

Open oloeopia opened 5 years ago

oloeopia commented 5 years ago

Would it be possible to get the settings used for each of the gencoef invocations in order to reproduce each of the polynomials?

shibatch commented 5 years ago

For most of them, it is basically possible. Because it involves randomized optimization, the generated coefficients are not bitwise identical.

shibatch commented 5 years ago

Please tell me which functions you want to regenerate coefficients for, if you have difficulty in doing so.

shibatch commented 5 years ago

The settings are included in dp.h and sp.h.

oloeopia commented 5 years ago

Okay, now I see, I was misinterpreting how to use gencoef. I think I can make it work, but if I find one that I can't reproduce an equivalent polynomial with the same error bounds, I will let you know.

shibatch commented 5 years ago

For some functions, you need multiple trials.

oloeopia commented 5 years ago

If you used a deterministic random number generator and saved the seeds that worked, wouldn't you be able to ensure that you get bitwise identical results?

shibatch commented 5 years ago

Yes, it’s possible. I didn’t do that because I didn’t see a demand by users for generating bitwise identical results.