You'd certainly lose in tasks that require precise results.
Advantages and Disadvantages of Floating-Point Numbers
Floating-point numbers have two advantages over integers. First, they can represent values between integers. Second, because of the scaling factor, they can represent a much greater range of values. On the other hand, floating point operations usually are slightly slower than integer operations, and you can lose precision.
https://www.oreilly.com/library/view/c-primer-plus/9780132781145/ch03lev2sec13.html
precise results
By their nature, floating point is an approximation.
a Float is still more precise than an Int.
Float has a greater magnitude and is an approximation beyond the maximum significant digits for any specific type of float, but int is always exact within its limits.
Doubles are more precise than ints, floats are not.
Usually when you want the max precision and your values stay in a bounded range, you use fixed point. Gives you the biggest bang for your bits.
It looks like some people are converting code from using floats to ints for optimization: http://justinparrtech.com/JustinParr-Tech/programming-tip-turn-floating-point-operations-in-to-integer-operations/
But to me that seems like something you would want to do after the fact if you need that code sped up, and after all the code is complete.
I'd hate to write something floating point heavy and have to do that kind of twiddling for every bit of it, with no exception to fall back on.
Fair enough. I think there are good chunks of code that don't require precision and can speed up things.
On another topic, what's your opinion on the new crApple M1 architecture.
I had to look it up, but I'd say I'm positive to it. I have very little assembly experience but from what I've seen I really like ARM's instruction set. Having different speed cores opens up more options to developers. The neural network core is kind of cool if not a bit scary. When I say I'm for AI what I mean is I'm for democratizing AI and want the average person to understand it and use it. On a highly locked down device (any apple device), I'm not 100% certain it will be used for good.
So yeah, I think their architecture is interesting, if it was being run on an open system.
(post is archived)