4 ms·
I registered for this and got 5,000.999999 Stellars. Kinda curious about the 0.999999 part...
by GregorStocks 12y ago
I registered for this and got 5,000.999999 Stellars. Kinda curious about the 0.999999 part...
- Walkman 12y agoThe values are probably stored in float, which is ridiculous.
- hackerweb 12y agoThis confused me as well. Stellars are stored in fixed point, as millionths of a stellar. But there's a tiny anti-spam fee for each payment transaction, so if you've sent money somewhere you may find an extra 0.000010 gone.
- jonny_eh 12y agoA better way to phrase what you just did: Maybe the values are stored as a float? But that would be silly, so there must be a better reason.
- mingabunga 12y agoFrom FAQs: To prevent spam, each transaction burns 10 microstellars (that is, 0.00001 stellars).
- hyperliner 12y agoJust for fun: http://stackoverflow.com/questions/2100490/floating-point-inaccuracy-examples http://stackoverflow.com/questions/2100490/floating-point-in...
- hyperliner 12y agoMaybe they are doing floating point math in Javascript! :-) (which would be silly, so there must be another reason! :-)
- papp 12y agoFrom the FAQ: > To prevent spam, each transaction burns 10 microstellars (that is, 0.00001 stellars). They must have been transferring +1 Stellar to cover the transaction fee. An 5k balance looks better than 4999.