Parent Directory | Revision Log
|Links to HEAD:||(view) (annotate)|
Add or cleanup some docstrings.
Adjust code so that CMUCL can use arrays to store quad-doubles instead of using a (complex double-double-float). With these changes, CMUCL uses arrays and (rt:do-tests) passes successfully. oct.system: o Push :oct-array onto *FEATURES* to use arrays. This is the default if not building on CMUCL. qd-fun.lisp: o Fix two erroneous uses of zerop on a quad-double in sinh-qd and tanh-qd. o Fix two erroneous uses of + on %quad-double; they should have used ADD-QD instead. qd-rep.lisp: o Change conditionalization to allow arrays for CMUCL. o Update compiler macros appropriately. qd.lisp: o Adjust optional target arg appropriately for oct-array feature. o Clean up IGNORE declarations. o Add some more declarations for the target to make CMUCL happier.
Merge the changes from the THREE-ARG-BRANCH to HEAD.
qd-rep.lisp: o Fix typo in compiler macro for sub-d-qd qd.lisp: o Use 3-arg versions in div-qd-t to speed things up. Approximately doubles the speed with clisp. qd-fun.lisp: o Use 3-arg versions in sqrt-qd to speed things up. Approximately doubles the speed with clisp.
Compare against pi/4 quad-double, not double-float.
Add another implementation of REM-PI/2-INT. This extracts just the part of 2/pi that is needed to compute the desired result instead of multiplying by all l584 bits of 2/pi. Not yet used.
qd-fun.lisp: o Remove extra rem-pi/2-int. qd-rep.lisp: o Fix typo in float-infinity-p for Allegro. o Ignore var in float-infinity-p and friends.
o Add default implementation of float-infinity-p, float-nan-p, float-trapping-nan-p. These return NIL by default, unless the Lisp implementation has a suitable version. o Remove CMU conditionalization for float-infinity-p, float-nan-p, float-trapping-nan-p.
qd-package.lisp: o Don't :USE CMUCL's EXTENSIONS package anymore. Import just the symbols we need. qd-class.lisp: o No need to use package qualifiers. qd-fun.lisp: o Need package qualifier for MAYBE-INLINE. qd.lisp: o Need package qualifier for *INLINE-EXPANSION-LIMIT* .
o Oops. Fix up a few IN-PACKAGE's for the new package names. qd-fun.lisp: o Comment out the old sin/cos routines o Fix a few mistakes in accurate-sincos-qd o Rename accurate-sincos-qd to sincos-qd.
o Rename QUAD-DOUBLE-INTERNAL package to OCT-INTERNAL, with nickname OCTI instead of QDI. o Rename OCT package to NET.COMMON-LISP.OCT, with a nickname of OCT o Remove nickname of QD. (Conflicts with other packages dealing with quad-doubles.) o Update all uses of QDI: to OCTI: qd-fun.lisp: o Add REM-PI/2 to do a simpler computation if the arg is small enough. Otherwise, use the accurate but expensive rem operation. o Renamed ACCURATE-SIN-QD to SIN-QD, etc. o Update SIN-QD etc to use REM-PI/2.
o Fix some typos accurate-sin-qd and accurate-cos-qd. o Adjust code in accurate-sin-qd and accurate-cos-qd to handle values of 0 <= j <= 3, instead of -1 <= j <= 2. o Add accurate-sincos-qd.
o New routine to compute x mod pi/2 accurately, using many bits of 2/pi. o Implement accurate sin and cos routines to use this new routine. (Not used yet.)
o Move logb-finite before first use. o Declare arg as double-float, not float.
qd-fun.lisp: o Remove unused var R1 in EXP-QD/REDUCE. o TAN-QD was calling ZEROP instead of ZEROP-QD. o Comment out extra copy of ASINH-QD. qd-io.lisp: o Ignore unused var in QD-PRINT-EXPONENT and QD-READER. qd.lisp: o Remove extra version of DIV-QD.
Add license information (MIT).
Move various implementations of algorithms to a separate file. qd-fun.lisp: o Move implementations and timing/test functions to other file. qd-extra.lisp: o Stuff here. qd.system: o Add new system for the extra stuff.
Handle infinities in sinh-qd, cosh-qd, acosh-qd.
Signal an overflow (or divide-by-zero) for exp of large arguments.
Sqrt(-0d0) is -0d0. Do the same for quad-doubles.
Handle infinities a bit better. o sqrt(inf) = inf o expm1(+/-inf) = inf or +0 o log1p(inf) = inf o log(inf) = inf o log(+0) = -inf (but signal overflow) o sinh(+/-inf) = +/-inf o asinh(+/-inf) = +/-inf
Make ATANH-QD of +/- 1 signal a division by zero error or return infinity, if traps are disabled.
Change exit condition from < to <= since very small values of the arg would set the threshold to 0 and we'd never exit the loop. (Should we change the threshold to be something else? if x is less than about 1d-33, we don't need any more terms of the taylor series.)
o Fix debugging prints to use qdi::qd-format. o Oops. Desired iteration was chosen incorrectly if xx and yy had different signs.
qd-fun.lisp: o SQRT-QD has round-off problems for very large and very small numbers. Solve this by scaling the number by a power of 4 before computing the square root. o Moved LOGB-FINITE and the core of QD-CSSQS to this file from qd-methods.lisp. Rename the core routine as HYPOT-QD. o Use it in ATAN-QD/NEWTON to get rid of unnecessary overflow. qd-methods.lisp: o Moved LOGB-FINITE and the core of QD-CSSQS from this file to qd-fun.lisp. Use HYPOT-QD in QD-CSSQS. qd-package.lisp: o Export HYPOT-QD.
o Make the overflow and underflow thresholds for EXP-QD a little tighter. o Rearrange the computations in LOG-QD/HALLEY to get rid of premature overflow. o Improve TANH-QD so we don't get spurious overflows. Leave the possibility of producing very accurate values of TANH-QD for large arguments.
ASINH-QD and ACOSH-QD overflows prematurely. Rearrange algorithm to handle larger numbers. We still have problems for numbers near MOST-POSITIVE-DOUBLE-FLOAT, though.
Add comments. Use #:qdi instead of "QDI".
Use explicit loops instead of manually unrolling them. The cost of the loop is tiny compared to any quad-double operation. This makes the code smaller too.
Add times for Ultrasparc II.
Update times for ppc with fused-multiply
Update times for x86.
Conditionalize the calls to GC in the timing functions.
Return appropriately signed zeroes for sin, tan, sinh, tanh.
o Conditionalize a maybe-inline declaration. (Noted by R. Fateman.) o ATAN2-QD supports signed zeroes. (Except for the 0,0 case, where it produces an error. Should this be fixed?)
Add comment about division by zero in tan-qd.
Add some comments.
Update times for x86 (not-inlined).
o Use the recursive agm-qd. Seems to be a bit faster. o Update timings for sparc.
o Declare sqrt-qd as maybe-inline so it can be inlined. o Don't inline agm-qd o Update times for ppc and x86.
o Create a QUAD-DOUBLE-INTERNAL package for the internal stuff in qd.lisp and friends o create QUAD-DOUBLE package for the quad-double class. o Update in-package forms appropriately. o Export the necessary QUAD-DOUBLE-INTERNAL symbols so QUAD-DOUBLE can use them.
Change 1- to cl:1-.
Change all basic arithmetic operations to use the CL: package prefix, in case we add a package that shadows these operations for real quad-double integration.
Add a simple random number generator.
Update PPC times.
Update sparc timing with not-inlined version.
Increase number of reps for time-exp, time-log. Update times for sparc.
Add simple docstrings.
o Take advantage of mixed operations between double-floats and quad-doubles instead of coercing the double-float to a quad-double first. o Add some comments. o Update some timing info.
More timing results.
Update times with PPC with fused multiply-add.
o Missed some places where +qd-zero+ and +qd-one+ could be used. o Add some timing measurements when the functions are not inlined. Some serious slow downs and massive increase in consing in some cases.
Add test for tan-qd.
qd-fun.lisp: o Add some docstrings o Rename many of the functions to give them reasonably consistent naming scheme. o Add the main entry functions that call one of the various implementations. o Move timing functions to the end. qd-test.lisp: o Update for name changes.
o Update Sparc timings o Add function to compute atan via Cordic o Rename TAN-QD to CORDIC-TAN-QD o Add TAN-QD that computes tan via sin/cos.
Use +qd-zero+ and +qd-one+ in more places.
qd-const.lisp: o Add +QD-ZERO+ and +QD-ONE+ qd-fun.lisp: o Use the new constants as needed o Use PLUSP-QD instead of QD->. o Update timing info with PPC results.
o Remove extraneous print. o Update test and results for atan2 o Fix bug in time-atan2.
qd.lisp: o MAKE-QD-D takes optional args now, so you don't have to specify all four components now. The rest default to 0. If no optional args are given, a quick optimization is possible since renorm-4 isn't needed. o Take advantage of the new definition of MAKE-QD-D, especially when only the first arg is non-zero. o Add new functions: ZEROP-QD, ONEP-QD, PLUSP-QD, MINUSP-QD, QD-= qd-fun.lisp: o Use new MAKE-QD-D, and other new functions. o Change calls to MAKE-QD-DD to MAKE-QD-D when possible. With these changes, most of the code no longer depends on having a double-double type.
Update sparc timings.
Add/update timing info for x86.
Use only the version of sqrt-qd in qd-fun.lisp.
Add x86 timing.
Update with sparc times.
Add timing for PPC.
Clean up timing info.
Add function to time atan. Give some results for ppc.
atan2-qd was wrong for y > x. Fix it.
o Add Halley's iteration for computing log. o Update some timing results o Add accuracy results too.
Use +qd-log2-extra+ to give a little extra precision when computing the log after arg reduction.
Add more accurate (but slower) acosh.
Implement more accurate versions of asinh and atanh.
Add function to compute exp from log, via Newton iteration.
o Define iterative version of agm. o Add atan using agm.
Add log-agm3-qd that seems to run a little faster because one AGM iteraton is removed.
o Remove some debugging prints o Change the threshold for log-agm2-qd from 6 to 7 since the decode-float is off by 1. o Add function to time the different log implementations.
Oops. q^8 is (q^4)^2.
Add Sasaki and Kanada's version of log. This needs work because the results are a bit off.
o Add more implementations of log: - log1p-qd: Brent's duplication formula - agm-qd: AGM algorithm - log-agm-qd: log using AGM algorithm o Add simple implementation of asinh, acosh, atanh.
Implement sinh, cosh, tanh.
Add implementation of expm1(x) = exp(x) - 1.
Compiling SQRT-QD in qd-fun.lisp causes CMUCL to get a BAD-COERCE-ERROR on ppc and x86. This doesn't happen on sparc. Therefore, move SQRT-QD to qd-fun.lisp. We need to track this down.
qd-fun.lisp: o Comment out SQRT-QD. qd.lisp: o Enable SQRT-QD here. o Block compile more stuff again, including SQRT-QD. This appears to make SQRT-QD about 50% faster and cons 1/5 as much. Other things seem to be faster and less consy too. These changes tested ok on latest (2007-04-12) CVS version on sparc. There may be issues on other platforms.
o Remove some prints o Make ATAN-D work. o Rename ATAN2-QD that used the CORDIC algorithm to be CORDIC-ATAN2-QD so we can compure the two versions. Currently, it looks like the CORDIC version is faster.
o Comment out extraneous prints o Add implementation of TAN for quad-doubles using CORDIC. o Add implementation of CORDIC for computing sin. This works, but needs some more care because the scale factor is wrong for the number of iterations currently done. It also takes longer than SIN-QD does now.
Update the double-float cordic routine to do the same thing as the quad-double version.
Add another reference to the CORDIC implementation.
o Add atan-qd, asin-qd, and acos-qd
Add implementation of CORDIC routine for computing atan2.
Add CORDIC routine for computing atan2 for quad-doubles. Needs more testing.
Put everything in the QD package.
o Move sqrt-qd function here, from qd.lisp. o Add functions needed for computing some trig functions: - SINCOS-QD - ATAN2-QD (This seems not to work.) o Add some functions to experiment with Cordic algorithms for double-floats.
quad-double initial import
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.
|Powered by ViewVC 1.1.5|