arithmetic
The [[awk]] programming language provides a set of [[dyadic]] arithmetic operators for performing basic . . . arithmetic on [[integer]] and [[floating point]] values. . . .
1K - last updated 2011-05-24 22:16 UTC by markhobley
arithmetic operator
{{delete}} . . .
1K - last updated 2011-05-24 22:18 UTC by markhobley
AwkDc
This is an awk implementation of the [http://www.gnu.org/software/bc/manual/dc-1.05/html_mono/dc.html|dc] . . . Most notably missing is the arbitrary precision arithmetic, which is being developed in a separate . . . 2^52); # integration of the arbitrary-precision arithmetic library; # a bc-to-dc compiler written in . . . stk[i]) sub(/^\n+/, "", buf) print buf } # -- arithmetic function _dc_add(stk, tos1, tos2) { showop("add") . . . } else if (op == "f") { _dc_show(stk) # arithmetic - complete } else if (op == "+") { _dc_add(stk) . . .
12K - last updated 2008-07-17 14:47 UTC by gnomon
AwkGuide
** Work in Progress ** {{{ import from Mark Hobley's wiki }}} <toc> ---- == Overview * [[Overview]] . . . World in awk]] == How to awk * [[action]]s * [[arithmetic]] * [[command line parameter|ARGC]] * [[command . . .
4K - last updated 2011-08-14 15:57 UTC by markhobley
compound assignment operator
The *compound assignment operators* (also called *combination assignment operators*) provide a more concise . . . + 3 $value /= 3; # $value = $value / 3 }}} === Arithmetic === | += | [[addition]] | !-= | [[subtraction]] . . .
2K - last updated 2011-03-27 09:46 UTC by markhobley
exponent
==Warning! The use of [[gawkism]]s will prevent the script from running correctly on systems that use . . . implementations do not provide an exponent [[arithmetic]] operator. The [[doublestar]] symbol used . . . here for [[arithmetic]] exponential operations is a [[gawkism]] . . . has a higher [[precedence]] than all other [[arithmetic]] operators: {{{awk print (2 * 4 ** 3) # . . .
2K - last updated 2012-03-20 07:33 UTC by g0pher
GeneralizedTextReplacement
Some times people need to recode in awk something they were previously doing with sed or another tool. . . . or do some complex operations - including arithmetic - on the text to be replaced). The idea . . . text # rep[i] = sprintf("%05d", mtch[i]*4) # arithmetic (like perl) # rep[i] = mtch[i]; gsub(/foo/, . . .
6K - last updated 2009-03-26 20:38 UTC by waldner
LargestAccurateNumber
Most [[awk]] implementations use floating point double precision to represent every kind of numeric value. . . . shell out to dc or bc for arbitrary precision arithmetic? The easiest way to investigate loss of . . .
3K - last updated 2013-04-12 14:52 UTC by ttmrichter
modulus
The [[dyadic]] modulus [[operator]], represented by a [[percent]] sign is used to return the remainder . . . in division [[arithmetic]]: print 15 % 4 # 3 (the remainder of 15 . . .
1K - last updated 2011-06-07 00:41 UTC by markhobley
operator
The [[awk]] programming language provides a series of *operators* that allow [[value]]s and [[variable]]s . . . [[variable]] named by the left [[operand]]. == arithmetic operators * [[arithmetic]] operators The . . . language provides a standard set of [[arithmetic]] operators for manipulating [[integer]] . . .
3K - last updated 2011-05-24 22:19 UTC by markhobley
Overview
= Overview of awk = == The primarily purpose of awk is to processing textual data to produce formatted . . . and conditional [[branch]]es, and enables [[arithmetic]] and [[string]] operations to be performed. . . .
4K - last updated 2011-05-23 23:09 UTC by markhobley
11 pages found.