Path: utzoo!attcan!uunet!husc6!bbn!rochester!pt.cs.cmu.edu!cadre!pitt!darth!investor!rbp
From: rbp@investor.UUCP (Bob Peirce)
Newsgroups: comp.databases
Subject: Re: INFORMIX reportwriter help!
Message-ID: <992@investor.UUCP>
Date: 11 Jul 88 01:53:42 GMT
References: <329@marob.MASA.COM>
Organization: Cookson, Peirce & Co., Pittsburgh, PA
Lines: 19

> 
> Using INFORMIX and its ACE ReportWriter package I am trying to print reports
> which contain floating point values with from 1 to 4 decimal places (e.g. 1.2,
> 1.23, 1.234 or 1.2345). It seems no matter what print picture I use, numbers
> which do not resolve to 4 decimal places are rounded down instead of filled
> with zeros (e.g. 1.5 prints as 1.4999 instead of 1.5000).
> 
> Any suggestions on a means of accurately printing a less-than-4 decimal
> place value in a 4-decimal-place picture would be much appreciated.
> 
You don't say which release you are using, but the one we have on our
Altos 68000, called as acego, round up, while the one we have on our altos
3068, called by sacego, truncates.  On the latter, we just add 0.00005
for positive numbers and subtract 0.00005 for negative numbers.  This
adds a lot more code but allows you to handle it the way you want.
-- 
Bob Peirce, Pittsburgh, PA				 412-471-5320
uucp: ...!{allegra, bellcore, cadre, idis, psuvax1}!pitt!investor!rbp
	    NOTE:  Mail must be < 30K  bytes/message