GNU bug report logs -
#37235
26.1; Precedence error in calc-eval
Previous Next
Reported by: Charles Karney <charles <at> karney.com>
Date: Fri, 30 Aug 2019 14:44:02 UTC
Severity: normal
Tags: notabug
Found in version 26.1
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#37235: 26.1; Precedence error in calc-eval
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 37235 <at> debbugs.gnu.org.
--
37235: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37235
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Mauro Aranda <maurooaranda <at> gmail.com> writes:
>
> tags 37235 notabug
> quit
>
> Charles Karney via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs <at> gnu.org> writes:
>
> > In GNU Emacs 26.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.23.2)
> > of 2018-08-13 built on buildvm-13.phx2.fedoraproject.org
> > Windowing system distributor 'Fedora Project', version 11.0.12004000
> > System Description: Fedora release 29 (Twenty Nine)
> >
> > The precedence of calc-eval doesn't follow C-like rules.
> >
> > (calc-eval "1/2*3") returns "0.166666666667"
> >
> > returning the same answer as (calc-eval "1/2/3"). It should return
> > "1.5".
> >
>
> It works as documented in the Calc manual, section 5.15 Formulas:
> C-h i m calc RET 5 m formulas RET
>
> Calc gives '/' lower precedence than '*' by default.
>
> To make Calc follow C-like rules, you can set it with the command
> calc-c-language. You can read its documentation with:
> C-h i m calc RET i calc-c-language
Since this is notabug, I'm also closing it.
Best regards,
Stefan Kangas
[Message part 3 (message/rfc822, inline)]
In GNU Emacs 26.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.23.2)
of 2018-08-13 built on buildvm-13.phx2.fedoraproject.org
Windowing system distributor 'Fedora Project', version 11.0.12004000
System Description: Fedora release 29 (Twenty Nine)
The precedence of calc-eval doesn't follow C-like rules.
(calc-eval "1/2*3") returns "0.166666666667"
returning the same answer as (calc-eval "1/2/3"). It should return
"1.5".
Configured using:
'configure --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --program-prefix=
--disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
--libexecdir=/usr/libexec --localstatedir=/var
--sharedstatedir=/var/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
--with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
--with-gpm=no --with-xwidgets --with-modules
build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu
'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions
-fstack-protector-strong -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
LDFLAGS=-Wl,-z,relro
PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY ACL
LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES THREADS XWIDGETS LCMS2
Important settings:
value of $LC_COLLATE: C
value of $LC_TIME: C
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=none
locale-coding-system: utf-8-unix
Major mode: Fundamental
Minor modes in effect:
diff-auto-refine-mode: t
save-place-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
/usr/share/emacs/site-lisp/site-start.d/maxima-modes hides
/usr/share/emacs/site-lisp/maxima/site_start.d/maxima-modes
Features:
(shadow sort emacsbug help-mode cl-print debug calc-alg ispell maxima
maxima-font-lock rect misearch multi-isearch calc-map calc-stat calc-vec
calc-ext calc-menu calc-aent calc calc-loaddefs calc-macs org-table
org-rmail org-mhe org-irc org-info org-gnus nnir gnus-sum gnus-group
gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls
utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus
nnheader wid-edit org-docview doc-view jka-compr image-mode org-bibtex
bibtex org-bbdb org-w3m org-element avl-tree generator org advice
org-macro org-footnote org-pcomplete pcomplete org-list org-faces
org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle
org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint comint
ansi-color ring ob-core ob-eval org-compat org-macs org-loaddefs
find-func cal-menu calendar cal-loaddefs vc-git diff-mode easy-mmode
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs mail-extr message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec epa derived epg epg-config
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader warnings lpr elec-pair saveplace
edmacro kmacro tempo url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util url-parse url-vars mailcap
xml-parse doxymacs matlab-load cmake-mode thingatpt rx smtpmail
auth-source cl-seq eieio eieio-core eieio-loaddefs password-cache
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
50magit clang-rename clang-include-fixer let-alist json map seq byte-opt
bytecomp byte-compile cconv clang-format cl-macs gv xml cl-loaddefs
cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting xwidget-internal
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)
Memory information:
((conses 16 295915 64123)
(symbols 48 39027 3)
(miscs 40 315 855)
(strings 32 88008 6139)
(string-bytes 1 2737911)
(vectors 16 42045)
(vector-slots 8 1462820 203824)
(floats 8 223 624)
(intervals 56 3321 604)
(buffers 992 34))
--
Charles Karney <charles <at> karney.com>
Princeton, NJ 08540, USA
https://www.petrel.org
This bug report was last modified 5 years and 252 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.