/[cmucl]/src/code/float.lisp
ViewVC logotype

Log of /src/code/float.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Sticky Tag:

Revision 1.49 - (view) (annotate) - [select for diffs]
Sat Sep 3 05:19:03 2011 UTC (2 years, 7 months ago) by rtoy
Branch: MAIN
CVS Tags: GIT-CONVERSION, HEAD, snapshot-2011-09
Changes since 1.48: +36 -31 lines
Diff to previous 1.48
Fix rounding for large numbers.

Bug was pointed by Christophe in private email.  Fix is based on his
suggested solution.  Some examples that should work now:

(round 100000000002.9d0) -> 100000000003

(round (+ most-positive-fixnum 1.5w0)) -> 536870912

Revision 1.48 - (view) (annotate) - [select for diffs]
Tue Apr 20 17:57:44 2010 UTC (3 years, 11 months ago) by rtoy
Branch: MAIN
CVS Tags: RELEASE_20b, cross-sol-x86-2010-12-20, cross-sol-x86-base, cross-sol-x86-merged, cross-sparc-branch-base, release-20b-pre1, release-20b-pre2, snapshot-2010-05, snapshot-2010-06, snapshot-2010-07, snapshot-2010-08, snapshot-2010-11, snapshot-2010-12, snapshot-2011-01, snapshot-2011-02, snapshot-2011-03, snapshot-2011-04, snapshot-2011-06, snapshot-2011-07, sparc-tramp-assem-2010-07-19, sparc-tramp-assem-base
Branch point for: RELEASE-20B-BRANCH, cross-sol-x86-branch, cross-sparc-branch, sparc-tramp-assem-branch
Changes since 1.47: +7 -7 lines
Diff to previous 1.47
Change uses of _"foo" to (intl:gettext "foo").  This is because slime
may get confused with source locations if the reader macros are
installed.

Revision 1.47 - (view) (annotate) - [select for diffs]
Mon Apr 19 02:18:03 2010 UTC (3 years, 11 months ago) by rtoy
Branch: MAIN
Changes since 1.46: +17 -17 lines
Diff to previous 1.46
Remove _N"" reader macro from docstrings when possible.

Revision 1.46 - (view) (annotate) - [select for diffs]
Fri Mar 19 15:18:59 2010 UTC (4 years ago) by rtoy
Branch: MAIN
CVS Tags: post-merge-intl-branch, snapshot-2010-04
Changes since 1.45: +25 -23 lines
Diff to previous 1.45
Merge intl-branch 2010-03-18 to HEAD.  To build, you need to use
boot-2010-02-1 as the bootstrap file.  You should probably also use
the new -P option for build.sh to generate and update the po files
while building.

Revision 1.45.4.1 - (view) (annotate) - [select for diffs]
Thu Feb 25 20:34:49 2010 UTC (4 years, 1 month ago) by rtoy
Branch: intl-2-branch
Changes since 1.45: +22 -20 lines
Diff to previous 1.45 , to next main 1.49
Restart internalization work.  This new branch starts with code from
the intl-branch on date 2010-02-12 18:00:00+0500.  This version works
and

LANG=en@piglatin bin/lisp

works (once the piglatin translation is added).

Revision 1.45.2.3 - (view) (annotate) - [select for diffs]
Sun Feb 14 03:06:41 2010 UTC (4 years, 2 months ago) by rtoy
Branch: intl-branch
CVS Tags: intl-branch-2010-03-18-1300, intl-branch-working-2010-02-19-1000
Changes since 1.45.2.2: +4 -4 lines
Diff to previous 1.45.2.2 , to branch point 1.45 , to next main 1.49
o Marking more translatable strings that were previously missed.
o Regenerated cmucl.pot and cmucl.po's.
o Fixed some problems with ko/cmucl.po introduced in last checkin.

Revision 1.45.2.2 - (view) (annotate) - [select for diffs]
Tue Feb 9 18:41:59 2010 UTC (4 years, 2 months ago) by rtoy
Branch: intl-branch
CVS Tags: intl-branch-working-2010-02-11-1000
Changes since 1.45.2.1: +20 -20 lines
Diff to previous 1.45.2.1 , to branch point 1.45
Mark translatable strings; update cmucl.pot and ko/cmucl.po
accordingly.

Revision 1.45.2.1 - (view) (annotate) - [select for diffs]
Mon Feb 8 17:15:47 2010 UTC (4 years, 2 months ago) by rtoy
Branch: intl-branch
Changes since 1.45: +3 -1 lines
Diff to previous 1.45
Add (intl:textdomain "cmucl") to the files to set the textdomain.

Revision 1.45 - (view) (annotate) - [select for diffs]
Fri Feb 5 23:57:21 2010 UTC (4 years, 2 months ago) by rtoy
Branch: MAIN
CVS Tags: intl-2-branch-base, intl-branch-base, pre-merge-intl-branch, snapshot-2010-03
Branch point for: intl-2-branch, intl-branch
Changes since 1.44: +38 -11 lines
Diff to previous 1.44
o Make %unary-fround return a negative zero if the argument is a
  negative zero.
o Change %unary-ftruncate to call %unary-fround.  This speeds up
  ftruncate by 2-4 times.

Revision 1.44 - (view) (annotate) - [select for diffs]
Fri Feb 5 18:10:58 2010 UTC (4 years, 2 months ago) by rtoy
Branch: MAIN
Changes since 1.43: +52 -2 lines
Diff to previous 1.43
Implement a fast fround for single and double floats.  This is enabled
everywhere except for x87 builds since there is a possible roundoff
issue due to the 80-bit registers for x87.

