.TH SS 1 "ss version 1.03 2012-09-03"
.SH NAME
SS \- batch spreadsheet calculator
.SH SYNOPSIS
.B "SS [\-h|\-\-help]"
.br
.B "SS \-\-version"
.br
.B "SS [\-H|\-\-HTML|\-\-html] [\-t|\-\-title title] [\-T|\-\-Table|\-\-table]"
.br
.B " [\-p|\-p2|\-\-plot|\-\-plot2d|\-p3|\-\-plot3D] [\-x|\-\-xlabel xlabel]"
.br
.B " [\-y|\-\-ylabel ylabel] [\-z|\-\-zlabel zlabel] [ss options...] [file...]"
.br
.B "ss [\-d|\-\-debug] [\-v|\-\-verbose] [\-r|\-\-rows #rows] [\-c|\-\-cols #cols]"
.SH DESCRIPTION
.I SS
is a batch spreadsheet processor for C programmers.
It produces a spreadsheet display from plain text input files,
similar to the way documents are created using LaTeX.
The resulting display is not interactive.
A shell script front-end is also provided for preprocessing
(using the C preprocessor) and post-processing to generate HTML or graphics
output.
.PP
.I SS
includes all of the numeric operators from the C programming language,
with the same syntax, precedence, and associativity as C.
It also includes all of the functions from the C90 (ANSI/ISO 9899:1990)
standard library math.h,
all of the non-complex functions from the C99 standard library tgmath.h,
as well as other numeric and range functions. It allows cycles and
non-convergent iterative formulas.
.SH OPTIONS
.IP "\-h or \-\-help"
Displays usage summary to standard error and then exits.
.IP "\-\-version"
Displays version to standard output and then exits.
.IP "\-H or \-\-HTML or \-\-html"
Produces HTML output.
.IP "\-t \fItitle\fP or \-\-title \fItitle\fP"
Sets the title for HTML or plot output.
.IP "\-T or \-\-Table or \-\-table"
Produces HTML table output without any ,
, or tags,
suitable for embedding in an HTML document.
.IP "\-p or \-p2 or \-\-plot or \-\-plot2d"
Produces 2D plot GIF output.
.IP "\-p3 or \-\-plot3d"
Produces 3D plot GIF output.
.IP "\-x \fIxlabel\fP or \-\-xlabel \fIxlabel\fP"
Sets the x axis label for plot output.
.IP "\-y \fIylabel\fP or \-\-ylabel \fIylabel\fP"
Sets the y axis label for plot output.
.IP "\-z \fIzlabel\fP or \-\-zlabel \fIzlabel\fP"
Sets the z axis label for plot output.
.IP "\-d or \-\-debug"
Turns on debugging of the flex scanner and bison parser.
.IP "\-v or \-\-verbose"
Displays the row and column index ranges.
.IP "\-r \fI#rows\fP or \-\-rows \fI#rows\fP"
Sets the number of rows (default 1000).
.IP "\-c \fI#cols\fP or \-\-cols \fI#cols\fP"
Sets the number of columns (default 702).
.IP "file..."
Reads input from files, or from standard input if no file names are specified.
The pseudo input file name "\-" can also be used to explicitly specify
reading standard input. All of the input is filtered through the C preprocessor.
.SH "Operators, Functions, Commands, and Constants"
.in 0
.nf
Operators:
() parentheses, (expr)
++ postfix increment, x++
-- postfix decrement, x--
++ prefix increment, ++x
-- prefix decrement, --x
- unary minus
+ unary plus
~ bitwise NOT
! logical NOT
NOT logical NOT
(int) cast
(long) cast
(double) cast
** exponentiation, x**y == pow(x,y)
* multiplication
/ division
% mod, x%y == fmod(x,y)
+ addition
- subtraction
<< shift left, x<> shift right, x>>y == x/2**y
< less than
<= less than or equal
> greater than
>= greater than or equal
== equal
!= not equal
& bitwise AND
^ bitwise XOR
| bitwise OR
&& logical AND
AND logical AND
^^ logical XOR
XOR logical XOR
|| logical OR
OR logical OR
?: conditional operator, e1 ? e2 : e3
= assignment
*= multiplication assignment
/= division assignment
%= mod assignment
+= addition assignment
-= subtraction assignment
<<= shift left assignment
>>= shift right assignment
&= bitwise AND assignment
^= bitwise XOR assignment
|= bitwise OR assignment
&&= logical AND assignment
^^= logical XOR assignment
||= logical OR assignment
, comma operator
Numeric functions:
acos arc cosine
acosh inverse hyperbolic cosine
asin arc sine
asinh inverse hyperbolic sine
atan two-quadrant arctangent
atan2 four-quadrant arctangent, atan2(y,x) ~= atan(y/x)
atanh inverse hyperbolic tangent
cbrt cube root
ceil ceiling
col cell column number
copysign copy sign of a number
cos cosine
cosh hyperbolic cosine
drand pseudo-random double, 0.0 <= drand() < 1.0
erf error function
erfc complementary error function
exp exponential
exp2 base-2 exponential
expm1 exponential minus 1, expm1(x) == exp(x) - 1
fabs absolute value
fdim positive difference
floor floor
fma floating-point multiply and add
fmax maximum of two values
fmin minimum of two values
fmod mod, x%y == fmod(x,y)
frexp extract fraction and exponent, {f,e} = frexp(x)
hypot Euclidean distance
ilogb extract exponent
irand pseudo-random integer, 0 <= irand(i) <= i-1
ldexp ldexp(x,e) produces x * (2**e)
lgamma log gamma function
llrint round to nearest integer
llround round to nearest integer
log natural logarithm
log10 base 10 logarithm
log1p logarithm of 1 plus argument, log1p(x) == log(1+x)
log2 base 2 logarithm
logb extract exponent
lrint round to nearest integer
lround round to nearest integer
modf extract fraction and integral parts, {f,i} = modf(x)
nearbyint round to nearest integer
nextafter nextafter(x,y) == next value following x in the direction of y
nexttoward nexttoward(x,y) == next value following x in the direction of y
nrand pseudo-random normal (Gaussian) -6.0 <= nrand() < 6.0
pow exponentiation, x**y == pow(x,y)
rand pseudo-random integer, 0 <= rand() <= RAND_MAX
remainder remainder(x,y) == remainder of dividing x by y
remquo remainder and part of quotient, {r,q} = remquo(x,y)
rint round to nearest integer
round round to nearest integer
row cell row number
scalbln scalbln(x,e) produces x * (FLT_RADIX**e)
scalbn scalbn(x,e) produces x * (FLT_RADIX**e)
sin sine
sinh hyperbolic sine
sqrt square root
tan tangent
tanh hyperbolic tangent
tgamma gamma function
time time in seconds since 00:00:00 UTC, January 1, 1970
trunc round to integer, towards zero
Range functions:
avg average of the defined cells
count number of cells defined
dot dot product (inner product) of two ranges
feval val=feval("type",cr,x), evaluate parameterized function
llsq {rank,cr}=llsq("type",xr,yr), linear least squares
majority non-zero if majority of defined cells are non-zero
max maximum of the defined cells
min minimum of the defined cells
prod product of the defined cells
search {xr}=search(f,x0[,dx[,x1...xN]]), search for minimum of f(xr)
stats {a,s,l,h}=stats(...), avg, stdev, min, and max of the defined cells
stdev standard deviation of the defined cells
sum sum of the defined cells
var variance of the defined cells
Commands:
byrows|bycols - set default direction
copy [byrows|bycols] dest_range src_range
debug [on|off|level]
eval [byrows|bycols] [range|symbols] [number_of_iterations]
exit
fill [byrows|bycols] range
fill [byrows|bycols] range start_expr, increment_expr
fill [byrows|bycols] range { expr_list }
fill [byrows|bycols] range "fmt", "start", increments...
format A0|RC|CR - formula printing format
format [cell|row|col|range|symbols] "fmt_string"
headers on|off
help - print list of operators, functions, commands and constants
help ["what"] - print help matching string
output "fname" - redirect output to a file
plot|plot2d|plot3d ["fname"] [byrows|bycols] [range]
print ["fname"] [byrows|bycols] [range] [all|constants|...
...|formats|formulas|functions|pointers|states|symbols|values]...
quit
reset [range|symbols] - set formulas to unevaluated state
srand expr - initialize the pseudo-random number generator
Constants:
HUGE_VAL = inf
DBL_EPSILON = 2.22045e-16
RAND_MAX = 2.14748e+09
.fi
.SH AUTHOR
Rick Perry, perry@misty.com