<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/test/src/floatfns-tests.el, branch scratch/substitute-command-keys</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Use lexical-binding in most src tests</title>
<updated>2020-04-24T16:25:13+00:00</updated>
<author>
<name>Stefan Kangas</name>
</author>
<published>2020-04-24T13:28:22+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c52f8863a536c003980c8fcc24dfb48dfb2353a8'/>
<id>c52f8863a536c003980c8fcc24dfb48dfb2353a8</id>
<content type='text'>
* test/src/charset-tests.el:
* test/src/chartab-tests.el:
* test/src/cmds-tests.el:
* test/src/coding-tests.el (top-level)
(generate-ascii-file, generate-mostly-nonascii-file):
* test/src/doc-tests.el:
* test/src/floatfns-tests.el:
* test/src/font-tests.el:
* test/src/keymap-tests.el:
* test/src/process-tests.el (top-level)
(process-test-sentinel-wait-function-working-p)
(process-test-stderr-buffer, process-test-stderr-filter):
* test/src/textprop-tests.el:
* test/src/thread-tests.el:
* test/src/timefns-tests.el:
* test/src/undo-tests.el:
* test/src/xml-tests.el: Use lexical-binding.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* test/src/charset-tests.el:
* test/src/chartab-tests.el:
* test/src/cmds-tests.el:
* test/src/coding-tests.el (top-level)
(generate-ascii-file, generate-mostly-nonascii-file):
* test/src/doc-tests.el:
* test/src/floatfns-tests.el:
* test/src/font-tests.el:
* test/src/keymap-tests.el:
* test/src/process-tests.el (top-level)
(process-test-sentinel-wait-function-working-p)
(process-test-stderr-buffer, process-test-stderr-filter):
* test/src/textprop-tests.el:
* test/src/thread-tests.el:
* test/src/timefns-tests.el:
* test/src/undo-tests.el:
* test/src/xml-tests.el: Use lexical-binding.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright year to 2020</title>
<updated>2020-01-01T00:59:52+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2020-01-01T00:19:43+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=365e01cc9f64ce6ca947ccfd8612d60763280a37'/>
<id>365e01cc9f64ce6ca947ccfd8612d60763280a37</id>
<content type='text'>
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle weird cases like (ceil 0 0.0)</title>
<updated>2019-11-15T02:52:48+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2019-11-15T02:51:17+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=8b848def9bc3c4ad786670d0447a6fb396f2ff30'/>
<id>8b848def9bc3c4ad786670d0447a6fb396f2ff30</id>
<content type='text'>
* src/floatfns.c (double_integer_scale): Distinguish Inf from NaN.
(rounding_driver): Handle (ceil 0 0.0) and (ceil 0 1.0e+INF).
* test/src/floatfns-tests.el (special-round): Add tests for
weird cases like this.

Avoid crash with (floor 0 0.0)
* src/floatfns.c (rounding_driver): Signal an arithmetic
error if divisor is 0.0 or -0.0, instead of crashing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/floatfns.c (double_integer_scale): Distinguish Inf from NaN.
(rounding_driver): Handle (ceil 0 0.0) and (ceil 0 1.0e+INF).
* test/src/floatfns-tests.el (special-round): Add tests for
weird cases like this.