This is some 2-3 times faster than the existing fround function.

code/float.lisp:
o Implementations of %unary-fround/single-float,
  %unary-fround/double-float, and %unary-fround.  Declare the first
  two as inline too.

compiler/float-tran.lisp:
o Tell compiler about %unary-fround.
o Transform fround to a call to %unary-fround.
o Transform %unary-fround to special versions for single and double
  float arguments.

Revision 1.41.4.2 - (view) (annotate) - [select for diffs]
Wed Mar 18 15:37:28 2009 UTC (5 years, 1 month ago) by rtoy
Branch: unicode-utf16-extfmt-branch
CVS Tags: unicode-snapshot-2009-05, unicode-snapshot-2009-06, unicode-utf16-extfmt-2009-03-27, unicode-utf16-extfmt-2009-06-11
Changes since 1.41.4.1: +19 -0 lines
Diff to previous 1.41.4.1 , to branch point 1.41 , to next main 1.49
Sync to utf16 branch, tag unicode-utf16-sync-label-2009-03-16.

Revision 1.41.2.2 - (view) (annotate) - [select for diffs]
Mon Mar 16 21:10:55 2009 UTC (5 years, 1 month ago) by rtoy
Branch: unicode-utf16-branch
CVS Tags: unicode-utf16-char-support-2009-03-25, unicode-utf16-char-support-2009-03-26, unicode-utf16-sync-label-2009-03-16
Changes since 1.41.2.1: +19 -0 lines
Diff to previous 1.41.2.1 , to branch point 1.41 , to next main 1.49
Sync to CVS HEAD, tag label-2009-03-16.

But don't sync Config.FreeBSD_gencgc, Config.x86_freebsd,
FreeBSD-os.c, and FreeBSD-os.h.  Let Alex sync those later.

The result seems to work as expected on Solaris and x86/linux.
Darwin (ppc or x86) untested.

Revision 1.43 - (view) (annotate) - [select for diffs]
Mon Dec 22 23:24:28 2008 UTC (5 years, 3 months ago) by rtoy
Branch: MAIN
CVS Tags: RELEASE_19f, RELEASE_20a, amd64-dd-start, label-2009-03-16, label-2009-03-25, merge-with-19f, merged-unicode-utf16-extfmt-2009-06-11, portable-clx-base, portable-clx-import-2009-06-16, release-19f-base, release-19f-pre1, release-20a-base, release-20a-pre1, snapshot-2009-01, snapshot-2009-02, snapshot-2009-04, snapshot-2009-05, snapshot-2009-07, snapshot-2009-08, snapshot-2009-11, snapshot-2009-12, snapshot-2010-01, snapshot-2010-02, unicode-string-buffer-base, unicode-string-buffer-impl-base
Branch point for: RELEASE-19F-BRANCH, RELEASE-20A-BRANCH, amd64-dd-branch, portable-clx-branch, unicode-string-buffer-branch, unicode-string-buffer-impl-branch
Changes since 1.42: +20 -1 lines
Diff to previous 1.42
Oops.  Need to move %DOUBLE-DOUBLE-FLOAT from compiler/float-tran.lisp
to code/float.lisp because we need this early in the build process to
handle float types.

This might cuase problems with bootstrapping double-double floats!

Revision 1.41.4.1 - (view) (annotate) - [select for diffs]
Sun Nov 2 13:30:01 2008 UTC (5 years, 5 months ago) by rtoy
Branch: unicode-utf16-extfmt-branch
CVS Tags: unicode-utf16-extfmts-sync-2008-12
Changes since 1.41: +26 -2 lines
Diff to previous 1.41
Sync to snapshot 2008-11.  But we didn't sync code/extfmts.lisp or
iso8859-1.lisp and utf-8.lisp.  (I don't think we want those changes,
yet.)

Revision 1.41.2.1 - (view) (annotate) - [select for diffs]
Sat Nov 1 22:40:35 2008 UTC (5 years, 5 months ago) by rtoy
Branch: unicode-utf16-branch
CVS Tags: unicode-utf16-sync-2008-11, unicode-utf16-sync-2008-12
Changes since 1.41: +26 -2 lines
Diff to previous 1.41
Sync to snapshot 2008-11.

Revision 1.41.8.1 - (view) (annotate) - [select for diffs]
Sat Nov 1 16:07:20 2008 UTC (5 years, 5 months ago) by rtoy
Branch: sse2-packed-branch
CVS Tags: sse2-merge-with-2008-11, sse2-packed-2008-11-12
Changes since 1.41: +26 -2 lines
Diff to previous 1.41 , to next main 1.49
Sync to snapshot-2008-11.

Revision 1.42 - (view) (annotate) - [select for diffs]
Fri Oct 24 21:45:00 2008 UTC (5 years, 5 months ago) by rtoy
Branch: MAIN
CVS Tags: merge-sse2-packed, snapshot-2008-11, snapshot-2008-12
Changes since 1.41: +26 -2 lines
Diff to previous 1.41
code/float.lisp:
o Forgot to implement FLOAT-PRECISION for double-doubles.

general-info/release-19f.txt:
o Document it.

