bc
GCC Consulting
gccconsulting at comcast.net
Fri Jan 20 05:42:56 PST 2006
> -----Original Message-----
> From:
> filepro-list-bounces+gccconsulting=comcast.net at lists.celestial
> .com
> [mailto:filepro-list-bounces+gccconsulting=comcast.net at lists.c
> elestial.com] On Behalf Of John Esak
> Sent: Friday, January 20, 2006 8:08 AM
> To: Fplist (E-mail)
> Subject: OT: bc
>
> Does anyone know how to set "bc" to calculate the same way
> filePro does.
> With respoect to rounding that is.
>
> filePro will give 15.36 as the value for:
>
> aa(10,.2)="102.39" * ".15"
>
> and no matter what I do, bc gives 15.35 to the same
> mulitplication. I've set precision equal to 2, 4, 9, doesn't
> matter. If the precision goes up, it just goes up without
> rounding. If it goes lower down to 2, it truncates. Any way
> to have it not truncate but round?
>
> I like to check figures in filePro with bc and it's
> impossible. I've scanned the man page, of course, but didn't
> see anything about rounding.
>
> John
Using an old fashioned calculator have a 4 place decimal, it show the answer
as 15.3585. It appears that fp is yielding the proper rounded answer 15.36.
At least based on what I was taught back in elementary school (which
according to my wife was "in the year of the flood" :)).
Richard Kreiss
GCC Consulting
More information about the Filepro-list
mailing list