bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Is -M enabled by default?


From: Nelson H. F. Beebe
Subject: Re: [bug-gawk] Is -M enabled by default?
Date: Mon, 12 Feb 2018 17:34:30 -0700

>> But it is still better to have a direct way to show the type info of
>> variables used in awk instead of using this indirect way.

All awk implementations (awk, oawk, nawk, mawk, gawk, tawk, ...) use
the C type double for the awk number type.  For a long time (20+
years), that type was the ONLY floating-point type supported in the
awk language.

Thus, there never was any particular need for environmental enquiry to
find out more about the range and precision of that type (remember,
awk was intentionally designed to be a SIMPLE language: I can teach it
in a one-hour class.).

gawk has a special extension, enabled by the command-line -M (or
-bignum) option to replace the default arithmetic by calls to the MPFR
library that in turn calls the GMP library for arbitrary precision
binary floating-point arithmetic.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: address@hidden  -
- 155 S 1400 E RM 233                       address@hidden  address@hidden -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------


-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: address@hidden  -
- 155 S 1400 E RM 233                       address@hidden  address@hidden -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]