Revision 1.41 - (view) (annotate) - [select for diffs]
Tue Apr 15 16:31:58 2008 UTC (6 years ago) by rtoy
Branch: MAIN
CVS Tags: snapshot-2008-05, snapshot-2008-06, snapshot-2008-07, snapshot-2008-08, snapshot-2008-09, snapshot-2008-10, sse2-base, sse2-checkpoint-2008-10-01, sse2-merge-with-2008-10, sse2-packed-base, unicode-utf16-base, unicode-utf16-extfmts-pre-sync-2008-11, unicode-utf16-string-support, unicode-utf16-sync-2008-07, unicode-utf16-sync-2008-09
Branch point for: sse2-branch, sse2-packed-branch, unicode-utf16-branch, unicode-utf16-extfmt-branch
Changes since 1.40: +6 -3 lines
Diff to previous 1.40
Use single/double-from-bits to create the result, to match the style
of the rest of the routine.

Revision 1.40 - (view) (annotate) - [select for diffs]
Tue Apr 15 15:34:34 2008 UTC (6 years ago) by rtoy
Branch: MAIN
Changes since 1.39: +4 -2 lines
Diff to previous 1.39
When SCALE-FLOAT would underflow, return a floating-point 0 of the
same type as the float argument.  (Previously was just returning 0f0.)

Revision 1.39 - (view) (annotate) - [select for diffs]
Wed Feb 13 15:03:38 2008 UTC (6 years, 2 months ago) by rtoy
Branch: MAIN
CVS Tags: release-19e, release-19e-base, release-19e-pre1, release-19e-pre2, snapshot-2008-03, snapshot-2008-04
Branch point for: release-19e-branch
Changes since 1.38: +3 -2 lines
Diff to previous 1.38
Make RATIONALIZE work for double-double-floats.  (From an email today
on the maxima mailing list.)

Revision 1.38 - (view) (annotate) - [select for diffs]
Wed Oct 10 00:51:21 2007 UTC (6 years, 6 months ago) by rtoy
Branch: MAIN
CVS Tags: snapshot-2007-11, snapshot-2007-12, snapshot-2008-01, snapshot-2008-02
Changes since 1.37: +41 -26 lines
Diff to previous 1.37
o Add RATIONAL-TO-DD, an accurate method to convert rationals to
  double-double-floats.  (From Richard Fateman.)
o Use that in FLOAT-RATIO for convertnig ratios to
  double-double-floats.
o Remove old double-double-float support from FLOAT-RATIO.
o Split FLOAT-RATIO in two, one supporting single/double floats, and
  one for double-double-floats.

With these changes, I think we now have print/read consistency for
double-double-float numbers.

Revision 1.37 - (view) (annotate) - [select for diffs]
Thu May 24 20:56:42 2007 UTC (6 years, 10 months ago) by rtoy
Branch: MAIN
CVS Tags: pre-telent-clx, snapshot-2007-06, snapshot-2007-07, snapshot-2007-08, snapshot-2007-09, snapshot-2007-10
Changes since 1.36: +2 -1 lines
Diff to previous 1.36
Make scale-double-float maybe-inline so it can be inlined if needed.

Revision 1.36 - (view) (annotate) - [select for diffs]
Sat May 19 01:35:46 2007 UTC (6 years, 11 months ago) by rtoy
Branch: MAIN
Changes since 1.35: +13 -11 lines
Diff to previous 1.35
Trac ticket #10

For large numbers we did not check for odd-valued results that needed
to be rounded to even.

Revision 1.35 - (view) (annotate) - [select for diffs]
Tue Mar 27 16:57:43 2007 UTC (7 years ago) by rtoy
Branch: MAIN
CVS Tags: snapshot-2007-04, snapshot-2007-05
Changes since 1.34: +6 -2 lines
Diff to previous 1.34
INTEGER-decode-double-double-float was not combining the two parts
correctly if the two parts had different signs, which does happen.

Revision 1.34 - (view) (annotate) - [select for diffs]
Thu Jan 18 15:35:48 2007 UTC (7 years, 2 months ago) by rtoy
Branch: MAIN
CVS Tags: snapshot-2007-02, snapshot-2007-03
Changes since 1.33: +21 -16 lines
Diff to previous 1.33
DOUBLE-DOUBLE-FROM-BITS was returning the low part with the incorrect
sign.  This caused (FLOAT -1/9 1w0) to return
-0.11111111111111109877529972638715w0 instead of
0.111111111111111111111111111111111w0.

Revision 1.33 - (view) (annotate) - [select for diffs]
Mon Aug 21 16:39:53 2006 UTC (7 years, 7 months ago) by rtoy
Branch: MAIN
CVS Tags: release-19d, release-19d-base, release-19d-pre1, release-19d-pre2, snapshot-2006-09, snapshot-2006-10, snapshot-2006-11, snapshot-2006-12, snapshot-2007-01
Branch point for: release-19d-branch
Changes since 1.32: +27 -2 lines
Diff to previous 1.32
Some very basic support for signed zeroes for DOUBLE-DOUBLE-FLOAT.  We
can now read and print -0w0.

code/float.lisp:
o Adjust float-sign so that we get the correct sign when
  double-double-floats are used.
o Adjust FLOAT-RATIO to call %MAKE-DOUBLE-DOUBLE-FLOAT so that we
  preserve the sign of the number.  This is safe because the
  components are known to be properly scaled.

compiler/float-tran.lisp:
o Use %MAKE-DOUBLE-DOUBLE-FLOAT in %DOUBLE-DOUBLE-FLOAT to preserve
  the sign of the original float.  This is safe because the
  components are known to be properly scaled.
