General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Vitaly L
Low Level
comments
Comments by "Vitaly L" (@vitalyl1327) on "coding in c until I go completely insane" video.
blak tobor these days all FP are IEEE754, so not much diversity, no matter soft or hard float.
2
Well, that's really easy, just use fractional arithmetic. Feel free to use floating point data types (but still only integer numbers). People who don't understand how floating point works should not use floating point numbers, really.
1
It's not "fine" on so many levels. Like, try to add a billion floating point numbers, with a very wide range of values. There is a possible sequence of numbers that can make your answer wrong in orders of magnitude. The only way to get an accurate answer is to sort the array in ascending order first. And that's just one example. There are dozens more floating point pitfalls that people tend to know nothing about, for some weird reason.
1
@rsa5991 This is not what the word "precision" mean
1
@9SMTM6 you can write a decimal floating point implementation though, then argue that it conforms with this homework requirements.
1
@NinjaRunningWild no. Binary fixed point will have the same issues. You need fractional arithmetic here, or decimal fixed or floating point.
1