unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33765: emacs-26.1-mac-7.4; (expt 2 140) ; produces 0 in scratch buffer, unexpectedly
@ 2018-12-16  6:24 Van L
  2018-12-16  7:29 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Van L @ 2018-12-16  6:24 UTC (permalink / raw)
  To: 33765

Hello,

I was pushed to by reading the following to report this bug.

┌────
│ In this business we speak the language of mathematics
│ https://www.washingtonpost.com/local/obituaries/evelyn-berezin-entrepreneur-and-engineer-who-designed-early-word-processor-dies-at-93/2018/12/13/20af4524-fee7-11e8-ad40-cdfd0e0dd65a_story.html
└────


- ------------------------------------------------------------------

#+NAME: unexpected-result-in-scratch-buffer
#+BEGIN_SRC emacs-lisp
(expt 2 140) ; unexpected result is 0
#+END_SRC

- ------------------------------------------------------------------

#+NAME: result-for-comparison

      Chez Scheme Version 9.5
      Copyright 1984-2017 Cisco Systems, Inc.

      > (expt 2 140)
      1393796574908163946345982392040522594123776
      





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#33765: emacs-26.1-mac-7.4; (expt 2 140) ; produces 0 in scratch buffer, unexpectedly
  2018-12-16  6:24 bug#33765: emacs-26.1-mac-7.4; (expt 2 140) ; produces 0 in scratch buffer, unexpectedly Van L
@ 2018-12-16  7:29 ` Eli Zaretskii
  2018-12-16 11:11   ` Van L
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2018-12-16  7:29 UTC (permalink / raw)
  To: 33765, van

On December 16, 2018 8:24:18 AM GMT+02:00, Van L <van@scratch.space> wrote:
> Hello,
> 
> I was pushed to by reading the following to report this bug.
> 
> ┌────
> │ In this business we speak the language of mathematics
> │
> https://www.washingtonpost.com/local/obituaries/evelyn-berezin-entrepreneur-and-engineer-who-designed-early-word-processor-dies-at-93/2018/12/13/20af4524-fee7-11e8-ad40-cdfd0e0dd65a_story.html
> └────
> 
> 
> - ------------------------------------------------------------------
> 
> #+NAME: unexpected-result-in-scratch-buffer
> #+BEGIN_SRC emacs-lisp
> (expt 2 140) ; unexpected result is 0
> #+END_SRC
> 
> - ------------------------------------------------------------------
> 
> #+NAME: result-for-comparison
> 
>       Chez Scheme Version 9.5
>       Copyright 1984-2017 Cisco Systems, Inc.
> 
>       > (expt 2 140)
>       1393796574908163946345982392040522594123776
>       

Why do you say this is unexpected?

If you want the same support for huge numbers as in Scheme, try Emacs 27.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#33765: emacs-26.1-mac-7.4; (expt 2 140) ; produces 0 in scratch buffer, unexpectedly
  2018-12-16  7:29 ` Eli Zaretskii
@ 2018-12-16 11:11   ` Van L
  2018-12-16 13:07     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Van L @ 2018-12-16 11:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 33765


> Why do you say this is unexpected?

I am not a mathematician but I believe the answer is wrong for 2^140.

> If you want the same support for huge numbers as in Scheme, try Emacs 27.

I take that to mean the master branch but the emacs-mac repo-updates are less freq. than gnu-emacs’s.

Thanks.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#33765: emacs-26.1-mac-7.4; (expt 2 140) ; produces 0 in scratch buffer, unexpectedly
  2018-12-16 11:11   ` Van L
@ 2018-12-16 13:07     ` Eli Zaretskii
  2018-12-16 21:24       ` Van L
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2018-12-16 13:07 UTC (permalink / raw)
  To: Van L; +Cc: 33765

On December 16, 2018 1:11:25 PM GMT+02:00, Van L <van@scratch.space> wrote:
> 
> > Why do you say this is unexpected?
> 
> I am not a mathematician but I believe the answer is wrong for 2^140.

The correct value cannot be represented in an Emacs fixnum.  What did you expect Emacs to do?  IOW, what would be the "expected" result, given the limited range of integers we can represent?

> > If you want the same support for huge numbers as in Scheme, try
> Emacs 27.
> 
> I take that to mean the master branch but the emacs-mac repo-updates
> are less freq. than gnu-emacs’s.

Some features, such as this one, will not be available in older versions.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#33765: emacs-26.1-mac-7.4; (expt 2 140) ; produces 0 in scratch buffer, unexpectedly
  2018-12-16 13:07     ` Eli Zaretskii
@ 2018-12-16 21:24       ` Van L
  2018-12-17 15:53         ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Van L @ 2018-12-16 21:24 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 33765


>>> Why do you say this is unexpected?
>> 
>> I am not a mathematician but I believe the answer is wrong for 2^140.
> 
> The correct value cannot be represented in an Emacs fixnum.  What did you expect Emacs to do?  IOW, what would be the "expected" result, given the limited range of integers we can represent?

I expect no answer and an error out with an informative explanation if asked for, when Emacs is unable to do.

>>> If you want the same support for huge numbers as in Scheme, try
>> Emacs 27.
>> 
>> I take that to mean the master branch but the emacs-mac repo-updates
>> are less freq. than gnu-emacs’s.
> 
> Some features, such as this one, will not be available in older versions.

A helpful place to explain the versioning policy would be a file in the emacs/etc directory.

Version 26 means stable, 27 means unstable is my guess.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#33765: emacs-26.1-mac-7.4; (expt 2 140) ; produces 0 in scratch buffer, unexpectedly
  2018-12-16 21:24       ` Van L
@ 2018-12-17 15:53         ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2018-12-17 15:53 UTC (permalink / raw)
  To: Van L; +Cc: 33765

> From: Van L <van@scratch.space>
> Date: Mon, 17 Dec 2018 08:24:21 +1100
> Cc: bug-gnu-emacs@gnu.org,
>  33765@debbugs.gnu.org
> 
> > The correct value cannot be represented in an Emacs fixnum.  What did you expect Emacs to do?  IOW, what would be the "expected" result, given the limited range of integers we can represent?
> 
> I expect no answer and an error out with an informative explanation if asked for, when Emacs is unable to do.

Since we already do better than that on the master branch (including
signal an overflow error when even a bignum cannot represent the
result), I think this bug is already solved and should be closed.

> A helpful place to explain the versioning policy would be a file in the emacs/etc directory.
> 
> Version 26 means stable, 27 means unstable is my guess.

We don't have stable and unstable releases.  We have a release branch
and a development branch, and their roles are described in CONTRIBUTE.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-12-17 15:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-16  6:24 bug#33765: emacs-26.1-mac-7.4; (expt 2 140) ; produces 0 in scratch buffer, unexpectedly Van L
2018-12-16  7:29 ` Eli Zaretskii
2018-12-16 11:11   ` Van L
2018-12-16 13:07     ` Eli Zaretskii
2018-12-16 21:24       ` Van L
2018-12-17 15:53         ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).