o Add a FLOAT-SIGN deftransform to handle DOUBLE-DOUBLE-FLOAT.

Revision 1.32 - (view) (annotate) - [select for diffs]
Fri Jun 30 18:41:22 2006 UTC (7 years, 9 months ago) by rtoy
Branch: MAIN
CVS Tags: snapshot-2006-07, snapshot-2006-08
Changes since 1.31: +156 -23 lines
Diff to previous 1.31
This large checkin merges the double-double float support to HEAD.
The merge is from the tag "double-double-irrat-end".  The
double-double branch is now obsolete.

The code should build without double-double support (tested on sparc)
as well as build with double-double support (tested also on sparc).

Revision 1.31.4.2.2.3.2.3 - (view) (annotate) - [select for diffs]
Mon Jun 26 03:17:11 2006 UTC (7 years, 9 months ago) by rtoy
Branch: double-double-array-branch
CVS Tags: double-double-array-checkpoint, double-double-irrat-end, double-double-irrat-start
Changes since 1.31.4.2.2.3.2.2: +11 -7 lines
Diff to previous 1.31.4.2.2.3.2.2 , to branch point 1.31.4.2.2.3
Yet another version of INTEGER-DECODE-DOUBLE-DOUBLE-FLOAT.  The
previous version was wrong for the double-double (2d0, -4d17) which
caused printing to be off by a factor of two.

I think this version is right, but the number of bits in the integer
part can be more than 106 (double-float-digits), because double-double
floats can have more than 106 bits in them.  There's a problem with
converting the result back to a double-doube---the result isn't
exactly the same.  I think this is a bug in DOUBLE-DOUBLE-FROM-BITS in
bignum.lisp.

Revision 1.31.4.2.2.3.2.2 - (view) (annotate) - [select for diffs]
Thu Jun 22 20:39:46 2006 UTC (7 years, 9 months ago) by rtoy
Branch: double-double-array-branch
Changes since 1.31.4.2.2.3.2.1: +10 -2 lines
Diff to previous 1.31.4.2.2.3.2.1 , to branch point 1.31.4.2.2.3
Tell FTRUNCATE how to truncate double-double-floats.

Revision 1.31.4.2.2.3.2.1 - (view) (annotate) - [select for diffs]
Thu Jun 22 18:06:22 2006 UTC (7 years, 9 months ago) by rtoy
Branch: double-double-array-branch
Changes since 1.31.4.2.2.3: +2 -2 lines
Diff to previous 1.31.4.2.2.3
INTEGER-DECODE-DOUBLE-DOUBLE-FLOAT had the wrong integer part for
negative numbers.

Revision 1.31.4.2.2.3 - (view) (annotate) - [select for diffs]
Tue Jun 13 19:58:20 2006 UTC (7 years, 10 months ago) by rtoy
Branch: double-double-reader-branch
CVS Tags: double-double-array-base, double-double-reader-checkpoint-1, double-double-sparc-checkpoint-1
Branch point for: double-double-array-branch
Changes since 1.31.4.2.2.2: +29 -14 lines
Diff to previous 1.31.4.2.2.2 , to branch point 1.31.4.2
code/bignum.lisp:
o Update BIGNUM::DOUBLE-DOUBLE-FROM-BITS due to change in
  DOUBLE-DOUBLE-FLOAT-DIGITS.

code/float.lisp:
o Update DOUBLE-DOUBLE-FROM-BITS, INTEGER-DECODE-DOUBLE-DOUBLE-FLOAT,
  and FLOAT-RATIO due to change in DOUBLE-DOUBLE-FLOAT-DIGITS.
o Tell %UNARY-ROUND how to round double-double-float numbers.
  (Implementation could be better, but this works for now.)

Revision 1.31.4.2.2.2 - (view) (annotate) - [select for diffs]
Mon Jun 12 02:59:55 2006 UTC (7 years, 10 months ago) by rtoy
Branch: double-double-reader-branch
Changes since 1.31.4.2.2.1: +5 -9 lines
Diff to previous 1.31.4.2.2.1 , to branch point 1.31.4.2
DECODE-DOUBLE-DOUBLE-FLOAT was wrong.

Revision 1.31.4.2.2.1 - (view) (annotate) - [select for diffs]
Sun Jun 11 20:11:45 2006 UTC (7 years, 10 months ago) by rtoy
Branch: double-double-reader-branch
Changes since 1.31.4.2: +80 -16 lines
Diff to previous 1.31.4.2
Add basic support for reading and printing double-double-floats.  I
think this needs to be built from a binary that already has basic
double-double support.  That is, you need to compile these changes
with a binary built from the double-double-branch.  (It may work
to cross-compile this from the 2006-06 snapshot, but I did not try
it.)

Reading double-double-floats appears to work.  PRINT appears to work.
However, formatted output of double-double-floats may not be accurate
because SCALE-EXPONENT still only supports double-floats.

code/bignum.lisp:
o Add support for coercing a BIGNUM to a DOUBLE-DOUBLE-FLOAT.

code/float.lisp:
o Add support for converting a RATIO to a DOUBLE-DOUBLE-FLOAT.  This
  is needed to be able to read a double-double-float correctly.
o INTEGER-DECODE-DOUBLE-DOUBLE-FLOAT seems to be buggy.  Use a new
  version that works but probably conses more than is necessary and is
  probably slower than necessary.  This is needed to print out
  DOUBLE-DOUBLE-FLOATs correctly.
