zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: zcalc doc
@ 2005-06-27 10:18 Peter Stephenson
  2005-06-27 11:14 ` Oliver Kiddle
  2006-02-20 21:28 ` Clint Adams
  0 siblings, 2 replies; 6+ messages in thread
From: Peter Stephenson @ 2005-06-27 10:18 UTC (permalink / raw)
  To: Zsh hackers list

This documents some existing features of zcalc.

Index: Doc/Zsh/contrib.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/contrib.yo,v
retrieving revision 1.42
diff -u -r1.42 contrib.yo
--- Doc/Zsh/contrib.yo	23 May 2005 10:11:28 -0000	1.42
+++ Doc/Zsh/contrib.yo	27 Jun 2005 10:04:21 -0000
@@ -1487,7 +1487,9 @@
 for example, `tt([#16])' to display hexadecimal output preceded by an
 indication of the base, or `tt([##16])' just to display the raw number in
 the given base.  Bases themselves are always specified in decimal.
-`tt([#])' restores the normal output format.
+`tt([#])' restores the normal output format.  Note that setting an output
+base suppresses floating point output; use `tt([#])' to return to normal
+operation.
 
 The output base can be initialised by passing the option `tt(-#)var(base)',
 for example `tt(zcalc -#16)' (the `tt(#)' may have to be quoted, depending
@@ -1499,6 +1501,28 @@
 referred to in tt(ZCALCPROMPT) as `tt(%1v)'.  The default prompt is
 `tt(%1v> )'.
 
+The output precision may be specified within zcalc by special commands
+familiar from many calculators:
+startitem()
+item(tt(norm))(
+The default output format.  It corresponds to the printf tt(%g)
+specification.  Typically this shows six decimal digits.
+)
+item(tt(sci) var(digits))(
+Scientific notation, corresponding to the printf tt(%g) output format with
+the precision given by var(digits).  This produces either fixed point or
+exponential notation depending on the value output.
+)
+item(tt(fix) var(digits))(
+Fixed point notation, corresponding to the printf tt(%f) output format with
+the precision given by var(digits).
+)
+item(tt(eng) var(digits))(
+Exponential notation, corresponding to the printf tt(%E) output format with
+the precision given by var(digits).
+)
+enditem()
+
 See the comments in the function for a few extra tips.
 )
 findex(zed)

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************


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

* Re: PATCH: zcalc doc
  2005-06-27 10:18 PATCH: zcalc doc Peter Stephenson
@ 2005-06-27 11:14 ` Oliver Kiddle
  2005-06-27 11:25   ` Peter Stephenson
  2006-02-20 21:28 ` Clint Adams
  1 sibling, 1 reply; 6+ messages in thread
From: Oliver Kiddle @ 2005-06-27 11:14 UTC (permalink / raw)
  To: Zsh hackers list

Peter wrote:

> +item(tt(eng) var(digits))(
> +Exponential notation, corresponding to the printf tt(%E) output format with

Doesn't eng denote Engineering notation?

Oliver


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.


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

* Re: PATCH: zcalc doc
  2005-06-27 11:14 ` Oliver Kiddle
@ 2005-06-27 11:25   ` Peter Stephenson
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Stephenson @ 2005-06-27 11:25 UTC (permalink / raw)
  To: Zsh hackers list

Oliver Kiddle wrote:
> Peter wrote:
> 
> > +item(tt(eng) var(digits))(
> > +Exponential notation, corresponding to the printf tt(%E) output format wit
> h
> 
> Doesn't eng denote Engineering notation?

Indeed, but that doesn't tell you what it looks like.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************


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

* Re: PATCH: zcalc doc
  2005-06-27 10:18 PATCH: zcalc doc Peter Stephenson
  2005-06-27 11:14 ` Oliver Kiddle
@ 2006-02-20 21:28 ` Clint Adams
  2006-02-21 10:49   ` Peter Stephenson
  1 sibling, 1 reply; 6+ messages in thread
From: Clint Adams @ 2006-02-20 21:28 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hackers list

(21389)
On Mon, Jun 27, 2005 at 11:18:07AM +0100, Peter Stephenson wrote:
> This documents some existing features of zcalc.
> 
> Index: Doc/Zsh/contrib.yo

I think this was never committed.


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

* Re: PATCH: zcalc doc
  2006-02-20 21:28 ` Clint Adams
@ 2006-02-21 10:49   ` Peter Stephenson
  2006-02-21 12:27     ` Clint Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2006-02-21 10:49 UTC (permalink / raw)
  To: Zsh hackers list

Clint Adams wrote:
> (21389)
> On Mon, Jun 27, 2005 at 11:18:07AM +0100, Peter Stephenson wrote:
> > This documents some existing features of zcalc.
> > 
> > Index: Doc/Zsh/contrib.yo
> 
> I think this was never committed.

The patch in 21387 was committed; are you referring to something else?

revision 1.43
date: 2005/06/27 10:22:51;  author: pws;  state: Exp;  lines: +25 -1
21387: zcalc documentation for precision features

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php


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

* Re: PATCH: zcalc doc
  2006-02-21 10:49   ` Peter Stephenson
@ 2006-02-21 12:27     ` Clint Adams
  0 siblings, 0 replies; 6+ messages in thread
From: Clint Adams @ 2006-02-21 12:27 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hackers list

> The patch in 21387 was committed; are you referring to something else?

No, I was confused.


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

end of thread, other threads:[~2006-02-21 12:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-27 10:18 PATCH: zcalc doc Peter Stephenson
2005-06-27 11:14 ` Oliver Kiddle
2005-06-27 11:25   ` Peter Stephenson
2006-02-20 21:28 ` Clint Adams
2006-02-21 10:49   ` Peter Stephenson
2006-02-21 12:27     ` Clint Adams

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

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).