Hacker News new | ask | show | jobs
by jjoonathan 4281 days ago
Tloewald's point was that microseconds and nanoseconds are not SI base units, so standardizing on base units eliminates the ambiguity (the second alone is the SI base unit of time). Of course additional mechanisms of double and triple checking are probably still warranted to account for human fallibility.
2 comments

That's fine until you start using floating point values in order to satisfy this SI fetish. (I guess you like farads and henries too.) It's much better to use fixed point and keep track of your multiplier. A sufficiently advanced type system could do this, but at some point it will require careful thinking about precision.
Using fixed point and tracking your multiplier is exactly like using floating point.
Floating point is treated differently by compilers, involves different components of the processor, generates different types of errors, and has different performance. Perhaps there is some perspective from which that proposition is true?
A perspective where one is more familiar with IEEE754 than your in-house custom fixed-point implementation of choice?

There are plenty of applications where it makes sense to do something different because you need to accommodate special hardware (e.g. FPGAs), because you want a different representation density/range, or because external policy effectively dictates the most natural format (e.g. finance). But in the absence of a pressing concrete reason to ditch 754 floats, they are BY FAR the best option for high performance, reproducible, portable, debuggable math with abundant documentation and pre-existing pools of expertise. They're far from trivial but so is the fixed-point code you would replace them with.

If someone couldn't be bothered to learn the relevant intricacies of IEEE754, why do you expect them to do a better job re-implementing the stuff on top of integer math (or picking apart the in-house attempt to do so)? Shifting from problems of the "intern forgot to reset the rounding mode" variety to the "Newton's method code erroneously terminates one cycle too early if the last bit is a 1" variety hardly seems productive.

I won't cover the ground the other response covered (implementing your own fixed point because IEEE754 isn't good enough for you is ... nutty) but the issue here is using daft units vs. using SI units, and the thinner and thinner straws people clutch at to claim that using SI units isn't simply better. Good grief.
Regardless of what you standardize, you still need to include the unit for any figure.
Yes but you eliminate errors when working within a type of unit. NASA's problem came from converting one kind of length to another. You are clutching at straws here.