o Add DECODE-DOUBLE-DOUBLE-FLOAT while we're at it.
o Add SCALE-DOUBLE-DOUBLE-FLOAT.  This is also needed for printing.
o Disable %DOUBLE-DOUBLE-FLOAT.  There's already an implementation in
  float-tran.  (We really should move the float-tran version to here.)


code/format.lisp:
o Tell printer to use #\w when printing double-double-floats.

code/irrat.lisp:
o The deftransform for ABS is working, so use that instead of the
  hack.

code/numbers.lisp:
o Update FLOAT-CONTAGION to support mixing rationals with
  double-double-floats.

code/print.lisp:
o Recognize double-double-floats for printing.  Use "w" as the
  exponent marker for double-double floats.
o Very minor change to FLONUM-TO-DIGITS to support
  double-double-floats.

code/reader.lisp:
o Tell the reader that #\w and #\W are exponent markers for
  double-double-float numbers by giving them the secondary attribute
  constituent-expt.
o Tell the reader to creat double-double-floats when reading such
  numbers.

Revision 1.31.4.2 - (view) (annotate) - [select for diffs]
Sun Jun 11 04:49:09 2006 UTC (7 years, 10 months ago) by rtoy
Branch: double-double-branch
CVS Tags: double-double-init-%make-sparc, double-double-init-checkpoint-1, double-double-reader-base
Branch point for: double-double-reader-branch
Changes since 1.31.4.1: +2 -2 lines
Diff to previous 1.31.4.1 , to branch point 1.31 , to next main 1.49
Turn off this %double-double-float for now.  There's one in
float-tran.lisp that we use.

Revision 1.31.4.1 - (view) (annotate) - [select for diffs]
Fri Jun 9 16:04:57 2006 UTC (7 years, 10 months ago) by rtoy
Branch: double-double-branch
CVS Tags: double-double-init-ppc, double-double-init-sparc, double-double-init-sparc-2, double-double-init-x86
Changes since 1.31: +61 -15 lines
Diff to previous 1.31
Add basic support for kernel:double-double-float type.  The primitive
type is there, and basic arithmetic operations work as well as PRINT.
But many things do not work: No reader, formatted output, many mixed
type arithmetic operations, special functions are just double-float
values, coerced to double-double-float.

compiler/generic/interr.lisp:
o Add new error

compiler/generic/new-genesis.lisp:
o Dump double-double-float objects (barely tested)

compiler/generic/primtype.lisp:
o Tell compiler about the new primitive type double-double-float.

compiler/generic/vm-fndb.lisp:
o Make double-double-float-p a known function.

compiler/generic/vm-type.lisp:
o Update FLOAT-FORMAT-NAME to include double-double-float

compiler/generic/vm-typetran.lisp:
o Tell compiler about double-double-float type predicate.

compiler/sparc/float.lisp:
o Add necessary vops to move double-double-float args, store and load
  double-double-floats to/from the double-double-stack,
  double-double-reg moves, box and unbox double-double-floats, move
  double-double-floats to and from args
o Add necessary vops to create a double-double-float and to extract
  the high and low parts out of a double-double-float.

compiler/sparc/parms.lisp:
o Define double-double-float-digits

compiler/sparc/type-vops.lisp:
o Define double-double-float type vop
o Adjust number hierarchy to include double-double-float

compiler/sparc/vm.lisp:
o Define the necessary storage class and storage base for the
  double-double-reg and double-double-stack.

lisp/gencgc.c:
o Tell GC about double-double-float objects.

lisp/purify.c:
o Tell purify about double-double-float objects.

code/class.lisp:
o Add the new double-double-float class.

code/exports.lisp:
o Add the necessary symbols to the various packages.  (This is
  important to get right otherwise there's confusion on what symbol
  really represents double-double-float stuff.)

code/float.lisp:
o Implement some of the necessary functions to support
  double-double-float.

code/hash-new.lisp:
o Hash double-double-floats by xor'ing the hashes of each double-float
  part.  (Is that good enough?)

code/irrat.lisp:
o Implement the special functions by calling the double-float versions
  and coercing the result to a double-double-float.  This is needed to
  get type-derivation working, but the precise value isn't that
  important right now.  We'll have to implement them later.

code/kernel.lisp:
o Make make-double-double-float, double-double-hi, and
  double-double-lo known functions.

code/lispinit.lisp:
o Register the :double-double float feature.

code/load.lisp:
o Add FOP for reading double-double-float values from fasls.  (Barely
  tested, if at all.)

code/numbers.lisp:
o Implement basic arithmetic operations for double-double-floats.
  This needs quite a bit of work to clean up, but most things work.

code/pred.lisp:
o Tell the type system about double-double-float type.

code/print.lisp:
o Add very rudimentary printing for double-double-float.  Basically
  copied from code written by Richard Fateman, with permission.

code/seq.lisp:
o Tell coerce how to coerce things to a double-double-float.

code/type.lisp:
o Tell type system about the new float format double-double-float and
  how numeric contagion works with double-double-float.

code/dump.lisp:
o Tell dumper how to dump double-double-float values to a fasl.

compiler/float-tran.lisp:
o Add appropriate deftransforms to handle conversion of things to
  double-double-float and from from double-double-float to other float
  types.
o The basic implmentation of double-double-float arithmetic is also
  here.
o Add deftransforms to tell the compiler how to do basic arithmetic
  and comparisions on double-double-float numbers.

