History log of /external/crcalc/src/com/hp/creals/UnaryCRFunction.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9666c57ab247046b716e9c1e56f0dcc7d4a1545f 20-Jun-2015 Hans Boehm <hboehm@google.com> Replace errors by unchecked exceptions

Bug: 20667245

Also makes the exception classes local to CR, consistent with 21st
century programming style.

Change-Id: Iea7956715d8942fa87c6cd68fb6a9ca11ea73b89
/external/crcalc/src/com/hp/creals/UnaryCRFunction.java
b849a8eb275670d2bd9b2dc535231cf333414f5e 21-May-2015 Hans Boehm <hboehm@google.com> Add explicit asin() computation.

Bug: 20729963
Bug: 20480098

Add Taylor-series-based asin() and straightforward acos().

Add tests for the above. We check the new implementation against
the old one, among other things.

Add public ZERO and ONE constants.

Although it's much less elegant, this is significantly faster than
the old inverse(sin) computation. It seems to reduce typical arcsin
computations from small numbers of 100s of msecs to small numbers of
10s of milliseconds. That's still not exactly speedy, but should
be fast enough.

This has the added benefit that the Taylor series computation should
be easily amenable to odd-/even-terms parallelization, if we want more
performance. That's not implemented yet.

The copyright change came from dannyb.

Change-Id: Iedc4ba2d94cd8fdd92cf86d1eb24cc4b273b41f6
/external/crcalc/src/com/hp/creals/UnaryCRFunction.java
a8e45a3255089266ccf6500188a2d31af8634e4a 25-Feb-2015 Hans Boehm <hboehm@google.com> Fix cos() prescaling, clean up inverse, add tests

Cosine arguments close to pi were not correctly prescaled, resulting
in a significantly more expensive computation.

The choice of binary search vs interpolation in the inverse function
algorithm was somewhat random, in that it sometimes counted binary
search steps as "successful" and sometimes not. This caused more binary
search steps than intended, which unfortunately sometimes improved matters.
This fixes the unpredictability and adjust the heuristics to get
performance on tan(atan(large)) back to roughly where we started.

Increase precision a bit more aggressively in the inverse function to
potentially allow superlinear convergence in more cases. I couldn't
reconstruct any meaningful rationale for the old formula.

Add SlowCRTest. Reorganize and fix tests to be consistent with Android
guidelines, more or less. Update COPYRIGHT.txt to reflect the fact
that we own SlowCRTest.

Change-Id: I8e2d3d11672ddfe24fd8ad0c74d05ef11b12cb03
/external/crcalc/src/com/hp/creals/UnaryCRFunction.java
7b2383f4d4d94a6dd29a1f1ac581abf852875fca 27-Nov-2014 Hans Boehm <hboehm@google.com> Some Google improvements from unreleased KitKat CRCalculator

- Add string arguments to exceptions.
- Add basic synchronization for multithreaded use.
- Improve cos() prescaling to keep expression tree depth constant,
independent of argument size.
- Modify TestCR.java for better junit compatibility.

Change-Id: Ib7aa581425f10bdcb43b276d401dc3e285c802be
/external/crcalc/src/com/hp/creals/UnaryCRFunction.java
6db978c639e9bd5ac63fd88cbf3765d8c0fb3271 27-Nov-2014 Hans Boehm <hboehm@google.com> Rename com/sgi to hp/creals

to reflect the latest upstream convention.

Change-Id: I5f49c073342c3bb0953da8bef2908dc289ddebec
/external/crcalc/src/com/hp/creals/UnaryCRFunction.java