Hacker News new | past | comments | ask | show | jobs | submit login

> The input data usually is in decimal and needs only a small part of the accuracy that a decimal float format offers.

I would actually argue that majority of the time data is not in decimal. For example in computational science, for which the Herbie seems to be aimed at, you very rarely have decimal numbers. While input parameters to computations might be a decimal numbers, everything else apart from initial conditions would be irrational numbers. A good example would be numerical solving of harmonic oscillator equation -- the initial conditions might very well be decimal, but the numerical solution is not (neither would be analytic solution).

> When converting decimal to binary floating point numbers you will often use the full accuracy of the float format because the decimal floating point numbers can't be represented exactly in binary.

Inability to exactly represent decimal numbers isn't really the problem in these cases. Summation of numbers with wildly varying magnitudes would be problematic for decimal floats as well.




> I would actually argue that majority of the time data is not in decimal.

The majority of time data is not even floating point and for most use cases floats don't make sense there (you usually have a set precision you want to have and don't have varying orders of magnitude)

Almost all operating systems and programming languages use metric fractions of the second for time (https://en.wikipedia.org/wiki/System_time#Retrieving_system_...) the only common technology that I know that doesn't is NTP.

> in these cases

I was leaving a more general remark




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: