Raymond Toy [Wed, 7 Nov 2007 03:45:41 +0000]
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.
Raymond Toy [Wed, 7 Nov 2007 03:08:26 +0000]
o Add 3-arg forms for add-qd-d, mul-qd-d, add-d-qd, sub-qd-d,
sub-d-qd, and neg-qd.
o Correct the compiler macros for CMUCL for sub-qd and sqr-qd.
Raymond Toy [Mon, 5 Nov 2007 16:00:53 +0000]
Update timings.
Raymond Toy [Mon, 5 Nov 2007 16:00:39 +0000]
Cosmetic
Raymond Toy [Sun, 4 Nov 2007 16:31:45 +0000]
Oops. Make sqr-qd-t inline.
Raymond Toy [Sun, 4 Nov 2007 03:00:56 +0000]
o Add support for SQR-QD-T
o Add compiler macro for SQR-QD.
Raymond Toy [Sun, 4 Nov 2007 02:51:39 +0000]
Update timing data.
Raymond Toy [Sun, 4 Nov 2007 02:45:01 +0000]
o Move compiler macros from qd.lisp to qd-rep.lisp
o Declare add-qd-t, mul-qd-t and div-qd-t as inline functions so that
everything is still fast on cmucl.
Raymond Toy [Fri, 2 Nov 2007 20:45:32 +0000]
Oops. %STORE-QD-D wasn't returning the target value.
Raymond Toy [Fri, 2 Nov 2007 20:11:42 +0000]
First cut at adding a 3-arg versions of the basic operations to reduce
consing by allowing the third argument to be a place where the result
can be stored. This is intended to help reduce allocation and gc
costs for Lisps that use arrays to represent quad-doubles.
More work is needed to make the compiler macros do the right thing for
CMUCL.
qd-rep.lisp:
o Add %STORE-QD-D to store a quad-double into a place. For CMUCL,
there place argument is ignored and a fresh quad-double is created.
qd.lisp:
o Modify ADD-QD, SUB-QD, MUL-QD, and DIV-QD to take an optional third
argument indicating where the result can be stored. Ignored on
CMUCL.
o Add ADD-QD-T, SUB-QD-T, MUL-QD-T, and DIV-QD-T, which are 3-arg
functions with the third arg always required which is the storage
area to hold the result. Ignored on CMUCL.
o Add compiler macros to convert ADD-QD and friends to ADD-QD-T if the
third arg is always given. The effect is, essentially, inlining
ADD-QD.
Raymond Toy [Fri, 26 Oct 2007 15:48:15 +0000]
Add Pade approximation for exp. From Richard Fateman.
Experiments show that it is 25% faster than exp-qd/reduce. However,
it loses 3 bits of accuracy compared with exp-qd/reduce.
Raymond Toy [Thu, 18 Oct 2007 14:38:56 +0000]
Compare against pi/4 quad-double, not double-float.
Raymond Toy [Thu, 18 Oct 2007 14:38:11 +0000]
MAKE-QD-DD is only defined for CMUCL, so don't unconditionally inline
it.
Raymond Toy [Wed, 17 Oct 2007 03:44:12 +0000]
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.
Raymond Toy [Tue, 16 Oct 2007 17:09:46 +0000]
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.
Raymond Toy [Tue, 16 Oct 2007 17:05:13 +0000]
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.
Raymond Toy [Tue, 16 Oct 2007 14:21:13 +0000]
Remove duplicate TIME-MUL.
Raymond Toy [Tue, 16 Oct 2007 13:46:01 +0000]
Oops. QDI package no longer exists. Use OCTI.
Raymond Toy [Tue, 16 Oct 2007 13:44:00 +0000]
Oops. %MAKE-QD-D is a macro and not a function for some Lisps, so we
can't multiple-value-call it. Rearrange code accordingly.
Raymond Toy [Tue, 16 Oct 2007 13:42:49 +0000]
Remove CMUCL'isms.
Raymond Toy [Tue, 16 Oct 2007 02:39:21 +0000]
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*
.
Raymond Toy [Mon, 15 Oct 2007 18:54:02 +0000]
o Oops. Fix up a few IN-PACKAGE's for the new package names.
Raymond Toy [Mon, 15 Oct 2007 18:53:43 +0000]
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.
Raymond Toy [Mon, 15 Oct 2007 18:21:46 +0000]
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.
Raymond Toy [Mon, 15 Oct 2007 15:45:33 +0000]
qd.lisp:
o Oops. In INTEGER-DECODE-QD, the signs of the parts were not
computed correctly when combining them into the final integer
result.
rt-tests.lisp:
o Add a test for INTEGER-DECODE-QD.
o Use OCT as the package, not QD.
Raymond Toy [Mon, 15 Oct 2007 03:26:38 +0000]
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.
Raymond Toy [Sun, 14 Oct 2007 18:38:14 +0000]
Add +2/pi-bits+, 1584 bits of 2/pi.
Raymond Toy [Sat, 13 Oct 2007 20:14:45 +0000]
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.)
Raymond Toy [Sat, 13 Oct 2007 15:34:51 +0000]
Redo implementation of INTEGER-DECODE-QD. It used to return way too
many digits if one of the components was 0. This causes problems
because the resulting integer can't even be coerced back to a
quad-double.
Raymond Toy [Sat, 13 Oct 2007 02:14:43 +0000]
Use package #:oct, not #:qd.
Raymond Toy [Thu, 11 Oct 2007 18:59:05 +0000]
Correct the timing info. I accidentally ran the C++ version on a
different (slower) machine. The results make some sense now.
Raymond Toy [Thu, 11 Oct 2007 17:47:08 +0000]
qd-const.lisp:
o Add code for clisp to create the constants we need. (Clisp has
arbitrary length long-float numbers.)
o Update the constants accordingly.
o Move the atan table stuff for CORDIC to qd-extra.lisp, since we
don't need them in oct itself.
qd-extra.lisp:
o atan table stuff for CORDIC moved here.
Raymond Toy [Thu, 11 Oct 2007 16:29:08 +0000]
Initial version.
Raymond Toy [Wed, 10 Oct 2007 15:25:41 +0000]
Ignore *.lib and *.fas too. (Files from clisp)
Raymond Toy [Wed, 10 Oct 2007 15:24:07 +0000]
qd-io.lisp:
o Add RATIONAL-TO-QD, a simple, fast and accurate method to convert
rationals to quad-doubles. (From Richard Fateman.)
o Use RATIONAL-TO-QD to create a quad-float
qd-methods.lisp:
o Use RATIONAL-TO-QD to create a quad-float from a bignum and ratio.
qd-package.lisp:
o Export RATIONAL-TO-QD
Raymond Toy [Wed, 10 Oct 2007 15:21:47 +0000]
o Move logb-finite before first use.
o Declare arg as double-float, not float.
Raymond Toy [Mon, 24 Sep 2007 21:32:15 +0000]
A new version of MAKE-FLOAT that converts the number to rational
before converting to a quad-double. This reduces round-off errors.
This still needs work, I think.
Raymond Toy [Mon, 24 Sep 2007 21:30:07 +0000]
Minor optimization converting a rational to a qd-real. If the
denominator is 1, skip the qd-real division.
Raymond Toy [Mon, 24 Sep 2007 02:37:31 +0000]
Use more bits (265 instead of 212) when converting a rational to a
quad-double. This fixes the issue that converting 10^100 to a
quad-double isn't as accurate as it could be.
Raymond Toy [Thu, 20 Sep 2007 21:04:05 +0000]
Add RATIONALIZE methods. Algorithm graciously provided by Bruno
Haible.
qd-package.lisp:
o Shadow RATIONALIZE
qd-methods.lisp:
o Add RATIONALIZE methods for CL:REAL's and QD-REAL's..
Raymond Toy [Wed, 19 Sep 2007 17:30:04 +0000]
MAKE-QD should handle rationals better instead of converting them to
doubles and then converting the qd-real. Convert the numerator and
denominator to qd-real, and the divide. (This should be done better.)
qd-class.lisp:
o Change method to work on floats, instead of reals.
qd-methods.lisp:
o Add method to handle rationals.
Raymond Toy [Tue, 18 Sep 2007 12:46:36 +0000]
Add method RATIONAL to convert a quad-double to a rational.
qd-package.lisp:
o Appropriately shadow and export RATIONAL.
o Need to export WITH-QD-PARTS from QDI.
qd-methods.lisp:
o Define methods for RATIONAL for reals and qd-reals.
qd-complex.lisp:
o Use CL:RATIONAL as appropriate for the CL rational type.
Raymond Toy [Tue, 18 Sep 2007 11:20:16 +0000]
qd-rep.lisp:
o Add macro WITH-QD-PARTS to extract the components of a quad-double.
qd.lisp:
o Use the macro as needed.
Raymond Toy [Tue, 18 Sep 2007 03:05:56 +0000]
qd-test.lisp:
o Add optional arg to enable/disable printing of results. Default is
on.
rt-tests.lisp:
o Don't print results.
Raymond Toy [Mon, 17 Sep 2007 19:04:23 +0000]
New SCALE-FLOAT-QD implementation that shouldn't suffer from premature
overflow/underflow. (Still issue if the exponent is very large or
very small, though, but not if the exponent is < 2000 or so.)
Raymond Toy [Mon, 17 Sep 2007 17:15:04 +0000]
o Convert THREE-SUM2 to a macro instead of a function (to speed things
up for Allegro and other Lisps that don't inline).
o Update code for the THREE-SUM2 macro.
Raymond Toy [Mon, 17 Sep 2007 14:06:20 +0000]
o Fix typo in ADD-QD-DD that was introduced in the THREE-SUM macro
conversion.
o Slightly simplify ADD-QD-DD too.
Raymond Toy [Mon, 17 Sep 2007 03:08:25 +0000]
o Replace THREE-SUM with a macro to make sure it's inlined
everywhere.
o Update code for new THREE-SUM macro.
Raymond Toy [Mon, 17 Sep 2007 03:07:27 +0000]
Make %MAKE-QD-D a macro to make sure it's inlined.
Raymond Toy [Sun, 16 Sep 2007 14:23:24 +0000]
o Remove old code.
o Inline float-infinity-p.
Raymond Toy [Sun, 16 Sep 2007 05:04:04 +0000]
Make TWO-SUM a macro, just like we did for QUICK-TWO-SUM.
All RT tests pass on CMUCL and Allegro.
qd-package.lisp:
o Don't import C::TWO-SUM anymore.
qd-dd.lisp:
o Make TWO-SUM a macro.
qd.lisp
o Add TWO-SUM macro for CMUCL (which just calls C::TWO-SUM).
o Update all uses of TWO-SUM to use the macro appropriately.
Raymond Toy [Sun, 16 Sep 2007 05:01:16 +0000]
Make QD-0, QD-1, QD-2, and QD-3 macros to make sure access is fast for
all Lisps.
Raymond Toy [Sun, 16 Sep 2007 05:00:00 +0000]
Update dependencies.
Raymond Toy [Sun, 16 Sep 2007 02:46:24 +0000]
To speed up Allegro (and other Lisp's that don't support inline
functions), change QUICK-TWO-SUM from a function to a macro. Note
that macro has different calling convention than the function. This
is needed because Allegro apparently doesn't handle VALUES without
boxing.
All rt tests pass.
qd-package.lisp:
o For CMUCL, don't import C::QUICK-TWO-SUM into the QDI package
anymore.
qd-dd.lisp:
o New QUICK-TWO-SUM macro.
qd.lisp:
o Add CMUCL version of QUICK-TWO-SUM macro, which just calls
C::QUICK-TWO-SUM.
o Update all users of QUICK-TWO-SUM appropriately.
Raymond Toy [Sun, 16 Sep 2007 02:39:29 +0000]
T should be t (for Allegro case-sensitive modern-mode).
Raymond Toy [Thu, 13 Sep 2007 17:28:30 +0000]
Add some comments on how split is supposed to work. Add a note that
if you have a fused multiply-subtract instruction, you can replace
two-prod with a much simpler and faster version.
Raymond Toy [Thu, 13 Sep 2007 16:48:48 +0000]
In SPLIT, compute the constants at compile time (#.) instead of
run-time, in case the Lisp doesn't do it itself.
Raymond Toy [Thu, 13 Sep 2007 16:45:42 +0000]
Some updates from Richard Fateman to make these routines run faster in
Allegro.
Raymond Toy [Thu, 13 Sep 2007 01:07:04 +0000]
Initial version.
Raymond Toy [Thu, 13 Sep 2007 01:06:02 +0000]
Add declarations. Mostly to help Allegro generate much better code.
Raymond Toy [Wed, 12 Sep 2007 21:01:13 +0000]
qd-package.lisp:
o Rearrange some exports so the CMU ones are all grouped together.
o Export new constants pi/2, pi/4, 2pi, and log2.
o Export the qd-real and qd-complex types.
qd-methods.lisp:
o Define new constants for pi/2, pi/4, 2pi, and log2.
o Update some of the macrolets to work with a modern-mode lisp, like
Allegro.
qd-complex.lisp:
o Use the new constants as needed.
Raymond Toy [Wed, 12 Sep 2007 02:31:14 +0000]
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.
Raymond Toy [Wed, 12 Sep 2007 02:03:42 +0000]
Ignore fasl.
Raymond Toy [Thu, 6 Sep 2007 02:58:38 +0000]
Fix qd-complex printer so it prints out something that is readable.
Raymond Toy [Fri, 31 Aug 2007 21:13:36 +0000]
qd-class.lisp:
o Oops. Forgot to rename the defgenerics.
qd-complex.lisp:
o QLOG no longer exists. Use LOG.
qd-methods.lisp:
o QLOG no longer exists. Use LOG.
Raymond Toy [Fri, 31 Aug 2007 19:34:00 +0000]
Oops. Forgot to convert qabs to abs.
Raymond Toy [Fri, 31 Aug 2007 03:11:00 +0000]
Get rid of the extra layer of function calls and define the special
functions as methods directly.
Raymond Toy [Thu, 30 Aug 2007 23:42:24 +0000]
Add methods to handle QD-REAL and CL:COMPLEX and vice-versa for the
four basic arithmetic operations.
Raymond Toy [Thu, 30 Aug 2007 23:41:10 +0000]
Change QD-COMPLEX printer to split the real and imaginary parts onto
separate lines if necessary.
Raymond Toy [Wed, 29 Aug 2007 14:37:42 +0000]
Add CL package qualifier for DECF and INCF.
Raymond Toy [Wed, 29 Aug 2007 14:37:20 +0000]
Oops. Last change went to the wrong spot. Only valid for =.
Raymond Toy [Wed, 29 Aug 2007 14:22:42 +0000]
Forgot to handle comparisons of QD-COMPLEX and another number.
Raymond Toy [Wed, 29 Aug 2007 01:22:03 +0000]
qd-package.lisp:
o Shadow FLOAT-DIGITS
qd-methods.lisp:
o Add FLOAT-DIGITS method.
Raymond Toy [Tue, 28 Aug 2007 16:01:08 +0000]
qd-complex.lisp:
o Add ADD1 and SUB1 methods so we can use 1+ and 1- on quad-doubles.
o Add INCF and DECF macros to support quad-doubles.
qd-package.lisp:
o Forgot to shadow REALP, COMPLEXP, and NUMBERP, previously.
o Shadow and export INCF and DECF.
Raymond Toy [Tue, 28 Aug 2007 14:12:53 +0000]
Add ADD1 method for QD-COMPLEX.
Raymond Toy [Tue, 28 Aug 2007 00:56:18 +0000]
qd-package.lisp:
o Shadow REALP, COMPLEXP, and NUMBERP
qd-complex.lisp:
o Extend REALP, COMPLEXP, and NUMBERP to recognize QD-REAL and
QD-COMPLEX types.
Raymond Toy [Mon, 27 Aug 2007 19:12:22 +0000]
o Fix typo in DESCRIBE-OBJECT for QD-REAL.
o Add DESCRIBE-OJBECT method for QD-COMPLEX.
o Add defgeneric's for COERCE and RANDOM.
Raymond Toy [Mon, 27 Aug 2007 18:05:12 +0000]
Tests using the RT framework.
Raymond Toy [Mon, 27 Aug 2007 18:04:31 +0000]
Add comment on where to get RT.
Raymond Toy [Mon, 27 Aug 2007 17:51:02 +0000]
Moved OCT-TEST system to its own file.
Raymond Toy [Mon, 27 Aug 2007 17:49:19 +0000]
Use uninterned symbols for IN-PACKAGE.
Raymond Toy [Mon, 27 Aug 2007 13:10:50 +0000]
Ignore more fasl types.
Raymond Toy [Sun, 26 Aug 2007 14:37:48 +0000]
qd-methods.lisp:
o Oops. Move COERCE to qd-complex.lisp because we use the #q reader
macro. (This needs to be reorganized better.)
o Add RANDOM methods so we can generate quad-double random numbers.
qd-package.lisp:
o Shadow RANDOM so we can add our own RANDOM to generate quad-doubles.
qd-complex.lisp:
o COERCE moved here.
Raymond Toy [Sat, 25 Aug 2007 21:17:03 +0000]
Fix typo.
Raymond Toy [Sat, 25 Aug 2007 18:49:27 +0000]
Initial revision.
Raymond Toy [Sat, 25 Aug 2007 18:49:11 +0000]
Add license information (MIT).
Raymond Toy [Sat, 25 Aug 2007 17:08:48 +0000]
Add license information (MIT).
Raymond Toy [Sat, 25 Aug 2007 17:08:21 +0000]
Initial revision.
Raymond Toy [Sat, 25 Aug 2007 16:16:53 +0000]
Initial revision.
Raymond Toy [Sat, 25 Aug 2007 02:08:04 +0000]
qd-package.lisp:
o Shadow CL:COERCE and export QD:COERCE
qd-methods.lisp:
o Define methods for COERCE so we can use COERCE with QD-REAL and
QD-COMPLEX.
Raymond Toy [Fri, 24 Aug 2007 21:45:16 +0000]
qd-io.lisp:
o Get rid of the #q reader that returns an internal %qd-real.
qd-methods.lisp:
o QPHASE was returning the wrong kind of object for positive values.
o Replace use of #q0 with the construction of a qd-real 0.
qd-const.lisp:
o Replace all uses of #q with #.(qd-from-string ...).
Raymond Toy [Fri, 24 Aug 2007 20:57:23 +0000]
Document INTEGER-DECODE-QD better.
Raymond Toy [Fri, 24 Aug 2007 20:35:46 +0000]
Add OCT as package nickname.
Raymond Toy [Fri, 24 Aug 2007 01:12:18 +0000]
Changed system from qd to oct.
toy [Thu, 23 Aug 2007 18:42:28 +0000]
Add method for UNARY-DIVIDE of QD-COMPLEX.
toy [Thu, 23 Aug 2007 17:15:06 +0000]
qd-complex.lisp:
o Moved some methods from qd-methods.lisp to here.
o Was missing TWO-ARG-+ for qd-complex and qd-real (and vice versa)
o Fixed mistake in TWO-ARG-- (QD-COMPLEX REAL)
o Fixed mistake in TWO-ARG-- (QD-COMPLEX CL:COMPLEX)
o Was missing TWO-ARG-- (QD_COMPLEX QD-REAL) and vice versa.
o Was missing TWO-ARG-/ for (QD-REAL QD-COMPLEX)
qd-methods.lisp:
o Moved some methods from here to qd-methods.lisp
o Reimplement QFLOAT (RATIO QD-REAL) to use internal functions instead
of calling TWO-ARG-/ and QFLOAT
o QABS (QD-COMPLEX) was returning the wrong thing.
toy [Wed, 22 Aug 2007 16:54:45 +0000]
qd-test depends on qd-extra.
toy [Wed, 22 Aug 2007 15:27:20 +0000]
Fix build problem where the / method is not yet defined to be able to
compute #.(/ 1 (sqrt #q2.0q0)).
toy [Fri, 6 Jul 2007 16:45:44 +0000]
For the basic arithmetic operations, we need to separate out floats
from rationals because we need to coerce rationals to qd-reals to
preserve the desired accuracy. Previously, the rationals were
converted to double-float, which loses accuracy.
toy [Sun, 17 Jun 2007 02:55:47 +0000]
Add compiler macro for /= to handle the two-arg case.