Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

15 decimal C type





Greetings,

I am parsing some numbers with 15 decimal places, with:

fscanf(inf,"%lf,%lf", &xCor, &yCor);


with the input numbers:

569850.000000500003807,4900023.634829379618168


become rounded when output with:

fprintf (outf, "%lf,%lf\n", xCor, yCor);

to:

569850.000001,4900023.634829


I thought that I would want to use the "long double" ctype, but it apparently only supports 6 decimals? Or is fprintf doing the rounding?


Can anyone recommend a "C type" for 15 decimals on Darwin? I certainly would appreciate it!



Thanks,

Jeshua Lacock ___________________________
Programmer/Owner		Phone:	877.240.1364
http://OpenOSX.com		Fax:		415.462.6211
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.