> > Anyone know of an extended-precision shell-script math library before I go > > off and write one? > > After years and years of Perl programming, I've recently returned to my > roots: awk, sed and shell. > > I often use sed in shell scripting, because it gives me better control > over regexp's than grep. O, how quickly I forgot the power of awk! > > ``... all numeric values are represented within awk in double-precision > floating point.'' > > O boy, is that sucker fast -- compared to myriads of calls to sed! It > may take a different way of looking at your math problems; but, > especially with awk's powerful matrix handling, I suggest -- strongly -- > that you consider awk for this job. I vaguely remember a ksh extended > precision math library; but, that url no longer functions. And, [b]ash > is *not* ksh! No matter what math routines you find or develop, I > seriously doubt that you will compete with the already compiled speed of > awk . . .
I would love to use something off the shelf like awk, or even dc, but I don't really want to add another 25K (dc) to 100K (mawk) binary just to do some simple addition and subtraction on byte/packet counts, since I think a lot of folks running on floppy would still like to use this, and most floppy installs are pretty pressed for size... Charles Steinkuehler http://lrp.steinkuehler.net http://c0wz.steinkuehler.net (lrp.c0wz.com mirror) _______________________________________________ Leaf-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user
