• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
15 decimal C type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

15 decimal C type


  • Subject: 15 decimal C type
  • From: Jeshua Lacock <email@hidden>
  • Date: Sun, 8 Jan 2006 17:21:12 -0700



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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: 15 decimal C type
      • From: Shawn Erickson <email@hidden>
  • Prev by Date: IONotificationPortRef cleanup
  • Next by Date: Re: 15 decimal C type
  • Previous by thread: Re: IONotificationPortRef cleanup
  • Next by thread: Re: 15 decimal C type
  • Index(es):
    • Date
    • Thread