• 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
Re: Big integers exported in scientific notation in XML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Big integers exported in scientific notation in XML


  • Subject: Re: Big integers exported in scientific notation in XML
  • From: Marshall Eubanks <email@hidden>
  • Date: Wed, 2 Sep 2009 21:03:21 -0400


On Sep 2, 2009, at 8:29 PM, Bruce Sharpe wrote:

I have just discovered that if a project contains a clip that has more than a million frames (4.6 hours at 60 fps would do it), then numbers like duration, in, out, etc. will be exported in the XML in scientific notation.

Example:
  Expected value: <duration>1234567</duration>
  Exported value: <duration>1.23457e+06</duration>

Aside from the fact that it messes up everyone who is expecting an integer there is a loss of precision. The difference between 1234567 and 1234570 frames could be important in some contexts.

Is this a known bug?

Single precision has 24 bits of precision, or about 6 x 10^-8 fractionally. So, that would be 0.07 for your example, and should be marginally OK. However, in dealing with Julian Dates (about 2,500,000 days since the initial epoch, or an error of 0.15) we found that this is dangerous. With even a little bit of manipulation (subtract this value from that, and add to a third), you run the risk of being off by a day (or, in this case, a frame).


So, in my opinion, these really should be double precision if they are going to be real numbers.

Regards
Marshall



Bruce _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Big integers exported in scientific notation in XML
      • From: Bruce Sharpe <email@hidden>
References: 
 >Big integers exported in scientific notation in XML (From: Bruce Sharpe <email@hidden>)

  • Prev by Date: Re: Big integers exported in scientific notation in XML
  • Next by Date: Re: Big integers exported in scientific notation in XML
  • Previous by thread: Re: Big integers exported in scientific notation in XML
  • Next by thread: Re: Big integers exported in scientific notation in XML
  • Index(es):
    • Date
    • Thread