compiler/srctran.lisp:
o Fix a bug in interval-range-info when :low is 0dd0 and :high is 0.
  We weren't returning the right value, which confuses interval-div,
  which caused an infinite loop because we couldn't split the
  numerator into positive and negative parts.
o Tell other parts about double-double-float.

Revision 1.30.2.1 - (view) (annotate) - [select for diffs]
Mon Dec 19 01:09:50 2005 UTC (8 years, 4 months ago) by rtoy
Branch: ppc_gencgc_branch
CVS Tags: ppc_gencgc_snap_2005-12-17, ppc_gencgc_snap_2006-01-06
Changes since 1.30: +19 -6 lines
Diff to previous 1.30 , to next main 1.49
Merge code from main branch of 2005-12-17 to ppc gencgc branch.  Still
doesn't work of course.

Revision 1.31 - (view) (annotate) - [select for diffs]
Thu Aug 25 21:25:09 2005 UTC (8 years, 7 months ago) by rtoy
Branch: MAIN
CVS Tags: double-double-base, release-19c, release-19c-base, release-19c-pre1, snapshot-2005-10, snapshot-2005-11, snapshot-2005-12, snapshot-2006-01, snapshot-2006-02, snapshot-2006-03, snapshot-2006-04, snapshot-2006-05, snapshot-2006-06
Branch point for: double-double-branch, release-19c-branch
Changes since 1.30: +19 -6 lines
Diff to previous 1.30
o Fix a bug in %unary-ftruncate/single-float and
  %unary-ftruncate/double-float where the test for infinity and NaN
  was wrong.
o When given NaN, these functions should return a quiet
  (non-signaling) NaN instead of returning the signaling NaN.  This
  fixes the FRUNCATE/FFLOOR/FCEILING tests in ieeefp-tests.

Revision 1.30 - (view) (annotate) - [select for diffs]
Fri Jun 18 18:18:12 2004 UTC (9 years, 10 months ago) by rtoy
Branch: MAIN
CVS Tags: ppc_gencgc_snap_2005-05-14, prm-before-macosx-merge-tag, release-19b-base, release-19b-pre1, release-19b-pre2, snapshot-2004-07, snapshot-2004-08, snapshot-2004-09, snapshot-2004-10, snapshot-2004-11, snapshot-2004-12, snapshot-2005-01, snapshot-2005-02, snapshot-2005-03, snapshot-2005-04, snapshot-2005-05, snapshot-2005-06, snapshot-2005-07, snapshot-2005-08, snapshot-2005-09
Branch point for: ppc_gencgc_branch, release-19b-branch
Changes since 1.29: +4 -12 lines
Diff to previous 1.29
o Fix a misplaced declaration in %unary-ftruncate/single-float
o Update %unary-ftruncate and the corresponding deftransform because
  it was not properly returning the correct sign for signed zeroes.
  If the number was in a good range, we used truncate, which loses the
  sign of zero.  (Should we have leave it in and add an explicit check
  for a zero result and adjust the sign appropriately?  That would
  allow us to use the fast builtin instructions at the expense of a
  test for zero and a fix.)

Revision 1.29 - (view) (annotate) - [select for diffs]
Wed Jun 9 14:46:11 2004 UTC (9 years, 10 months ago) by rtoy
Branch: MAIN
Changes since 1.28: +7 -5 lines
Diff to previous 1.28
Make %unary-ftruncate preserve the sign of the arg, so -0.0 is
returned appropriately instead of +0.0.

This is to conform to IEEE754.

Revision 1.28 - (view) (annotate) - [select for diffs]
Mon Jul 22 17:01:36 2002 UTC (11 years, 8 months ago) by toy
Branch: MAIN
CVS Tags: LINKAGE_TABLE, PRE_LINKAGE_TABLE, UNICODE-BASE, amd64-merge-start, cold-pcl-base, dynamic-extent-base, lisp-executable-base, mod-arith-base, release-18e, release-18e-base, release-18e-pre1, release-18e-pre2, release-19a, release-19a-base, release-19a-pre1, release-19a-pre2, release-19a-pre3, remove_negative_zero_not_zero, snapshot-2003-10, snapshot-2003-11, snapshot-2003-12, snapshot-2004-04, snapshot-2004-05, snapshot-2004-06, sparc_gencgc, sparc_gencgc_merge
Branch point for: UNICODE-BRANCH, cold-pcl, dynamic-extent, lisp-executable, mod-arith-branch, release-18e-branch, release-19a-branch, sparc_gencgc_branch
Changes since 1.27: +3 -3 lines
Diff to previous 1.27
FLOAT-RADIX is supposed to signal an error if the argument is not a
float.

Revision 1.27 - (view) (annotate) - [select for diffs]
Wed May 8 15:38:24 2002 UTC (11 years, 11 months ago) by toy
Branch: MAIN
Changes since 1.26: +3 -1 lines
Diff to previous 1.26
Declaim %UNARY-FTRUNCATE/SINGLE-FLOAT and
%UNARY-FTRUNCATE/DOUBLE-FLOAT as maybe-inline so that they can be
inlined by the user if desired.

Revision 1.15.2.4 - (view) (annotate) - [select for diffs]
Sat Mar 23 18:50:00 2002 UTC (12 years ago) by pw
Branch: RELENG_18
CVS Tags: RELEASE_18d
Changes since 1.15.2.3: +121 -10 lines
Diff to previous 1.15.2.3 , to branch point 1.15 , to next main 1.49
Mega commit to bring RELENG_18 branch in sync with HEAD in preparation
for release tagging 18d.

