drago77 0 Posted December 21, 2017 Report Share Posted December 21, 2017 Hello, i am working on a cryptocurrency trading calculator, and because the tradings are based on bitcoin it has to manipulate 8 decimal numbers ex: 0.00000222The problem is that when the bot is doing some math calculations it converts this numbers to exponential numbers and then does not recognize them as numbers anymore but as strings. How can i stop the bot transform the numbers from decimal to exponential ex:0.00000222 to 2.22E-06 Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted December 21, 2017 Report Share Posted December 21, 2017 Hi,Not sure how you are using your calculations but you can try and use Python/Ironpython as they are a scientific calculator too. Regards,CD Quote Link to post Share on other sites
drago77 0 Posted December 21, 2017 Author Report Share Posted December 21, 2017 Hi, Not sure how you are using your calculations but you can try and use Python/Ironpython as they are a scientific calculator too. Regards, CD Unfortunately i don't know python... Quote Link to post Share on other sites
bestmacros 60 Posted January 8, 2018 Report Share Posted January 8, 2018 I've encountered same issue when building free bitcoin bot and I've found the solution by using javascript toFixed() method here is example: set(#current bet,0.00000001,"Global") set(#current bet,$eval("{#current bet}*2"),"Global") set(#current bet,$eval("var x={#current bet}; x=x.toFixed(8); x;"),"Global")have fun! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.