Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #197696 > unrolled thread
| Started by | Ken Heard <kenslists@teksavvy.com> |
|---|---|
| First post | 2018-07-16 19:00 +0200 |
| Last post | 2018-07-23 16:50 +0200 |
| Articles | 20 on this page of 26 — 16 participants |
Back to article view | Back to linux.debian.user
Calculator with "tapes" Ken Heard <kenslists@teksavvy.com> - 2018-07-16 19:00 +0200
Re: Calculator with "tapes" Joe <joe@jretrading.com> - 2018-07-16 19:10 +0200
Re: Calculator with "tapes" Jude DaShiell <jdashiel@panix.com> - 2018-07-16 19:50 +0200
Re: Calculator with "tapes" Boyan Penkov <boyan.penkov@gmail.com> - 2018-07-16 19:20 +0200
Re: Calculator with "tapes" Nicholas Geovanis <nickgeovanis@gmail.com> - 2018-07-16 19:20 +0200
Re: Calculator with "tapes" Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2018-07-16 19:50 +0200
Calculator with "tapes" "Thomas Schmitt" <scdbackup@gmx.net> - 2018-07-16 20:00 +0200
Re: Calculator with "tapes" Eric S Fraga <e.fraga@ucl.ac.uk> - 2018-07-16 23:10 +0200
Re: Calculator with "tapes" Ben Caradoc-Davies <ben@transient.nz> - 2018-07-17 02:00 +0200
Re: Calculator with "tapes" Zenaan Harkness <zenaan@freedbms.net> - 2018-07-17 02:20 +0200
Re: Calculator with "tapes" Stefan Krusche <linux@stefan-krusche.de> - 2018-07-17 03:10 +0200
Re: Calculator with "tapes" Curt <curty@free.fr> - 2018-07-17 11:20 +0200
Re: Calculator with "tapes" Stefan Krusche <linux@stefan-krusche.de> - 2018-07-17 12:40 +0200
Re: Calculator with "tapes" Curt <curty@free.fr> - 2018-07-17 13:40 +0200
Re: Calculator with "tapes" Stefan Krusche <linux@stefan-krusche.de> - 2018-07-17 14:30 +0200
Re: Calculator with "tapes" Curt <curty@free.fr> - 2018-07-17 14:50 +0200
Re: Calculator with "tapes" Greg Wooledge <wooledg@eeg.ccf.org> - 2018-07-17 15:00 +0200
Re: Calculator with "tapes" Zenaan Harkness <zenaan@freedbms.net> - 2018-07-23 04:30 +0200
Re: Calculator with "tapes" Curt <curty@free.fr> - 2018-07-23 09:30 +0200
Re: Calculator with "tapes" Stefan Krusche <linux@stefan-krusche.de> - 2018-07-23 13:10 +0200
Re: Calculator with "tapes" Stefan Krusche <linux@stefan-krusche.de> - 2018-07-23 13:20 +0200
Re: Calculator with "tapes" <tomas@tuxteam.de> - 2018-07-23 13:30 +0200
Re: Calculator with "tapes" Stefan Krusche <linux@stefan-krusche.de> - 2018-07-23 13:50 +0200
Re: Calculator with "tapes" <tomas@tuxteam.de> - 2018-07-23 13:30 +0200
Re: Calculator with "tapes" Piotr <zaxonxp45@gmail.com> - 2018-07-17 07:30 +0200
Re: Calculator with "tapes" John Darrah <xyllyx@gmail.com> - 2018-07-23 16:50 +0200
Page 1 of 2 [1] 2 Next page →
| From | Ken Heard <kenslists@teksavvy.com> |
|---|---|
| Date | 2018-07-16 19:00 +0200 |
| Subject | Calculator with "tapes" |
| Message-ID | <wcf0R-61U-5@gated-at.bofh.it> |
Does Debian have a calculator package which has the equivalent of the tape produced by mechanical machines to show the entire calculation. I find such "tapes" essential when for example I am adding a long list of numbers and need to check after the addition is done to verify that all the numbers were entered correctly. Regards, Ken
[toc] | [next] | [standalone]
| From | Joe <joe@jretrading.com> |
|---|---|
| Date | 2018-07-16 19:10 +0200 |
| Message-ID | <wcfay-6kz-9@gated-at.bofh.it> |
| In reply to | #197696 |
On Mon, 16 Jul 2018 12:57:58 -0400 Ken Heard <kenslists@teksavvy.com> wrote: > Does Debian have a calculator package which has the equivalent of the > tape produced by mechanical machines to show the entire calculation. > I find such "tapes" essential when for example I am adding a long > list of numbers and need to check after the addition is done to > verify that all the numbers were entered correctly. > > Regards, Ken > I use a spreadsheet for this. -- Joe
[toc] | [prev] | [next] | [standalone]
| From | Jude DaShiell <jdashiel@panix.com> |
|---|---|
| Date | 2018-07-16 19:50 +0200 |
| Message-ID | <wcfNf-6xF-9@gated-at.bofh.it> |
| In reply to | #197697 |
On Mon, 16 Jul 2018, Joe wrote: > Date: Mon, 16 Jul 2018 13:06:13 > From: Joe <joe@jretrading.com> > To: debian-user@lists.debian.org > Subject: Re: Calculator with "tapes" > Resent-Date: Mon, 16 Jul 2018 17:06:32 +0000 (UTC) > Resent-From: debian-user@lists.debian.org > > On Mon, 16 Jul 2018 12:57:58 -0400 > Ken Heard <kenslists@teksavvy.com> wrote: > > > Does Debian have a calculator package which has the equivalent of the > > tape produced by mechanical machines to show the entire calculation. > > I find such "tapes" essential when for example I am adding a long > > list of numbers and need to check after the addition is done to > > verify that all the numbers were entered correctly. > > > > Regards, Ken > > > > I use a spreadsheet for this. > > dc can do this if you don't mind the command line and remember your tape in this case is called a stack. This is important to remember since commands exist in dc if you use them that will destroy the stack either immediately or slowly. There is a command in dc to print the entire stack which is what you will find useful too. --
[toc] | [prev] | [next] | [standalone]
| From | Boyan Penkov <boyan.penkov@gmail.com> |
|---|---|
| Date | 2018-07-16 19:20 +0200 |
| Message-ID | <wcfkd-6nR-1@gated-at.bofh.it> |
| In reply to | #197696 |
[Multipart message — attachments visible in raw view] — view raw
iPython too much overhead? On Mon, Jul 16, 2018, 12:58 Ken Heard <kenslists@teksavvy.com> wrote: > Does Debian have a calculator package which has the equivalent of the > tape produced by mechanical machines to show the entire calculation. I > find such "tapes" essential when for example I am adding a long list of > numbers and need to check after the addition is done to verify that all > the numbers were entered correctly. > > Regards, Ken > >
[toc] | [prev] | [next] | [standalone]
| From | Nicholas Geovanis <nickgeovanis@gmail.com> |
|---|---|
| Date | 2018-07-16 19:20 +0200 |
| Message-ID | <wcfkd-6nR-3@gated-at.bofh.it> |
| In reply to | #197696 |
galculator has a so-called "paper mode" on the "View" selection that likely does what you want. It's in the Debian 8 repository, written to GTK. On Mon, Jul 16, 2018 at 11:58 AM Ken Heard <kenslists@teksavvy.com> wrote: > > Does Debian have a calculator package which has the equivalent of the > tape produced by mechanical machines to show the entire calculation. I > find such "tapes" essential when for example I am adding a long list of > numbers and need to check after the addition is done to verify that all > the numbers were entered correctly. > > Regards, Ken >
[toc] | [prev] | [next] | [standalone]
| From | Joe Pfeiffer <pfeiffer@cs.nmsu.edu> |
|---|---|
| Date | 2018-07-16 19:50 +0200 |
| Message-ID | <wcfNf-6xF-5@gated-at.bofh.it> |
| In reply to | #197696 |
Ken Heard <kenslists@teksavvy.com> writes: > Does Debian have a calculator package which has the equivalent of the > tape produced by mechanical machines to show the entire calculation. > I find such "tapes" essential when for example I am adding a long list > of numbers and need to check after the addition is done to verify that > all the numbers were entered correctly. > > Regards, Ken The emacs calculator mode has it.
[toc] | [prev] | [next] | [standalone]
| From | "Thomas Schmitt" <scdbackup@gmx.net> |
|---|---|
| Date | 2018-07-16 20:00 +0200 |
| Message-ID | <wcfWV-6B2-3@gated-at.bofh.it> |
| In reply to | #197696 |
Hi, if i had no other preferences, i'd use program "bc" in an xterm with enormous scroll buffer. Run in some shell window: xterm -fg black -bg wheat -sl 100000 & and then in the newly emerged xterm shell window bc (My virtual paper is of eco-friendly color. I do not let xterm start bc directly, because then on bc xommand "quit" the paper would vanish.) Have a nice day :) Thomas
[toc] | [prev] | [next] | [standalone]
| From | Eric S Fraga <e.fraga@ucl.ac.uk> |
|---|---|
| Date | 2018-07-16 23:10 +0200 |
| Message-ID | <wciUO-ad-11@gated-at.bofh.it> |
| In reply to | #197696 |
calc mode in emacs does this (and so much more). -- Eric S Fraga via Emacs 27.0.50 & org 9.1.13 on Debian 9.4
[toc] | [prev] | [next] | [standalone]
| From | Ben Caradoc-Davies <ben@transient.nz> |
|---|---|
| Date | 2018-07-17 02:00 +0200 |
| Message-ID | <wclzk-1yA-1@gated-at.bofh.it> |
| In reply to | #197696 |
On 17/07/18 04:57, Ken Heard wrote: > Does Debian have a calculator package which has the equivalent of the > tape produced by mechanical machines to show the entire calculation. I > find such "tapes" essential when for example I am adding a long list of > numbers and need to check after the addition is done to verify that all > the numbers were entered correctly. > Regards, Ken I use a Python interpreter in a terminal or libreoffice-calc. Kind regards, -- Ben Caradoc-Davies <ben@transient.nz> Director Transient Software Limited <https://transient.nz/> New Zealand
[toc] | [prev] | [next] | [standalone]
| From | Zenaan Harkness <zenaan@freedbms.net> |
|---|---|
| Date | 2018-07-17 02:20 +0200 |
| Message-ID | <wclSG-1Ur-7@gated-at.bofh.it> |
| In reply to | #197696 |
On Mon, Jul 16, 2018 at 12:57:58PM -0400, Ken Heard wrote: > Does Debian have a calculator package which has the equivalent of the tape > produced by mechanical machines to show the entire calculation. I find such > "tapes" essential when for example I am adding a long list of numbers and need > to check after the addition is done to verify that all the numbers were > entered correctly. bc FTW - so quick, so handy First line I always run though is: scale=9
[toc] | [prev] | [next] | [standalone]
| From | Stefan Krusche <linux@stefan-krusche.de> |
|---|---|
| Date | 2018-07-17 03:10 +0200 |
| Message-ID | <wcmF3-2q6-13@gated-at.bofh.it> |
| In reply to | #197713 |
Am Dienstag 17 Juli 2018 schrieb Zenaan Harkness: > bc FTW - so quick, so handy > > First line I always run though is: > scale=9 When you don't want to type this every time: $ cat ~/.bcrc scale=3 Regards, Stefan
[toc] | [prev] | [next] | [standalone]
| From | Curt <curty@free.fr> |
|---|---|
| Date | 2018-07-17 11:20 +0200 |
| Message-ID | <wcujf-6Ts-5@gated-at.bofh.it> |
| In reply to | #197714 |
On 2018-07-17, Stefan Krusche <linux@stefan-krusche.de> wrote: > Am Dienstag 17 Juli 2018 schrieb Zenaan Harkness: >> bc FTW - so quick, so handy >> >> First line I always run though is: >> scale=9 > > When you don't want to type this every time: > > $ cat ~/.bcrc > scale=3 Nein? > Regards, > Stefan > > > -- The superintendent and the gang bosses all turned out with revolvers in black holsters strapped around their waists and one of them made a speech in English and another one Sicilian saying that this was a squareshooting concern that had always treated laborers square and if they didn’t like it they could get the hell out. --John Dos Passos, 1919 (second book of U.S.A. trilogy)
[toc] | [prev] | [next] | [standalone]
| From | Stefan Krusche <linux@stefan-krusche.de> |
|---|---|
| Date | 2018-07-17 12:40 +0200 |
| Message-ID | <wcvyF-7xd-5@gated-at.bofh.it> |
| In reply to | #197720 |
Am Dienstag 17 Juli 2018 schrieb Curt: > On 2018-07-17, Stefan Krusche <linux@stefan-krusche.de> wrote: > > Am Dienstag 17 Juli 2018 schrieb Zenaan Harkness: > >> bc FTW - so quick, so handy > >> > >> First line I always run though is: > >> scale=9 > > > > When you don't want to type this every time: > > > > $ cat ~/.bcrc > > scale=3 > > Nein? Hi Curt, unfortunately I have absolutely no idea what you want to say by this response which translates to "No?"... :-( Kind Regards, Stefan
[toc] | [prev] | [next] | [standalone]
| From | Curt <curty@free.fr> |
|---|---|
| Date | 2018-07-17 13:40 +0200 |
| Message-ID | <wcwuK-84X-7@gated-at.bofh.it> |
| In reply to | #197723 |
On 2018-07-17, Stefan Krusche <linux@stefan-krusche.de> wrote: > Am Dienstag 17 Juli 2018 schrieb Curt: >> On 2018-07-17, Stefan Krusche <linux@stefan-krusche.de> wrote: >> > Am Dienstag 17 Juli 2018 schrieb Zenaan Harkness: >> >> bc FTW - so quick, so handy >> >> >> >> First line I always run though is: >> >> scale=9 >> > >> > When you don't want to type this every time: >> > >> > $ cat ~/.bcrc >> > scale=3 >> >> Nein? > > Hi Curt, > > unfortunately I have absolutely no idea what you want to say by this response > which translates to "No?"... :-( Hi Stefan, Yeah, it was kind of a deliberate (and obscure) metathesis/anagram/bilingual play on words because he wants 9 (nein, nine) and you showed 3 (when he always wants nine)! curty@einstein:~$ echo 'scale=2; 2.777 - 1.4744' | bc 1.3026 Oops. Should read the man page I guess*. In other words, a complete waste of everybody's time as usual (by yours truly, of course, meaning me). * It seems division uses the scale variable, but not addition, subtraction, or multiplication. They use the scale of the operands. "expr / expr". > Kind Regards, > Stefan > > -- The superintendent and the gang bosses all turned out with revolvers in black holsters strapped around their waists and one of them made a speech in English and another one Sicilian saying that this was a squareshooting concern that had always treated laborers square and if they didn’t like it they could get the hell out. --John Dos Passos, 1919 (second book of U.S.A. trilogy)
[toc] | [prev] | [next] | [standalone]
| From | Stefan Krusche <linux@stefan-krusche.de> |
|---|---|
| Date | 2018-07-17 14:30 +0200 |
| Message-ID | <wcxh7-7X-1@gated-at.bofh.it> |
| In reply to | #197726 |
Am Dienstag 17 Juli 2018 schrieb Curt: > On 2018-07-17, Stefan Krusche <linux@stefan-krusche.de> wrote: > > Am Dienstag 17 Juli 2018 schrieb Curt: > >> On 2018-07-17, Stefan Krusche <linux@stefan-krusche.de> wrote: > >> > Am Dienstag 17 Juli 2018 schrieb Zenaan Harkness: > >> >> bc FTW - so quick, so handy > >> >> > >> >> First line I always run though is: > >> >> scale=9 > >> > > >> > When you don't want to type this every time: > >> > > >> > $ cat ~/.bcrc > >> > scale=3 > >> > >> Nein? > > > > Hi Curt, > > > > unfortunately I have absolutely no idea what you want to say by this > > response which translates to "No?"... :-( > > Hi Stefan, > > Yeah, it was kind of a deliberate (and obscure) > metathesis/anagram/bilingual play on words because he wants 9 (nein, > nine) and you showed 3 (when he always wants nine)! Alright, thanks for explaining, now I get it. Yes, okay, 3/9 mismatch. I just quickly wanted to point out, that it is possible to store scale= in a config file.. Stefan
[toc] | [prev] | [next] | [standalone]
| From | Curt <curty@free.fr> |
|---|---|
| Date | 2018-07-17 14:50 +0200 |
| Message-ID | <wcxAt-eu-1@gated-at.bofh.it> |
| In reply to | #197729 |
On 2018-07-17, Stefan Krusche <linux@stefan-krusche.de> wrote: > > Alright, thanks for explaining, now I get it. Yes, okay, 3/9 mismatch. I just > quickly wanted to point out, that it is possible to store scale= in a config > file.. Yes, of course, we all understood that you were showing the example of your own file--there was no confusion. > Stefan > > -- The superintendent and the gang bosses all turned out with revolvers in black holsters strapped around their waists and one of them made a speech in English and another one Sicilian saying that this was a squareshooting concern that had always treated laborers square and if they didn’t like it they could get the hell out. --John Dos Passos, 1919 (second book of U.S.A. trilogy)
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2018-07-17 15:00 +0200 |
| Message-ID | <wcxKa-hJ-7@gated-at.bofh.it> |
| In reply to | #197732 |
People are talking about manually setting the "scale" variable in bc, and using small values like 3 for it. Please note that this the scale variable is NOT just used for rounding of final results for display. It's used for internal precision of storage of ALL intermediate results. Using a small scale can and will distort your results. I learned this the hard way. Need an example? OK. Let's calculate 1.4 to the power of 50.5. $ bc -l bc 1.06.95 Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. 1.4^50.5 Runtime warning (func=(main), adr=12): non-zero scale in exponent 20248916.23976437135118764865 As the warning indicates, you can't actually use a non-integer exponent with the ^ operator in bc -l. But you can rewrite it with a logarithm and an exponent. So let's do that. e(50.5*l(1.4)) 23958840.79914949898175198920 OK, that's too many digits, so now let's do the same thing with scale=3: scale=3 e(50.5*l(1.4)) 23394230.731 The result is substantially different. This is because the scale is used internally, NOT just on the final result. If you use bc, always just use "bc -l" which sets a scale of 20, and leave it set that way. If you need a prettier result, take the result from bc -l and use printf to round it. Or use a programming language that has floating point arithmetic support.
[toc] | [prev] | [next] | [standalone]
| From | Zenaan Harkness <zenaan@freedbms.net> |
|---|---|
| Date | 2018-07-23 04:30 +0200 |
| Message-ID | <weyLL-1Io-1@gated-at.bofh.it> |
| In reply to | #197714 |
On Tue, Jul 17, 2018 at 03:04:41AM +0200, Stefan Krusche wrote: > Am Dienstag 17 Juli 2018 schrieb Zenaan Harkness: > > bc FTW - so quick, so handy > > > > First line I always run though is: > > scale=9 > > When you don't want to type this every time: > > $ cat ~/.bcrc > scale=3 OK, so I created ~/.bcrc, setting scale to 20: $ cat ~/.bcrc scale=20 BUT, when I run bc, I get: $ bc bc 1.06.95 Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. scale 0 ^D What am I doing wrong here? TIA,
[toc] | [prev] | [next] | [standalone]
| From | Curt <curty@free.fr> |
|---|---|
| Date | 2018-07-23 09:30 +0200 |
| Message-ID | <weDs5-4Nw-1@gated-at.bofh.it> |
| In reply to | #197930 |
On 2018-07-23, Zenaan Harkness <zenaan@freedbms.net> wrote: > > BUT, when I run bc, I get: bc -l (like Greg said works here). curty@einstein:~$ bc -l bc 1.06.95 Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. scale 20 curty@einstein:~$ bc bc 1.06.95 Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. scale 0 I believe 20 is the default scale, so your .bcrc might express the principle of superfluity rather than anything else. > $ bc > bc 1.06.95 > Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software > Foundation, Inc. > This is free software with ABSOLUTELY NO WARRANTY. > For details type `warranty'. > scale > 0 > ^D > > > What am I doing wrong here? > TIA, > > -- Boris sober and Boris drunk are such different people, they’ve never even met. -- Sergei Dovlatov, Pushkin Hills
[toc] | [prev] | [next] | [standalone]
| From | Stefan Krusche <linux@stefan-krusche.de> |
|---|---|
| Date | 2018-07-23 13:10 +0200 |
| Message-ID | <weGT0-77R-5@gated-at.bofh.it> |
| In reply to | #197930 |
Am Montag 23 Juli 2018 schrieb Zenaan Harkness: > On Tue, Jul 17, 2018 at 03:04:41AM +0200, Stefan Krusche wrote: > > Am Dienstag 17 Juli 2018 schrieb Zenaan Harkness: > > > bc FTW - so quick, so handy > > > > > > First line I always run though is: > > > scale=9 > > > > When you don't want to type this every time: > > > > $ cat ~/.bcrc > > scale=3 > > OK, so I created ~/.bcrc, setting scale to 20: > > $ cat ~/.bcrc > scale=20 > > BUT, when I run bc, I get: > > $ bc > bc 1.06.95 > Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software > Foundation, Inc. > This is free software with ABSOLUTELY NO WARRANTY. > For details type `warranty'. > scale > 0 > ^D > > > What am I doing wrong here? No idea... .bcrc saved? And readable? Sorry, can't help. Stefan
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | linux.debian.user
csiph-web