Revision 1.26 - (view) (annotate) - [select for diffs]
Tue Mar 5 21:34:15 2002 UTC (12 years, 1 month ago) by toy
Branch: MAIN
Changes since 1.25: +28 -29 lines
Diff to previous 1.25
o Fix bug in %unary-ftruncate/double-float which was returning 0.5 for
  0.5 <= x < 1.  (Stupid typo)
o Clean up %unary-ftruncate/single-float and %unary-ftruncate/double-float
  so the code looks identical except for the case where real work is
  needed.  (Macroize this so the code is identical?)

Revision 1.25 - (view) (annotate) - [select for diffs]
Mon Feb 25 16:23:10 2002 UTC (12 years, 1 month ago) by toy
Branch: MAIN
Changes since 1.24: +114 -2 lines
Diff to previous 1.24
Make FTRUNCATE faster and less consy by manipulating the bits directly
instead of calling the generic TRUNCATE.  Make FFLOOR, FCEILING, and
FROUND use FTRUNCATE so they benefit too.

Revision 1.24 - (view) (annotate) - [select for diffs]
Sun Jun 17 19:08:35 2001 UTC (12 years, 10 months ago) by pw
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23
From Eric Marsden:

FLOAT-RADIX should signal an error if arg is not a FLOAT.

Revision 1.23 - (view) (annotate) - [select for diffs]
Sun Mar 4 20:12:36 2001 UTC (13 years, 1 month ago) by pw
Branch: MAIN
Changes since 1.22: +8 -8 lines
Diff to previous 1.22
Change most PROCLAIMs to DECLAIMs.

Revision 1.15.2.3 - (view) (annotate) - [select for diffs]
Tue May 23 16:36:28 2000 UTC (13 years, 10 months ago) by pw
Branch: RELENG_18
CVS Tags: RELEASE_18c
Changes since 1.15.2.2: +125 -11 lines
Diff to previous 1.15.2.2 , to branch point 1.15
This set of revisions brings the RELENG_18 branch up to HEAD in preparation
for an 18c release.

Revision 1.22 - (view) (annotate) - [select for diffs]
Mon May 22 17:43:09 2000 UTC (13 years, 10 months ago) by dtc
Branch: MAIN
Changes since 1.21: +106 -1 lines
Diff to previous 1.21
New implementation of the function rationalize, from Raymond Toy based
on an algorithm from Bruno Haible.

Revision 1.21 - (view) (annotate) - [select for diffs]
Sat May 6 17:21:16 2000 UTC (13 years, 11 months ago) by dtc
Branch: MAIN
Changes since 1.20: +11 -1 lines
Diff to previous 1.20
For the long-float x86 build, slightly increase the magnitude of
double-float-epsilon and double-float-negative-epsilon to overcome a
rounding problem and fix their definitions as per the CLHS.

Revision 1.20 - (view) (annotate) - [select for diffs]
Fri Nov 19 15:12:36 1999 UTC (14 years, 5 months ago) by dtc
Branch: MAIN
Changes since 1.19: +7 -6 lines
Diff to previous 1.19
Fix divide-by-zero bug in rationalize (rationalize 5.964664720239993d-15)
found by Akira Kurihara.  The bug was caused by (- xx (float a x))
eventually becoming zero; an extra test has been added to exit the do
loop when this is true. From Raymond Toy.

Revision 1.19 - (view) (annotate) - [select for diffs]
Thu Nov 11 14:46:25 1999 UTC (14 years, 5 months ago) by dtc
Branch: MAIN
Changes since 1.18: +4 -6 lines
Diff to previous 1.18
Fix the rounding of large numbers in %unary-round, noted by Akira Kurihara.

Revision 1.15.2.2 - (view) (annotate) - [select for diffs]
Tue Jun 23 11:21:56 1998 UTC (15 years, 9 months ago) by pw
Branch: RELENG_18
CVS Tags: RELEASE_18b
Changes since 1.15.2.1: +248 -39 lines
Diff to previous 1.15.2.1 , to branch point 1.15
This (huge) revision brings the RELENG_18 branch up to the current HEAD.
Note code/unix-glib2.lisp not yet included -- not sure it is ready to go.

Revision 1.18 - (view) (annotate) - [select for diffs]
Sat Mar 21 08:11:56 1998 UTC (16 years, 1 month ago) by dtc
Branch: MAIN
Changes since 1.17: +236 -25 lines
Diff to previous 1.17
Long-float support.

Revision 1.17 - (view) (annotate) - [select for diffs]
Thu Feb 19 03:49:48 1998 UTC (16 years, 2 months ago) by dtc
Branch: MAIN
Changes since 1.16: +14 -16 lines
Diff to previous 1.16
Fix float-trapping-nan-p which was returning T for quiet NaN and Nil
of trapping NaN.

Revision 1.15.2.1 - (view) (annotate) - [select for diffs]
Thu Jun 26 19:20:56 1997 UTC (16 years, 9 months ago) by pw
Branch: RELENG_18
CVS Tags: RELEASE_18a
Changes since 1.15: +1 -2 lines
Diff to previous 1.15
Remove #-alpha from denormal constant defs

Revision 1.16 - (view) (annotate) - [select for diffs]
Thu Jun 26 19:19:51 1997 UTC (16 years, 9 months ago) by pw
Branch: MAIN
Changes since 1.15: +1 -2 lines
Diff to previous 1.15
Remove #-alpha from denormal constant defs

