[PLUG] Unexpected math result

Rich Shepard rshepard at appl-ecosys.com
Wed Dec 21 21:38:39 UTC 2011


On Wed, 21 Dec 2011, Richard C. Steffens wrote:

> Back in the late '70s and early '80s I wrote programs for small businesses
> with a version of Turbo Pascal that used binary coded decimal for math.
> What languages use that, or something giving non-floating point results
> these days?

Dick,

   PostgreSQL's SQL used to have a 'monetary' type that was deprecated in
favor of numeric. The latter is specified with total number of significant
digits and the number of fractional digits. For example, numeric(10,2) would
specify 1000000.00 to 9999999.99. (Formatting in the usual monetary way is
up to the UI while the numbers are exact.)

Rich



More information about the PLUG mailing list