mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-22 00:35:15 +00:00
calc - arbitrary precision calculator. Version 2.9.3t6
From Jean-Marc Zucconi. Submitted by: jmz
This commit is contained in:
parent
578487c804
commit
6f4b8f047a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=162
8
math/calc/Makefile
Normal file
8
math/calc/Makefile
Normal file
@ -0,0 +1,8 @@
|
||||
DISTNAME= calc-2.9.3t6
|
||||
MASTER_SITES= ftp://ftp.cs.uni-sb.de/pub/misc/4.4BSD-Lite/contrib/
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
|
||||
pre-install:
|
||||
@mkdir /usr/local/lib
|
1
math/calc/pkg-comment
Normal file
1
math/calc/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
calc - arbitrary precision calculator. Version 2.9.3t6
|
53
math/calc/pkg-descr
Normal file
53
math/calc/pkg-descr
Normal file
@ -0,0 +1,53 @@
|
||||
Calc is an interactive calculator which provides for easy large
|
||||
numeric calculations, but which also can be easily programmed for
|
||||
difficult or long calculations. It can accept a command line
|
||||
argument, in which case it executes that single command and exits.
|
||||
Otherwise, it enters interactive mode. In this mode, it accepts
|
||||
commands one at a time, processes them, and displays the answers. In
|
||||
the simplest case, commands are simply expressions which are
|
||||
evaluated. For example, the following line can be input:
|
||||
|
||||
3 * (4 + 1)
|
||||
|
||||
and the calculator will print 15.
|
||||
|
||||
The special '.' symbol (called dot), represents the result of the last
|
||||
command expression, if any. This is of great use when a series of
|
||||
partial results are calculated, or when the output mode is changed and
|
||||
the last result needs to be redisplayed. For example, the above
|
||||
result can be doubled by typing:
|
||||
|
||||
. * 2
|
||||
|
||||
and the calculator will print 30.
|
||||
|
||||
For more complex calculations, variables can be used to save the
|
||||
intermediate results. For example, the result of adding 7 to the
|
||||
previous result can be saved by typing:
|
||||
|
||||
old = . + 7
|
||||
|
||||
Functions can be used in expressions. There are a great number of
|
||||
pre-defined functions. For example, the following will calculate the
|
||||
factorial of the value of 'old':
|
||||
|
||||
fact(old)
|
||||
|
||||
and the calculator prints 13763753091226345046315979581580902400000000.
|
||||
Notice that numbers can be very large. (There is a practical limit
|
||||
of several thousand digits before calculations become too slow.)
|
||||
|
||||
The calculator can calculate transcendental functions, and accept and
|
||||
display numbers in real or exponential format. For example, typing:
|
||||
|
||||
config("display", 50)
|
||||
epsilon(1e-50)
|
||||
sin(1)
|
||||
|
||||
prints "~.84147098480789650665250232163029899962256306079837".
|
||||
|
||||
The calculator also knows about complex numbers, so that typing:
|
||||
|
||||
(2+3i) * (4-3i)
|
||||
|
||||
prints "17+6i".
|
77
math/calc/pkg-plist
Normal file
77
math/calc/pkg-plist
Normal file
@ -0,0 +1,77 @@
|
||||
@cd /usr/local
|
||||
@owner bin
|
||||
@mode 555
|
||||
bin/calc
|
||||
@mode 444
|
||||
lib/calc/help/intro
|
||||
lib/calc/help/overview
|
||||
lib/calc/help/help
|
||||
lib/calc/help/assoc
|
||||
lib/calc/help/builtin
|
||||
lib/calc/help/command
|
||||
lib/calc/help/config
|
||||
lib/calc/help/define
|
||||
lib/calc/help/environment
|
||||
lib/calc/help/expression
|
||||
lib/calc/help/file
|
||||
lib/calc/help/history
|
||||
lib/calc/help/interrupt
|
||||
lib/calc/help/list
|
||||
lib/calc/help/mat
|
||||
lib/calc/help/operator
|
||||
lib/calc/help/statement
|
||||
lib/calc/help/types
|
||||
lib/calc/help/usage
|
||||
lib/calc/help/variable
|
||||
lib/calc/help/todo
|
||||
lib/calc/help/credit
|
||||
lib/calc/help/bindings
|
||||
lib/calc/help/altbind
|
||||
lib/calc/help/changes
|
||||
lib/calc/help/libcalc
|
||||
lib/calc/help/stdlib
|
||||
lib/calc/help/bugs
|
||||
lib/calc/help/full
|
||||
lib/calc/help/obj
|
||||
lib/calc/README
|
||||
lib/calc/bigprime.cal
|
||||
lib/calc/chrem.cal
|
||||
lib/calc/cryrand.cal
|
||||
lib/calc/deg.cal
|
||||
lib/calc/ellip.cal
|
||||
lib/calc/lucas.cal
|
||||
lib/calc/lucas_chk.cal
|
||||
lib/calc/lucas_tbl.cal
|
||||
lib/calc/mersenne.cal
|
||||
lib/calc/mod.cal
|
||||
lib/calc/nextprim.cal
|
||||
lib/calc/nextprime.cal
|
||||
lib/calc/pell.cal
|
||||
lib/calc/pi.cal
|
||||
lib/calc/pollard.cal
|
||||
lib/calc/poly.cal
|
||||
lib/calc/psqrt.cal
|
||||
lib/calc/quat.cal
|
||||
lib/calc/randmprime.cal
|
||||
lib/calc/regress.cal
|
||||
lib/calc/solve.cal
|
||||
lib/calc/sumsq.cal
|
||||
lib/calc/surd.cal
|
||||
lib/calc/test1000.cal
|
||||
lib/calc/unitfrac.cal
|
||||
lib/calc/varargs.cal
|
||||
@mode 644
|
||||
lib/calc/libcalc.a
|
||||
@mode 444
|
||||
lib/calc/alloc.h
|
||||
lib/calc/args.h
|
||||
lib/calc/cmath.h
|
||||
lib/calc/endian.h
|
||||
lib/calc/have_malloc.h
|
||||
lib/calc/have_stdlib.h
|
||||
lib/calc/have_string.h
|
||||
lib/calc/longbits.h
|
||||
lib/calc/qmath.h
|
||||
lib/calc/stdarg.h
|
||||
lib/calc/zmath.h
|
||||
man/man1/calc.1
|
12
math/calc/scripts/configure
vendored
Normal file
12
math/calc/scripts/configure
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# != 3 ]; then exit 1; fi
|
||||
|
||||
F=$3/Makefile
|
||||
|
||||
chmod +w $F || exit 1;
|
||||
|
||||
echo "BINDIR= /usr/local/bin" >> $F || exit 1;
|
||||
echo "TOPDIR= /usr/local/lib" >> $F
|
||||
echo "MANDIR=/usr/local/man/man1" >> $F
|
||||
echo "CCOPT= -Wall -Wno-implicit -Wno-comment" >> $F
|
Loading…
Reference in New Issue
Block a user