|
Mario123
|
 |
February 21, 2014, 11:29:54 AM |
|
Just adding.
James - you do understand that 0.1 and 0.01 *cannot be represented in binary floating point* don't you (no matter how many bits you have)? If you care to *read* what I linked for you the problems can (and will) occur even when you are just doing simple operations. Anyway - you have been warned but clearly are not interested in *learning* anything about serious software engineering so I give up and would recommend *no-one* to consider your software as anything other than a prototype. I learned that in school 
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1126
Ian Knowles - CIYAM Lead Developer
|
 |
February 21, 2014, 11:30:13 AM Last edit: February 21, 2014, 11:45:20 AM by CIYAM Open |
|
The infinitesimal rears its ugly head. This is why when I am doing comparisons, I usually have a SMALLVAL set to .0000000001 or something like that and adjust the comparisons.
You could use an "epsilon" for comparisons but it is simply too easy for someone to code: if( a == 0 ) or if( a != 0 ) isn't it? Also I just showed (1) of the main problems (arguably probably about the nastiest surprise) but there are *others*. Again - you have been warned - this is not a "dust" issue - it will end up being a "logic issue" and I would bet that at some point you are going to unexpectedly end up with negative balances.
|
|
|
|
abctc
Legendary
Offline
Activity: 1820
Merit: 1040
|
 |
February 21, 2014, 11:32:26 AM |
|
.. Forget this coin.
Magis quam Moneta (More than a Coin)
|
██████████████████████████████████████████████████ ████████████████████████████████████████████████████ ██████████████████████████████████████████████████████ ████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████████ | , the Next platform. Magis quam Moneta (More than a Coin) |
|
|
|
l8orre
Legendary
Offline
Activity: 1187
Merit: 1019
|
 |
February 21, 2014, 11:34:40 AM |
|
The infinitesimal rears its ugly head. This is why when I am doing comparisons, I usually have a SMALLVAL set to .0000000001 or something like that and adjust the comparisons.
You could use an "epsilon" for comparisons but it is simply too easy for someone to code: if( a == 0 ) or if( a != 0 ) isn't it? Also I just showed (1) of the main problems (arguably probably about the nastiest surprise) but there are *others*. Again - you have been warned - this is not a "dust" issue - it will end up being a "logic issue" and I would be at some point you are going to unexpectedly end up with negative balances. I concur. This is not 'compuational dust' , it is an in-built point of failure. Let me emphasize: I have seen $hit like that happen in the real world, because somebody did not want to believe that this might create problems!
|
|
|
|
|
|
Eadeqa
|
 |
February 21, 2014, 11:43:20 AM |
|
There is lack of support for people that want to use and implement NXT, that way we miss opportunities.
Apparently implementing NXT is not that straight forward, look at cryptsy, mintpal, atomic-trader, etc… none of them succeed without any help to implement NXT.
We cannot expect mass adoption if above persist, and nobody steps forward to either make some kind of procedure or help people out.
Another remark is that I have the impression interest in NXT is decreasing in favor of new alt-coins/clones.
How can we reestablish interest in NXT?
Collected some info here, thought maybe could help some exchanges to implement Nxt. https://docs.google.com/document/d/1ch1PoWcKEptFziXlrm92TG_BHm0hG9llKBs2LH29N-4/pub let me know if anything is missing or need correction... Someone with better writing skills should edit that before it can be presented to "exchanges"
|
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
 |
February 21, 2014, 11:45:40 AM |
|
The infinitesimal rears its ugly head. This is why when I am doing comparisons, I usually have a SMALLVAL set to .0000000001 or something like that and adjust the comparisons.
You could use an "epsilon" for comparisons but it is simply too easy for someone to code: if( a == 0 ) or if( a != 0 ) isn't it? Also I just showed (1) of the main problems (arguably probably about the nastiest surprise) but there are *others*. Again - you have been warned - this is not a "dust" issue - it will end up being a "logic issue" and I would be at some point you are going to unexpectedly end up with negative balances. I am pretty careful with comparisons, but since other people will be modifying the source, I will convert to 64bit ints. However, would it be ok if I got it somewhat functional before doing that? To use ints universally, I need to come up with a scaling factor unique to each crypto. I was hoping for a portable multi crypto gateway... for BTC, I could just convert to satoshis and do arithmetic on that couldn't I? All I need are add and subtract, can I just use longs or do I need to use a special library? James
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1126
Ian Knowles - CIYAM Lead Developer
|
 |
February 21, 2014, 11:49:43 AM |
|
for BTC, I could just convert to satoshis and do arithmetic on that couldn't I? All I need are add and subtract, can I just use longs or do I need to use a special library?
You just need to use an int64_t and consider everything to be in "satoshis" if you are only doing basic operations (the class I wrote is to allow for more complicated operations). For NXT amounts also just treat the values as NXT cents (although you may as well also allow for further possible decimal values) and use an int64_t again.
|
|
|
|
|
fmiboy
|
 |
February 21, 2014, 11:51:57 AM |
|
There is lack of support for people that want to use and implement NXT, that way we miss opportunities.
Apparently implementing NXT is not that straight forward, look at cryptsy, mintpal, atomic-trader, etc… none of them succeed without any help to implement NXT.
We cannot expect mass adoption if above persist, and nobody steps forward to either make some kind of procedure or help people out.
Another remark is that I have the impression interest in NXT is decreasing in favor of new alt-coins/clones.
How can we reestablish interest in NXT?
Collected some info here, thought maybe could help some exchanges to implement Nxt. https://docs.google.com/document/d/1ch1PoWcKEptFziXlrm92TG_BHm0hG9llKBs2LH29N-4let me know if anything is missing or need correction... Someone with better writing skills should edit that before it can be presented to "exchanges" tried to make it easier, please PM me if you would like to edit. Added support for comment, please comment changes!
|
|
|
|
|
|
Eadeqa
|
 |
