Re: Float Precision with PROC*C

From: Randy Bradley <bradley_at_marcvm.marc.usda.gov>
Date: Sat, 16 Apr 94 14:35:32 GMT
Message-ID: <bradley.1116894572B_at_map>


In Article <CnuM2B.Mzp_at_ireq.hydro.qc.ca>, paubert_at_tdsb-s.mais.hydro.qc.ca (Philippe Aubert) wrote:
> When we have 0.100 in the Oracle table, we received 0.09999994039535..
>when we use a printf("%f",nb_points);
>

How about: printf("%.3f",nb_points) or use whatever precision you want to print out.

Time stands still for no man... Neither do my children.



Randy Bradley. Systems Analyst. US Meat Animal Research Center, PO Box 166, Clay Center, NE 68933-0166 Received on Sat Apr 16 1994 - 16:35:32 CEST

Original text of this message