Charles Steinkuehler wrote: > > > > 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...
Oooo, I forgot the ``cost'' of adding [m]awk . . . Does ash support arrays? I think that you're going to need it . . . -- Best Regards, mds mds resource 888.250.3987 Dare to fix things before they break . . . Our capacity for understanding is inversely proportional to how much we think we know. The more I know, the more I know I don't know . . . _______________________________________________ Leaf-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user
