mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Release calc version 2.12.0
This commit is contained in:
26
help/printf
26
help/printf
@@ -89,21 +89,21 @@ DESCRIPTION
|
||||
configuration parameters "outround", "tilde", "fullzero", "leadzero".
|
||||
|
||||
EXAMPLE
|
||||
> c = config("epsilon", 1e-6); c = config("display", 6);
|
||||
> c = config("tilde", 1); c = config("outround", 0);
|
||||
> c = config("fullzero", 0);
|
||||
> fmt = "%f,%10f,%-10f,%10.4f,%.4f,%.f.\n";
|
||||
> a = sqrt(3);
|
||||
> printf(fmt,a,a,a,a,a,a);
|
||||
; c = config("epsilon", 1e-6); c = config("display", 6);
|
||||
; c = config("tilde", 1); c = config("outround", 0);
|
||||
; c = config("fullzero", 0);
|
||||
; fmt = "%f,%10f,%-10f,%10.4f,%.4f,%.f.\n";
|
||||
; a = sqrt(3);
|
||||
; printf(fmt,a,a,a,a,a,a);
|
||||
1.732051, 1.732051,1.732051 , ~1.7320,~1.7320,~1.
|
||||
|
||||
> c = config("tilde", 0); c = config("outround",24);
|
||||
> c = config("fullzero", 1);
|
||||
> printf(fmt,a,a,a,a,a,a);
|
||||
; c = config("tilde", 0); c = config("outround",24);
|
||||
; c = config("fullzero", 1);
|
||||
; printf(fmt,a,a,a,a,a,a);
|
||||
1.732051, 1.732051,1.732051 , 1.7321,1.7321,2.
|
||||
|
||||
> mat A[4] = {sqrt(2), 3/7, "undefined", null()};
|
||||
> printf("%f%r",A,A);
|
||||
; mat A[4] = {sqrt(2), 3/7, "undefined", null()};
|
||||
; printf("%f%r",A,A);
|
||||
mat [4] (4 elements, 4 nonzero):
|
||||
[0] = 1.414214
|
||||
[1] = .428571
|
||||
@@ -142,8 +142,8 @@ SEE ALSO
|
||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
##
|
||||
## @(#) $Revision: 29.2 $
|
||||
## @(#) $Id: printf,v 29.2 2000/06/07 14:02:33 chongo Exp $
|
||||
## @(#) $Revision: 29.3 $
|
||||
## @(#) $Id: printf,v 29.3 2006/05/07 07:25:46 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/printf,v $
|
||||
##
|
||||
## Under source code control: 1996/03/12 22:50:41
|
||||
|
Reference in New Issue
Block a user