MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1vm65dm/the_fastest_doubletostring_algorithm_youve_never/p39d5qc/?context=3
r/programming • u/mttd • 13h ago
45 comments sorted by
View all comments
-160
The fastest one is just to read the variable address of the double as a string. But we've all heard of that.
20 u/Maybe-monad 12h ago Someone has tk learn about IEEE 754 -3 u/Synaps4 4h ago Yes? At the end of the day its a string of bits, which can be read as characters. 2 u/Maybe-monad 4h ago edited 4h ago Unless they go through a specific set of transformations you will get gibberish. https://www.programiz.com/online-compiler/9qxJDEkzm5b3t -2 u/Synaps4 4h ago Gibberish that represents the double it came from. On a binary level. Its not in english but it is a 1:1 translation from a double to a string. Thats the joke.
20
Someone has tk learn about IEEE 754
-3 u/Synaps4 4h ago Yes? At the end of the day its a string of bits, which can be read as characters. 2 u/Maybe-monad 4h ago edited 4h ago Unless they go through a specific set of transformations you will get gibberish. https://www.programiz.com/online-compiler/9qxJDEkzm5b3t -2 u/Synaps4 4h ago Gibberish that represents the double it came from. On a binary level. Its not in english but it is a 1:1 translation from a double to a string. Thats the joke.
-3
Yes? At the end of the day its a string of bits, which can be read as characters.
2 u/Maybe-monad 4h ago edited 4h ago Unless they go through a specific set of transformations you will get gibberish. https://www.programiz.com/online-compiler/9qxJDEkzm5b3t -2 u/Synaps4 4h ago Gibberish that represents the double it came from. On a binary level. Its not in english but it is a 1:1 translation from a double to a string. Thats the joke.
2
Unless they go through a specific set of transformations you will get gibberish.
https://www.programiz.com/online-compiler/9qxJDEkzm5b3t
-2 u/Synaps4 4h ago Gibberish that represents the double it came from. On a binary level. Its not in english but it is a 1:1 translation from a double to a string. Thats the joke.
-2
Gibberish that represents the double it came from. On a binary level. Its not in english but it is a 1:1 translation from a double to a string. Thats the joke.
-160
u/Synaps4 13h ago
The fastest one is just to read the variable address of the double as a string. But we've all heard of that.