summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2008-08-01 01:24:25 +0000
committerdas <das@FreeBSD.org>2008-08-01 01:24:25 +0000
commit2edbbc399729c04094d4ccbcfdc5bf8f55f8f0c4 (patch)
tree8bec6766303c8787f3622a66409d254e7f707b86 /crypto
parent0cc238e33974e4198f76ec49aab623bd9510bcd3 (diff)
downloadFreeBSD-src-2edbbc399729c04094d4ccbcfdc5bf8f55f8f0c4.zip
FreeBSD-src-2edbbc399729c04094d4ccbcfdc5bf8f55f8f0c4.tar.gz
Fix some problems with asinf(), acosf(), atanf(), and atan2f():
- Adjust several constants for float precision. Some thresholds that were appropriate for double precision were never changed when these routines were converted to float precision. This has an impact on performance but not accuracy. (Submitted by bde.) - Reduce the degrees of the polynomials used. A smaller degree suffices for float precision. - In asinf(), use double arithmetic in part of the calculation to avoid a corner case and some complicated arithmetic involving a division and some buggy constants. This improves performance and accuracy. Max error (ulps): asinf acosf atanf before 0.925 0.782 0.852 after 0.743 0.804 0.852 As bde points out, it's cheaper for asin*() and acos*() to use polynomials instead of rational functions, but that's a task for another day.
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud