Mattias Engdegård
cf40795888
Calc: allow infinite binary word size (bug#43764)
...
Setting the word size ("b w") to 0 removes the word size clipping for
all bit operations (effectively as if a word size of -∞ had been set).
Rotation is disallowed; logical and arithmetic shifts behave
identically.
After a suggestion by Vincent Belaïche.
* lisp/calc/calc-bin.el (calc-word-size, math-binary-arg)
(math-binary-modulo-args, calcFunc-lsh, calcFunc-ash, calcFunc-rot)
(math-clip, math-format-twos-complement): Allow a word size of 0,
meaning -∞.
* test/lisp/calc/calc-tests.el
(calc-tests--not, calc-tests--and, calc-tests--or, calc-tests--xor)
(calc-tests--diff): New functions.
(calc-tests--clip, calc-tests--rot, calc-shift-binary): Extend to
cover word size 0.
(calc-bit-ops): New test.
* doc/misc/calc.texi (Binary Functions): Update manual.
* etc/NEWS: Announce the change.
2020-10-13 11:29:01 +02:00
..
2020-08-09 15:13:05 -05:00
2020-10-13 11:29:01 +02:00
2020-09-02 19:58:56 +02:00
2020-09-10 20:25:19 +02:00
2020-05-01 13:05:26 +02:00
2020-10-06 14:22:57 +02:00
2020-05-01 13:05:26 +02:00
2020-08-05 10:27:40 +02:00
2020-08-29 22:41:51 +02:00
2020-10-01 05:19:49 +02:00
2020-07-31 04:19:03 +02:00
2020-10-06 03:48:00 +02:00
2020-10-02 09:38:24 -07:00
2020-10-12 11:41:54 +02:00
2020-09-21 18:47:55 +02:00
2020-10-01 15:34:46 +02:00
2020-09-10 19:32:53 +02:00
2020-09-02 12:53:02 +02:00
2020-10-06 03:51:17 +02:00
2020-10-06 22:08:19 -04:00
2020-08-08 01:40:38 +02:00
2020-10-09 12:23:02 +02:00
2020-01-01 00:59:52 +00:00
2020-09-23 20:53:06 +02:00
2020-10-11 15:56:21 +02:00
2020-10-02 04:34:31 +02:00
2020-01-01 00:59:52 +00:00
2020-09-23 20:03:19 +02:00
2020-09-23 20:03:19 +02:00
2020-04-18 18:43:23 +02:00
2020-09-26 12:03:07 +02:00
2020-01-22 07:37:01 +01:00
2020-01-01 00:59:52 +00:00
2020-06-21 13:42:14 +01:00
2020-09-10 20:25:19 +02:00
2020-06-18 13:11:17 +01:00
2020-08-09 15:13:05 -05:00
2020-01-01 00:59:52 +00:00
2020-01-01 00:59:52 +00:00
2020-08-27 02:53:25 +02:00
2020-01-01 00:59:52 +00:00
2020-10-09 06:57:07 +02:00
2020-09-23 20:03:19 +02:00
2020-09-26 12:03:07 +02:00
2020-05-01 13:05:26 +02:00
2020-01-01 00:59:52 +00:00
2020-07-08 17:35:54 -07:00
2020-09-21 14:26:42 +02:00
2020-09-12 03:42:37 +02:00
2020-01-01 00:59:52 +00:00
2020-04-30 10:46:54 +01:00
2020-10-02 09:38:24 -07:00
2020-04-19 08:04:57 +02:00
2020-01-01 00:59:52 +00:00
2020-08-27 02:53:25 +02:00
2020-08-15 12:11:41 +02:00
2020-09-10 20:25:19 +02:00
2020-10-02 09:38:24 -07:00
2020-01-01 00:59:52 +00:00
2020-01-01 00:59:52 +00:00
2020-06-18 12:46:21 +01:00
2020-09-26 12:03:07 +02:00
2020-05-09 20:01:37 +02:00
2020-01-01 00:59:52 +00:00
2020-08-27 02:53:25 +02:00
2020-01-01 00:59:52 +00:00
2020-01-24 23:04:34 +01:00
2020-01-01 00:59:52 +00:00
2020-01-01 00:59:52 +00:00
2020-01-01 00:59:52 +00:00
2020-06-21 12:50:34 +01:00
2020-05-01 13:05:26 +02:00
2020-08-27 02:53:25 +02:00
2020-05-01 13:05:26 +02:00
2020-08-27 02:53:25 +02:00
2020-09-21 14:26:42 +02:00
2020-01-01 00:59:52 +00:00
2020-01-01 00:59:52 +00:00
2020-01-01 00:59:52 +00:00
2020-05-01 13:05:26 +02:00
2020-01-01 00:59:52 +00:00
2020-08-27 02:53:25 +02:00
2020-04-26 00:30:37 +02:00
2020-01-01 00:59:52 +00:00
2020-09-08 18:31:15 +02:00
2020-01-01 00:59:52 +00:00
2020-01-01 00:59:52 +00:00
2020-05-16 22:25:07 -07:00
2020-09-02 12:53:02 +02:00
2020-01-01 00:59:52 +00:00
2020-01-01 00:59:52 +00:00
2020-05-31 12:31:27 +02:00
2020-01-01 00:59:52 +00:00
2020-08-08 01:40:38 +02:00
2020-01-01 00:59:52 +00:00
2020-01-01 00:59:52 +00:00
2020-09-10 20:25:19 +02:00
2020-01-20 15:52:27 +01:00
2020-10-10 07:50:20 -07:00
2020-08-27 02:53:25 +02:00
2020-01-01 00:59:52 +00:00
2020-05-14 19:29:14 +02:00
2020-09-27 13:32:27 +02:00
2020-01-01 00:59:52 +00:00
2020-05-14 18:43:15 +02:00
2020-02-21 11:15:00 +02:00
2020-01-01 00:59:52 +00:00
2020-05-01 13:05:26 +02:00
2020-01-01 00:59:52 +00:00
2020-01-01 01:08:16 +00:00
2020-01-01 00:59:52 +00:00
2020-04-28 23:35:52 +02:00
2020-10-01 23:34:01 +02:00
2020-01-01 00:59:52 +00:00
2020-09-23 15:45:36 +02:00
2020-01-01 00:59:52 +00:00
2020-09-26 11:48:09 +02:00
2020-01-01 00:59:52 +00:00