0 Replies Latest reply on Nov 6, 2007 1:59 AM by Haravikk the Horse

    Longs/large integers in Flex

    Haravikk the Horse
      Hi there,

      As some may have seen in my other thread I'm working on porting a binary XML format over to Flex. Now, one of the advantages of this is that it can send useful data-formats as raw bytes, which in the case of large numbers significantly reduces the data that needs to be sent (sending it as a string is very wasteful). Anyway, some of the data-types it sends are:
      - Longs (64-bit integers), though not a formal part of the XML specification, they are useful for dates:
      - Dates (long measuring nanoseconds since the unix epoch), very compact way to send dates
      - Big integers, essentially an infinite length binary number, requires at least N operations to calculate additions, subtractions etc. where N is the byte-count of the number. Very useful for calculating huge numbers accurately (without using floats, doubles etc.)
      - Big floats, basically the same as a regular float, except that the mantissa (numeric part) is a regular 32-bit integer, while the exponent (power) is a big integer (as above). Thus it can represent massive floating point numbers, at the cost of computational speed.

      What I'm wondering is if there are any downloadable libraries that provide any of the functionality above, or if I will have to write it myself? I'm a supporter of open-source, so will release my code if I do have to; once I'm satisfied that it works correctly.

      The above are all very useful in Java.