Revision 1.15 - (view) (annotate) - [select for diffs]
Wed Mar 5 04:19:38 1997 UTC (17 years, 1 month ago) by dtc
Branch: MAIN
Branch point for: RELENG_18
Changes since 1.14: +3 -3 lines
Diff to previous 1.14
Fix from Raymond Toy: the constants most-positive-double-float and
most-negative-double-float were incorrectly defined.

Revision 1.14 - (view) (annotate) - [select for diffs]
Mon Oct 31 04:11:27 1994 UTC (19 years, 5 months ago) by ram
Branch: MAIN
Changes since 1.13: +1 -3 lines
Diff to previous 1.13
Fix headed boilerplate.

Revision 1.13 - (view) (annotate) - [select for diffs]
Sun Oct 30 18:04:20 1994 UTC (19 years, 5 months ago) by ram
Branch: MAIN
Changes since 1.12: +8 -7 lines
Diff to previous 1.12
Fix float-bignum-ratio to return correctly.

Revision 1.12 - (view) (annotate) - [select for diffs]
Wed Apr 6 17:10:33 1994 UTC (20 years ago) by hallgren
Branch: MAIN
Changes since 1.11: +11 -9 lines
Diff to previous 1.11
Updated for the Alpha (took out denormals).

Revision 1.11 - (view) (annotate) - [select for diffs]
Fri May 7 12:10:52 1993 UTC (20 years, 11 months ago) by ram
Branch: MAIN
Changes since 1.10: +67 -6 lines
Diff to previous 1.10
Added FLOAT-RATIO for precise ratio floating (as need by the float reader.)

Revision 1.10 - (view) (annotate) - [select for diffs]
Thu Dec 10 01:28:22 1992 UTC (21 years, 4 months ago) by ram
Branch: MAIN
Changes since 1.9: +4 -4 lines
Diff to previous 1.9
floating-point-invalid  =>  floating-point-invalid-operation

Revision 1.9 - (view) (annotate) - [select for diffs]
Fri Feb 7 11:20:16 1992 UTC (22 years, 2 months ago) by ram
Branch: MAIN
Changes since 1.8: +22 -4 lines
Diff to previous 1.8
Added all the float limit constants to the exports.

Revision 1.8 - (view) (annotate) - [select for diffs]
Fri Feb 8 13:32:47 1991 UTC (23 years, 2 months ago) by ram
Branch: MAIN
Changes since 1.7: +9 -5 lines
Diff to previous 1.7
New file header with RCS header FILE-COMMENT.

Revision 1.7 - (view) (annotate) - [select for diffs]
Wed Dec 12 00:01:16 1990 UTC (23 years, 4 months ago) by ram
Branch: MAIN
Changes since 1.6: +107 -5 lines
Diff to previous 1.6
Added %UNARY-TRUNCATE-{SINGLE,DOUBLE}-FLOAT/FIXNUM functions, but then
commented them out, cause I decided to do this by frobbing the rounding
modes.  They might be useful someday.
Added %UNARY-ROUND to handle the 1-arg case of round, making it use
the new round primitive in the fixnum result case.
Fixed %UNARY-TRUNCATE to use open bounds when deciding whether the result
is a fixnum, and also to only return one value in the ratio case.

Revision 1.6 - (view) (annotate) - [select for diffs]
Thu Dec 6 18:47:44 1990 UTC (23 years, 4 months ago) by ram
Branch: MAIN
Changes since 1.5: +22 -23 lines
Diff to previous 1.5
Fixed scale-float to signal underflow and inexact at the right times.
Changed decode-float to call plain ERROR when passed an infinity or NaN,
instead of using ASSERT.

Revision 1.5 - (view) (annotate) - [select for diffs]
Sun Dec 2 13:24:07 1990 UTC (23 years, 4 months ago) by wlott
Branch: MAIN
Changes since 1.4: +107 -104 lines
Diff to previous 1.4
Added vm: to all vm specific symbols, 'cause kernel no longers uses vm.

Revision 1.4 - (view) (annotate) - [select for diffs]
Sun Oct 14 19:07:15 1990 UTC (23 years, 6 months ago) by ram
Branch: MAIN
Changes since 1.3: +5 -5 lines
Diff to previous 1.3
Fixed some condition signalling in SCALE-FLOAT-MAYBE-OVERFLOW, and 
fixed a one-off error in deciding whether we underflowed in 
SCALE-FLOAT-MAYBE-UNDERFLOW.

Revision 1.3 - (view) (annotate) - [select for diffs]
Wed Oct 3 18:46:31 1990 UTC (23 years, 6 months ago) by ram
Branch: MAIN
Changes since 1.2: +9 -8 lines
Diff to previous 1.2
Fixed SINGLE-FROM-BITS and DOUBLE-FROM-BITS to make negative floats
correctly.

Revision 1.2 - (view) (annotate) - [select for diffs]
Mon Oct 1 17:14:01 1990 UTC (23 years, 6 months ago) by ram
Branch: MAIN
Changes since 1.1: +6 -61 lines
Diff to previous 1.1
Moved trap stuff to float-trap.lisp and conditions to error.lisp.

Revision 1.1 - (view) (annotate) - [select for diffs]
Mon Oct 1 15:02:04 1990 UTC (23 years, 6 months ago) by ram
Branch: MAIN
Initial revision

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.

  Diffs between and
  Type of Diff should be a

Sort log by:

  ViewVC Help
Powered by ViewVC 1.1.5