6 ms·
Other than printing out the numbers, what are the practical applications?
by tgtweak 8y ago
Other than printing out the numbers, what are the practical applications?
- Veedrac 8y agoJavascript was mentioned in the talk; because of its weak typing and plenty of APIs that take strings, floating point printing is pretty common.
- ris 8y agoThat's really sad.
- TheRealPomax 8y agoWhy? Did you forget to read the implied "just like any other language that's being used in a graphical context, where live numbers need to be shown"?
- 11235813213455 8y agolack of 64bit integer maybe you mean, but all languages need (de)serializations so this problem is very common
- amelius 8y agoOften, numbers in JS happen to be just integers. Would the implementation optimize for that case?
- RayDonnelly 8y agoPrinting them out quickly?
- herodotus 8y agoReal-time displays often need to show floating point numbers as they change. As a simple example, the time remaining display of a music player ticks down as the music plays. Now in this case, it is easy to fake it by using integers and then placing the decimal point, but if you were controlling something complex in real time you might not be able to do this as easily.
- wongarsu 8y ago> it is easy to fake it by using integers and then placing the decimal point That's not "faking it", that using fixed point numbers [1]. They are a great alternative if the numbers stay in roughly the same magnitude, and are much saner when dealing with e.g. money. 1: https://en.wikipedia.org/wiki/Fixed-point_arithmetic https://en.wikipedia.org/wiki/Fixed-point_arithmetic
- herodotus 8y agoGood point, and thanks. But if you are doing a real-time display (like an industrial controller, for example), you may not be able to choose a fixed point number as your source. I chose the music time example first because it is a common use of a number that needs to change in (almost) real time.
- Kranar 8y agoCross platform serialization.
- cryptonector 8y agoI mean, that's a huge practical application!
- andromaton 8y agoWeb apis. Eg: json, xml