C++ for the heck of it
if you have no idea what C++ i'd suggest you ignore this completely.
Code:
MyString.substr((MyDouble>0)?(log10(MyDouble)>0?MyInt+1:2):(log10(fabs(MyDouble))>0?ceil(log10(fabs(MyDouble)))+2:3),MyString.length());
I'm just going to use this thread to keep this bit of code and to inspire and horrify.
Given MyString being a converted double called MyDouble, this substring will get what is after the decimal point. Unless the number is exactly 0. In which case, wtf are you doing?
*disclaimer* yeah i know just use string manipulation, this is meant to be unnecessarily complex and/or arduous
so for the love of god, if you're writing in C++, NEVER use this
also, this is going in general discussion because there isn't a forum for vauge or general coding (not that there's a need for one, either)
A programming genius called HEAP
Had trouble in getting to sleep
So he made his lambs troup
through a huge FOR-NEXT loop
FOR 1 TO 10000: NEXT sheep.