Avoid crash with (floor 0 0.0)
* src/floatfns.c (rounding_driver): Signal an arithmetic
error if divisor is 0.0 or -0.0, instead of crashing.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix double-rounding bug in ceiling etc.</title>
<updated>2019-11-13T21:10:09+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2019-11-13T21:07:01+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=bede5984246ba734c93fc28148b5f8e1b14d30c5'/>
<id>bede5984246ba734c93fc28148b5f8e1b14d30c5</id>
<content type='text'>
This is doable now that we have bignums.
* src/floatfns.c (integer_value): Remove; no longer used.
(rescale_for_division): New function.
(rounding_driver): Use it to divide properly (by using bignums)
even when arguments are float, fixing a double-rounding FIXME.
* src/lisp.h (LOG2_FLT_RADIX): Move here ...
* src/timefns.c (frac_to_double): ... from here.
* test/src/floatfns-tests.el (big-round):
Add a test to catch the double-rounding bug.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is doable now that we have bignums.
* src/floatfns.c (integer_value): Remove; no longer used.
(rescale_for_division): New function.
(rounding_driver): Use it to divide properly (by using bignums)
even when arguments are float, fixing a double-rounding FIXME.
* src/lisp.h (LOG2_FLT_RADIX): Move here ...
* src/timefns.c (frac_to_double): ... from here.
* test/src/floatfns-tests.el (big-round):
Add a test to catch the double-rounding bug.
</pre>
</div>
</content>
</entry>
<entry>
<title>Don’t signal overflow for (expt 1 bignum)</title>
<updated>2019-11-05T07:39:54+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2019-11-05T07:10:12+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5ab29400a4e9b29928aaf63d1f89a0b059491b29'/>
<id>5ab29400a4e9b29928aaf63d1f89a0b059491b29</id>
<content type='text'>
Similarly for (expt 0 bignum) and (expt -1 bignum).
The result is always a -1, 0 or 1, so do not signal overflow.
* src/data.c (expt_integer): Do not signal an overflow if
-1 &lt;= X &lt;= 1.  Be clearer about when overflow is signaled.
* test/src/floatfns-tests.el (bignum-expt): Test this.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similarly for (expt 0 bignum) and (expt -1 bignum).
The result is always a -1, 0 or 1, so do not signal overflow.
* src/data.c (expt_integer): Do not signal an overflow if
-1 &lt;= X &lt;= 1.  Be clearer about when overflow is signaled.
* test/src/floatfns-tests.el (bignum-expt): Test this.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge from origin/emacs-26</title>
<updated>2019-01-01T01:57:29+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2019-01-01T01:57:29+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=ba809612c06bcabd05dcbaae79da39dcb0925992'/>
<id>ba809612c06bcabd05dcbaae79da39dcb0925992</id>
<content type='text'>
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright year to 2019</title>
<updated>2019-01-01T01:01:13+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2019-01-01T00:59:58+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=26bed8ba10eeaf0a340a8d0d760c5578dddec867'/>
<id>26bed8ba10eeaf0a340a8d0d760c5578dddec867</id>
<content type='text'>
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Round bignums consistently with other integers</title>
<updated>2018-09-22T16:01:26+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2018-09-22T15:59:06+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=0b36041d2a528419982a19940573783ff318c0d4'/>
<id>0b36041d2a528419982a19940573783ff318c0d4</id>
<content type='text'>
* src/bignum.c (mpz_bufsize): New function.
(bignum_bufsize): Use it.
(mpz_get_d_rounded): New function.
(bignum_to_double): Use it.
* src/bignum.c (bignum_to_double):
* src/data.c (bignum_arith_driver):
When converting bignums to double, round instead of
truncating, to be consistent with what happens with fixnums.
* test/src/floatfns-tests.el (bignum-to-float): Test rounding.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/bignum.c (mpz_bufsize): New function.
(bignum_bufsize): Use it.
(mpz_get_d_rounded): New function.
(bignum_to_double): Use it.
* src/bignum.c (bignum_to_double):
* src/data.c (bignum_arith_driver):
When converting bignums to double, round instead of
truncating, to be consistent with what happens with fixnums.
* test/src/floatfns-tests.el (bignum-to-float): Test rounding.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix (floor 54043195528445955 3.0) bug</title>
<updated>2018-09-13T21:29:58+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2018-09-13T21:28:56+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c44bc4d370b38ac3e9da15579fd372d1410d4b4c'/>
<id>c44bc4d370b38ac3e9da15579fd372d1410d4b4c</id>
<content type='text'>
* src/floatfns.c (rounding_driver): Fix rounding error
that can occur when both args have values exactly
representable as integers but at least one arg is a float.
* test/src/floatfns-tests.el (big-round): New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/floatfns.c (rounding_driver): Fix rounding error
that can occur when both args have values exactly
representable as integers but at least one arg is a float.
* test/src/floatfns-tests.el (big-round): New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix (round 1e+INF) core dump</title>
<updated>2018-09-11T18:34:44+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2018-09-11T18:30:48+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=038a09041af20ed373b15715fbc859d4a305dda8'/>
<id>038a09041af20ed373b15715fbc859d4a305dda8</id>
<content type='text'>
* src/bignum.c (double_to_integer): Signal an error
if D cannot be converted, instead of dumping core.
* test/src/floatfns-tests.el (special-round): New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/bignum.c (double_to_integer): Signal an error
if D cannot be converted, instead of dumping core.
* test/src/floatfns-tests.el (special-round): New test.
</pre>
</div>
</content>
</entry>
</feed>
