Float Precision with PROC*C

From: Philippe Aubert <paubert_at_tdsb-s.mais.hydro.qc.ca>
Date: Wed, 6 Apr 1994 17:32:35 GMT
Message-ID: <CnuM2B.Mzp_at_ireq.hydro.qc.ca>


        We have an Oracle table (Oracle 6.0.33) which contains a column like this :

                NB_POINTS NUMBER(6,3)         In a PRO*C program, we declared a FLOAT variable to receive the contents of the column NB_POINTS.

        When we have 0.100 in the Oracle table, we received 0.09999994039535.. when we use a printf("%f",nb_points);         

        We don't want to use an external format because we make calculation with this variable.                 

	Is someone Aware of this problem ?
	How could we solve it, without "playing with the external format"?

		Thank you to give me a quick answer.

				Philippe AUBERT
Received on Wed Apr 06 1994 - 19:32:35 CEST

Original text of this message