February 21, 2014, 11:57:41 AM |
|
There is lack of support for people that want to use and implement NXT, that way we miss opportunities.
Apparently implementing NXT is not that straight forward, look at cryptsy, mintpal, atomic-trader, etc… none of them succeed without any help to implement NXT.
We cannot expect mass adoption if above persist, and nobody steps forward to either make some kind of procedure or help people out.
Another remark is that I have the impression interest in NXT is decreasing in favor of new alt-coins/clones.
How can we reestablish interest in NXT?
Collected some info here, thought maybe could help some exchanges to implement Nxt. https://docs.google.com/document/d/1ch1PoWcKEptFziXlrm92TG_BHm0hG9llKBs2LH29N-4let me know if anything is missing or need correction... Someone with better writing skills should edit that before it can be presented to "exchanges" tried to make it easier, please PM me if you would like to edit. Added support for comment, please comment changes! You should just post it to wiki. Then anyone can proofread it.
|
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
 |
February 21, 2014, 12:10:53 PM |
|
for BTC, I could just convert to satoshis and do arithmetic on that couldn't I? All I need are add and subtract, can I just use longs or do I need to use a special library?
You just need to use an int64_t and consider everything to be in "satoshis" if you are only doing basic operations (the class I wrote is to allow for more complicated operations). For NXT amounts also just treat the values as NXT cents (although you may as well also allow for further possible decimal values) and use an int64_t again. OK, that's easy enough. Its strange the gateway is actually never dealing in NXT. It does have issue and redemption of asset, which is in NXT cents though. Do you know how we will go from NXT cents to more precision later? I guess I could just multiply by a million and it becomes NXTtoshis.
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1126
Ian Knowles - CIYAM Lead Developer
|
 |
February 21, 2014, 12:15:01 PM |
|
OK, that's easy enough.
Glad you have decided to change it. Its strange the gateway is actually never dealing in NXT. It does have issue and redemption of asset, which is in NXT cents though. Do you know how we will go from NXT cents to more precision later? I guess I could just multiply by a million and it becomes NXTtoshis.
It makes sense to use NXTtoshis and then convert them back to NXTcents for API calls (that way all your numbers will be at the same scale).
|
|
|
|
gimre
Legendary
Offline
Activity: 866
Merit: 1002
|
 |
February 21, 2014, 12:19:53 PM |
|
James, these are actually basics, that students are learned on Numerical Analysis... Any currency related computations should be made using fixed point math I'm glad CIYAM finally convinced you, that you should use integer based math... CIYAM, I'm really amazed by your patience.
|
|
|
|
|
|
verymuchso
Sr. Member
  
Offline
Activity: 421
Merit: 250
HEAT Ledger
|
 |
February 21, 2014, 12:21:14 PM |
|
Could someone please tell me what is the valid (possible) range of NXT account numbers? It seems you can make transactions to account number 1 for instance but what is the chance of someone actually selecting a private key that translates to an account number of 1, or is this not possible at all?
Thank you.
|
|
|
|
|
fmiboy
|
 |
February 21, 2014, 12:28:47 PM |
|
Downloaded the Nxt client a month ago. That java code thing just pissed me off. Why cant you make a simple setup icon ? No matter the technical progress if your client cant even be installed. Main problem of this coin and 95% of the altcoins out there is that the developpers just do not have any sense of communication.
why don't you give Clienxt a try?! https://bitbucket.org/fmiboy/clienxt/downloadsdownload, unzip, double click Clienxt.jar. You can check latest Nxt release from About->Check updates Nxt and it will download, unzip for you. Then go to Console in GUI and right click your mouse to "Re-start server" and you are good to go! edit: by default it will use Testnet!
|
|
|
|
|
pinarello
Full Member
 
Offline
Activity: 266
Merit: 100
NXT is the future
|
 |
February 21, 2014, 12:29:22 PM |
|
Downloaded the Nxt client a month ago. That java code thing just pissed me off. Why cant you make a simple setup icon ? No matter the technical progress if your client cant even be installed. Main problem of this coin and 95% of the altcoins out there is that the developpers just do not have any sense of communication.
https://nextcoin.org/index.php/topic,1902.0.html
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1126
Ian Knowles - CIYAM Lead Developer
|
 |
February 21, 2014, 12:30:12 PM |
|
CIYAM, I'm really amazed by your patience.
When you've traversed the depths of thousands of lines of code in order to find a bug that is as simple as an incorrect comma (and taken literally days to do so) then you will either have learned to be very patient with some things or you will have decided that computer programming is not for you.
|
|
|
|
|
chanc3r
|
 |
February 21, 2014, 12:31:43 PM |
|
.. Forget this coin.
Magis quam Moneta (More than a Coin)*Edit: Forget this coinMode. Who???
|
|
|
|
|
fmiboy
|
 |
February 21, 2014, 12:34:38 PM |
|
|
|
|
|
|
pinarello
Full Member
 
Offline
Activity: 266
Merit: 100
NXT is the future
|
 |
February 21, 2014, 12:46:45 PM |
|
|
|
|
|
|