Wrox Programmer Forums
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old November 10th, 2005, 03:05 PM
Authorized User
Join Date: May 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Float precision

a float variable has a value of -3.4E38 to +3.4E38 with 6 digit precision. What does it mean to have 6 digit precision. Is this just the number of digits the compiler will display before it truncates the value i.e 3.465783??

Also what is the difference between single and double precision?

Reply With Quote
  #2 (permalink)  
Old November 10th, 2005, 09:53 PM
Authorized User
Join Date: Nov 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Paramesh

The precision determines the maximum number of digits that shall be output on express floating-point values, counting both the digits before and after the decimal point.

"Don't walk behind me; I may not lead.
 Don't walk in front of me; I may not follow.
 Just walk beside me and be my friend."
Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
possible loss of precision hobby Java Basics 7 September 19th, 2008 09:41 PM
Stored procedure decimal precision filipczako SQL Language 11 December 7th, 2005 04:21 PM
How to control the decimal point precision johnsonlim026 ASP.NET 1.0 and 1.1 Basics 0 August 7th, 2005 11:58 PM
Number precision problem adriant42 Excel VBA 2 June 28th, 2004 01:00 PM
Length vs precision in decimal datatype rvw SQL Server 2000 2 January 5th, 2004 12:36 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.